menu

R Programming Basics


1. Which of the following functions is used to remove missing values from a vector in R Programming?

na.omit()

remove.na()

omit.na()

delete.na()


2.

Which of the following is NOT a data type in R Programming?

Integer

Float

Double

Character


3. Which of the following functions is used to extract a subset of a data frame in R Programming?

select()

filter()

slice()

subset()


4. Which of the following functions is used to create a box plot in R Programming?

barplot()

plot()

hist()

boxplot()


5. Which of the following functions is used to rename columns in a data frame in R Programming?

rename()

rename_cols()

colnames()

set_colnames()


6. Which of the following functions is used to calculate the mean of a vector in R Programming?

sd()

median()

var()

mean()


7. Which of the following functions is used to create a density plot in R Programming?

density()

plot()

hist()

boxplot()


8. Which of the following functions is used to create a bar plot in R Programming?

barplot()

plot()

hist()

boxplot()


9. Which of the following functions is used to calculate the correlation between two vectors in R Programming?

cor()

cov()

cor.test()

All of the above


10. Which of the following functions is used to install packages in R Programming?

library()

install.packages()

require()

package.install()