menu

R Programming Basics


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

select()

filter()

slice()

subset()


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

plot()

scatter()

scatterplot()

scatter_plot()


3. Which of the following functions is used to find the maximum value in a vector in R Programming?

min()

range()

max()

summary()


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 generate random numbers in R Programming?

sample()

runif()

rnorm()

All of the above


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

sd()

median()

var()

mean()


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


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

=

==

<=

=>


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

density()

plot()

hist()

boxplot()


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

sd()

median()

var()

mean()