R Programming Basics
R Programming Basics - Important Points
11. | Which of the following functions is used to remove missing values from a vector in R Programming? |
---|
A. na.omit()
B. remove.na()
C. omit.na()
D. delete.na()
View Answer Discuss Work SpaceAnswer: option a
Explanation:
The na.omit() function is used to remove missing values from a vector in R Programming.
12. | Which of the following functions is used to rename columns in a data frame in R Programming? |
---|
A. rename()
B. rename_cols()
C. colnames()
D. set_colnames()
View Answer Discuss Work SpaceAnswer: option c
Explanation:
The colnames() function is used to rename columns in a data frame in R Programming.
13. | Which of the following functions is used to apply a function to each element of a vector in R Programming? |
---|
A. apply()
B. lapply()
C. sapply()
D. mapply()
View Answer Discuss Work SpaceAnswer: option c
Explanation:
The sapply() function is used to apply a function to each element of a vector in R Programming.
14. | Which of the following functions is used to create a scatter plot in R Programming? |
---|
A. plot()
B. scatter()
C. scatterplot()
D. scatter_plot()
View Answer Discuss Work SpaceAnswer: option a
Explanation:
The plot() function is used to create a scatter plot in R Programming.
15. | Which of the following functions is used to calculate the correlation between two vectors in R Programming? |
---|
A. cor()
B. cov()
C. cor.test()
D. All of the above
View Answer Discuss Work SpaceAnswer: option d
Explanation:
All of the above functions can be used to calculate the correlation between two vectors in R Programming.