menu

R Programming Basics


1. Which of the following functions is used to create a histogram in R Programming?

barplot()

plot()

hist()

boxplot()


2. Which of the following operators is used to concatenate two vectors in R Programming?

+

*

&

c()


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

rename()

rename_cols()

colnames()

set_colnames()


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 calculate the standard deviation of a vector in R Programming?

sd()

median()

var()

mean()


6. 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


7. 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()


8.

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

Integer

Float

Double

Character


9. Which of the following functions is used to convert a factor variable to a character variable in R Programming?

as.factor()

as.character()

factor()

character()


10. Which symbol is used to assign values to variables in R Programming?

=

==

<=

=>