Data Analysis with R Programming - Weekly challenge 2
Which of the following are examples of variable names that can be used in R? value_2 value%2 value(2) value-2
value_2
A data analyst wants to create the date February 27th, 2027 using the lubridate functions. Which of the following are examples of code that would create this value? Select all that apply. dmy(02272027) mdy("2027-02-27") mdy(02272027) ymd("2027-02-27")
ymd("2027-02-27")
Which of the following is a best practice when naming functions in R? Function names should be capitalized Function names should be very long Function names should start with a special character Function names should be verbs
Function names should be verbs
In R, what includes reusable functions and documentation about how to use the functions? Vectors Pipes Comments Packages
Packages
A data analyst inputs the following code in RStudio: change_1 <- 70 Which of the following types of operators does the analyst use in the code? Arithmetic Assignment Relational Logical
Assignment
When programming in R, what is a pipe used as an alternative for? Nested function Vector Installed package Variable
Nested function
What is the name of the popular package archive dedicated to supporting R users authentic, validated code? The tidyverse The CRAN archive The RStudio website Python
The CRAN archive
You want to create a vector with the values 12, 23, 51, in that exact order. After specifying the variable, what R code chunk lets you create the vector? c(51, 23, 12) v(51, 23, 12) v(12, 23, 51) c(12, 23, 51)
c(12, 23, 51)