0% found this document useful (0 votes)
61 views2 pages

Análisis de Datos en R: Deber 1

The document is a set of questions in Spanish for a data analysis assignment in R. It includes questions about basic R objects and operations like classes of vectors, binding vectors, subsetting vectors, and using the 'data.csv' dataset. Students are asked to use R to answer questions about the data frame, including examining column names, extracting rows, finding number of observations, means and max/min of variables after subsetting. The questions cover basic manipulation and exploration of data frames and vectors in R.

Uploaded by

orntrix
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views2 pages

Análisis de Datos en R: Deber 1

The document is a set of questions in Spanish for a data analysis assignment in R. It includes questions about basic R objects and operations like classes of vectors, binding vectors, subsetting vectors, and using the 'data.csv' dataset. Students are asked to use R to answer questions about the data frame, including examining column names, extracting rows, finding number of observations, means and max/min of variables after subsetting. The questions cover basic manipulation and exploration of data frames and vectors in R.

Uploaded by

orntrix
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ANÁLISIS DE DATOS I

FACULTAD DE ECONOMÍA
PONTIFICIA UNIVERSIDAD CATÓLICA DEL ECUADOR

DEBER 1: R

Fecha de entrega: Martes 10 de septiembre de 2019 , 17h00

Please answer the following questions. This document should be sent to


[Link]@[Link].

1. If I execute the expression x <- 4 in R, what is the class of the object `x' as
determined by the `class()' function?

2. What is the class of the object defined by the expression x <- c(4, "a", TRUE)?

3. If I have two vectors x <- c(1,3, 5) and y <- c(3, 2, 10), what is produced by the
expression cbind(x, y)?

4. Suppose I have a vector x <- c(3, 5, 1, 10, 12, 6) and I want to set all elements of this
vector that are less than 6 to be equal to zero. What R code achieves this?

Use the data in the file [Link] to answer the following questions .

5. In the dataset provided for this workshop, what are the column names of the
dataset?

6. Extract the first 2 rows of the data frame and print them to the console. What
does the output look like?
7. How many observations (i.e. rows) are in this data frame?

8. Extract the last 2 rows of the data frame and print them to the console. What
does the output look like?

9. What is the value of Ozone in the 47th row?

10. How many missing values are in the Ozone column of this data frame?

11. What is the mean of the Ozone column in this dataset? Exclude missing values
(coded as NA) from this calculation.

12. Extract the subset of rows of the data frame where Ozone values are above 31
and Temp values are above 90. What is the mean of Solar.R in this subset?

13. What is the mean of "Temp" when "Month" is equal to 6?

14. What was the maximum ozone value in the month of May (i.e. Month is equal to
5)?

You might also like