menu

R Programming Basics


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

sample()

runif()

rnorm()

All of the above


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

min()

range()

max()

summary()


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


4. Which of the following functions is used to read data from a CSV file in R Programming?

read.csv()

read.table()

read_excel()

read.csv2()


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

=

==

<=

=>


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

+

*

&

c()


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 box plot in R Programming?

barplot()

plot()

hist()

boxplot()


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

barplot()

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