Files containing R scripts end with extension _____
Extracts First element.
> x <- c("a", "b", "c", "c", "d", "a")
Individual R objects can be saved to a file using the _____ function.
Which of the following is the only environment without a parent is the ________ environment.
What will be the output of the following R code?
paste("a", "b", sep = ":")
Which of the following R functions finds the maximum value in the vector x, excluding missing values?
> m <- 1:10
> m
The system.time()
function returns an object of class _______ which contains two useful bits of information.
What will the following code return when executed?
rnorm(1)
What will be the output of the following R code?
> printmessage <- function(x) {
if(is.na(x))
print("Error")
else if(x > 0)
print("x is greater than zero")
else
print("x is less than or equal to zero")
invisible(x)
}> printmessage(NA)