Week 2 – Programming using RStudio – Shuffle Q/A 1

11. How are base packages different from recommended packages in the R package ecosystem?

  • Recommended packages are made by the community and base packages are not.
  • Base packages take longer to load than recommended packages.
  • Base packages are installed and loaded by default and recommended packages are not.
  • Recommended packages are more professionally designed than base packages.

12. Why would a data analyst want to use the CRAN network when working with RStudio?

  • To add new operators to R
  • To install R packages
  • To add pipes to R
  • To install drivers to RStudio

13. A data analyst wants to take a data frame named people and filter the data where age is 10, arranged by height, and grouped by gender. Which code snippet would perform those operations in the specified order?


14. Which of the following are examples of variable names that can be used in R? Select all that apply.

  • autos_5
  • utility2
  • 3_sales
  • _red_1


15. You want to create a vector with the values 43, 56, 12 in that exact order. After specifying the variable, what R code chunk lets you create the vector?

  • c(43, 56, 12)
  • v(12, 56, 43)
  • v(43, 56, 12)
  • c(12, 56, 43)

16. An analyst comes across dates listed as strings in a dataset. For example, December 10th, 2020. To convert the strings to a date/time data type, which function should the analyst use?

  • lubridate()
  • datetime()
  • now()
  • mdy()

17. A data analyst inputs the following code in RStudio: sales_1 <- (3500.00 * 12) Which of the following types of operators does the analyst use in the code? Select all that apply.

  • Relational
  • Logical
  • Arithmetic
  • Assignment

18. Which of the following files in R have names that follow widely accepted naming convention rules? Select all that apply.

  • patient_details_1.R
  • title*123.R
  • p1+infoonpatients.R
  • patient_data.R

Shuffle Q/A 2

19. Which of the following are included in R packages? Select all that apply.

  • Naming conventions for R variable names
  • Reusable R functions
  • Tests for checking your code
  • Sample datasets

20. What is the name of the popular package archive dedicated to supporting R users authentic, validated code?

  • The CRAN archive
  • The RStudio website
  • The tidyverse
  • Python

Devendra Kumar

Project Management Apprentice at Google

Leave a Reply