Multiple objects can be de parsed at once and read back using function . . . . . . . .
A. source()
B. read()
C. dget()
D. dput()
Select an option to see the answer and solution.
What will be the output of the following R code?
> x <- as.Date("2012-03-01")
> y <- as.Date("2012-02-28")
> x-yA. Time difference of 3 days
B. Time difference of 2 days
C. Time difference of 1 days
D. Time difference of 5 days
Select an option to see the answer and solution.
Which of the following opens connection to gz-compressed text file?
A. con <- gzfiles("words.gz")
B. con <- gzfile("words.gz")
C. con <- gzfile2("words.gz")
D. con <- gzfiles2("words.gz")
Select an option to see the answer and solution.
What will be the output of the following R code?
> x <- list(foo = 1:4, bar = 0.6)
> xA. $foo
[1] 1 2 3 4
$bar
[1] 0.6
B. $foo
[1] 0 1 2 3 4
$bar
[1] 0 0.6
C. $foo
[1] 0 1 2 3 4
$bar
[1] 0.6
D. Error
Select an option to see the answer and solution.
The . . . . . . . . function can be used to select columns of a data frame that you want to focus on.
A. select
B. rename
C. get
D. set
Select an option to see the answer and solution.
What will be the output of the following R code?
> x <- list(a = list(10, 12, 14), b = c(3.14, 2.81))
> x[[c(1, 3)]]Select an option to see the answer and solution.
What will be the output of the following R code?
> p <- as.POSIXlt(x)
> names(unclass(p))
> p$wdaySelect an option to see the answer and solution.
There is an SQL interface for relational databases via the . . . . . . . . package.
Select an option to see the answer and solution.
dput() output is in the form of . . . . . . . .
A. R code
B. text file code
C. binary code
D. both binary and text
Select an option to see the answer and solution.
Unlike writing out a table or CSV file, dump() and dput() preserve the . . . . . . . . so that another user doesn't have to specify the all over again.
A. metadata
B. backup data
C. attribute data
D. normal data
Select an option to see the answer and solution.
Which of the following code would read 100 rows?
A. initial <- read.table("datatable.txt", nrows = 100)
B. tabAll <- read.table("datatable.txt", colClasses = classes)
C. initial <- read.table("datatable.txt", nrows = 99)
D. initial <- read.table("datatable.txt", nrows = 101)
Select an option to see the answer and solution.
Point out the correct statement?
A. The data frame is a key data structure in statistics and in R
B. R has an internal implementation of data frames that is likely the one you will use most often
C. There are packages on CRAN that implement data frames via things like relational databases that allow you to operate on very very large data frames
D. All of the mentioned
Select an option to see the answer and solution.
Which of the following code opens a connection to the file foo.txt, reads from it, and closes the connection when its done?
A. data <- read.csv("foo.txt")
B. data <- read.csvo("foo.txt")
C. data <- readonly.csv("foo.txt")
D. data <- getonly.csv("foo.txt")
Select an option to see the answer and solution.
Point out the wrong statement?
A. Dates are represented by the Date class
B. Times are represented by the POSIXct or the POSIXlt class
C. Dates are represented by the DateTime class
D. Times can be coerced from a character string
Select an option to see the answer and solution.
What will be the output of the following R code?
> x <- c(1, 2, NA, 4, NA, 5)
> bad <- is.na(x)
> print(bad)A. FALSE FALSE FALSE FALSE TRUE FALSE
B. FALSE TRUE TRUE FALSE TRUE FALSE
C. FALSE FALSE TRUE FALSE TRUE FALSE
D. FALSE TRUE TRUE TRUE TRUE FALSE
Select an option to see the answer and solution.
Point out the correct statement?
A. unserialize is used for converting an R object into a binary format for outputting to a connection
B. save is used for saving an arbitrary number of R objects in binary format to a file
C. The read.data() function is one of the most commonly used functions for reading data
D. save is not used for saving an arbitrary
Select an option to see the answer and solution.
Which of the following statement will load the objects to the file named "mydata.RData"?
A. save("mydata.RData")
B. load("mydata.RData")
C. loadAll("mydata.RData")
D. put("mydata.RData")
Select an option to see the answer and solution.
. . . . . . . . opens a connection to a file compressed with gzip.
A. url
B. gzfile
C. bzfile
D. file
Select an option to see the answer and solution.
What will be the output of the following R code?
> y <- data.frame(a = 1, b = "a")
> dput(y)Select an option to see the answer and solution.
Which of the following is example of vectorized operation as far as subtraction is concerned?
> x <- 1:4
> y <- 6:9Select an option to see the answer and solution.