menu

R Programming Basics

R Programming Basics - Important Points


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

A. na.omit()

B. remove.na()

C. omit.na()

D. delete.na()

Discuss Work Space

Answer: option a

Explanation:

The na.omit() function is used to remove missing values from a vector in R Programming.

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

A. rename()

B. rename_cols()

C. colnames()

D. set_colnames()

Discuss Work Space

Answer: option c

Explanation:

The colnames() function is used to rename columns in a data frame in R Programming.

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

A. apply()

B. lapply()

C. sapply()

D. mapply()

Discuss Work Space

Answer: option c

Explanation:

The sapply() function is used to apply a function to each element of a vector in R Programming.

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

A. plot()

B. scatter()

C. scatterplot()

D. scatter_plot()

Discuss Work Space

Answer: option a

Explanation:

The plot() function is used to create a scatter plot in R Programming.

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

A. cor()

B. cov()

C. cor.test()

D. All of the above

Discuss Work Space

Answer: option d

Explanation:

All of the above functions can be used to calculate the correlation between two vectors in R Programming.


Subscribe for Latest Career Trends
Subscribe Now
Use AI and ChatGPT for Career Guidance

Unlock Your Future

Join Now
Worried for Placements in 2024?

Join FAST TRACK Course

Join Now
Supercharge Your SUCCESS

Join All in One Placement Mock Tests-2024

Join Now