menu

R Programming Basics


1.

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

Integer

Float

Double

Character


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 create a histogram in R Programming?

barplot()

plot()

hist()

boxplot()


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

=

==

<=

=>


5. Which of the following functions is used to apply a function to each element of a vector in R Programming?

apply()

lapply()

sapply()

mapply()


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 extract a subset of a data frame in R Programming?

select()

filter()

slice()

subset()


8. Which of the following functions is used to generate random numbers in R Programming?

sample()

runif()

rnorm()

All of the above


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 rename columns in a data frame in R Programming?

rename()

rename_cols()

colnames()

set_colnames()