Point out the wrong statement?
A. Renaming a variable in a data frame in R is surprisingly hard to do
B. The mutate() function exists to compute transformations of variables in a data frame
C. mute() function, which does the same thing as mutate() but then drops all non-transformed variables
D. The data frame is a key data structure in statistics and in R
Select an option to see the answer and solution.
What will be the output of the following R code?
> x <- matrix(1:6, 2, 3)
> x[1, 2]Select an option to see the answer and solution.
Individual R objects can be saved to a file using the . . . . . . . . function.
A. save
B. put
C. save_image
D. get
Select an option to see the answer and solution.
Point out the correct statement?
A. There are three operators that can be used to extract subsets of R objects
B. The [ operator is used to extract elements of a list or data frame by literal name
C. The [[ operator is used to extract elements of a list or data frame by string name
D. There are five operators that can be used to extract subsets of R objects
Select an option to see the answer and solution.
If you have a lot of objects that you want to save to a file, we use . . . . . . . . function.
A. save()
B. save.image()
C. serialize()
D. deserialize()
Select an option to see the answer and solution.
Multiple objects can be de parsed at once using the . . . . . . . . function.
A. dput()
B. write()
C. dump()
D. dget()
Select an option to see the answer and solution.
When you call serialize() on an R object, the output will be . . . . . . . . coded in hexadecimal format.
A. raw vector
B. character vector
C. integer vector
D. binary vector
Select an option to see the answer and solution.
Which of the following code extracts 1st element of the 2nd element?
> x <- list(a = list(10, 12, 14), b = c(3.14, 2.81))A. x[[c(2, 1)]]
B. x[[c(1, 2)]]
C. x[[c(2, 1,1)]]
D. x[[(2, 2,1)]]
Select an option to see the answer and solution.
Which of the following object is masked from 'package: stats'?
A. filter
B. union
C. set difference
D. get difference
Select an option to see the answer and solution.
What will be the output of the following R code?
> x <- list(aardvark = 1:5)
> x[["a", exact = FALSE]]A. 1 2 3 4 5
B. 2 3 5
C. 1 3 3 5
D. 1 2 3
Select an option to see the answer and solution.
Point out the wrong statement?
A. write.table is used for for writing tabular data to text files (i.e. CSV) or connections
B. writeLines is used for for writing character data line-by-line to a file or connection
C. dump is used for for dumping a textual representation of multiple R objects
D. all of the mentioned
Select an option to see the answer and solution.
One way to pass data around is by de parsing the R object with . . . . . . . .
A. dput()
B. write()
C. read()
D. dget()
Select an option to see the answer and solution.
.RData extension used when we save data using the functions . . . . . . . .
A. save()
B. save.image()
C. save and save.image functions
D. serialize()
Select an option to see the answer and solution.
Which of the following extracts first element from the following R vector?
> x <- c("a", "b", "c", "c", "d", "a")A. x[10]
B. x[1]
C. x[0]
D. x[2]
Select an option to see the answer and solution.
Point out the correct statement?
A. Times use the POSIXct and POSIXlt class
B. Dates and times have special classes in R that allow for numerical and statistical calculations
C. Character strings can be coerced to Date/Time classes using the strptime function
D. All of the mentioned
Select an option to see the answer and solution.
Which of the following R statement will save the output to the file for following R code?
> a <- data.frame(x = rnorm(100), y = runif(100))
> b <- c(3, 4.4, 1 / 3)A. save(a, b, file = "mydata.rda")
B. save_image(a, b, file = "mydata.rda")
C. keep(a, b, file = "mydata.rda")
D. keep_image(a, b, file = "mydata.rda")
Select an option to see the answer and solution.
The benefit of the . . . . . . . . function is that it is the only way to perfectly repressed an R object in an exportable format, without losing precision or any metadata.
A. save()
B. save.image()
C. unserialize()
D. serialize()
Select an option to see the answer and solution.
What will be the output of the following R code?
> x <- as.Date("2012-01-01")
> y <- strptime("9 Jan 2011 11:34:21", "%d %b %Y %H:%M:%S")
> x-yA. Time difference of 356.3095 days
B. Warning
C. NULL
D. Error
Select an option to see the answer and solution.
Which of the following return a subset of the columns of a data frame?
A. select
B. retrieve
C. get
D. set
Select an option to see the answer and solution.
What will be the output of the following R code?
> x <- c("a", "b", "c", "c", "d", "a")
> x[c(1, 3, 4)]A. "a" "b" "c"
B. "a" "c" "c"
C. "a" "c" "b"
D. "b" "c" "b"
Select an option to see the answer and solution.