1. Which programming language is more based on the results?
2. Why learning R becomes tough?
Correct Answer is : Special Cases
3. R is mostly used in ______________
Correct Answer is : All of the mentioned
4. Why is it needed for R studio to update regularly?
5. What is the meaning of “<-“?
Correct Answer is : Assignment
6. In the expression x <- 4 in R, what is the class of ‘x’ as determined by the `class()’ function?
Correct Answer is : Integer
7. Which of the following code create n samples of size “size” with probability prob from the binomial ?
Correct Answer is : z <- rbinom(n,size,prob)
8. Which of the following code create a n item vector of random normal deviates ?
Correct Answer is : x1 <- c(rnorm(n))
9. Which of the following statement can read csv files ?
Correct Answer is : read.table(filename,header=TRUE,sep=’,’)
10. Which of the following statement read a tab or space delimited file ?
Correct Answer is : read.table(filename,header=TRUE)
11. which of the following statement chose those objects meeting a logical criterion ?
Correct Answer is : subset(dataset,logical)
12. Which of the following statement is another way to get a subset ?
Correct Answer is : data.df[data.df=logical].
13. Which of the following sort a dataframe by the order of the elements in B
Correct Answer is : x[rev(order(x$B)),].
14. Which of the following is Mac menu command ?
Correct Answer is : browse.workspace
15. _____ list the variables in the workspace
16. ___________ remove all the variables from the workspace
Correct Answer is : rm(list=ls())
17. Which of the following code will drop the nth column ?
Correct Answer is : new <- old[-n,].
18. Which of the following code drop the ith and jth column ?
Correct Answer is : new <- old[,-c(i,j)].
19. Which of the following statement find cases with no missing values ?
Correct Answer is : complete <- subset(data.df,complete.cases(data.df)
20. Which of the following statement is normal distribution ?
Correct Answer is : dnorm(x, mean=0, sd=1, log = FALSE)