29. Coursera - Google Data Analytics Pro - Module 7.3

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

You are working with the penguins dataset. You want to use the arrange() function to sort the data for the column bill_length_mm in ascending order. You write the following code: penguins %>% Add a single code chunk to sort the column bill_length_mm in ascending order. Note: DO NOT write the above code penguins %>% into your answer as it has already been pre-written into the code chunk. 1 RunResetError in penguins %>% cleanup = tryCatch({ : could not find function "%>%<-" What is the shortest bill length in mm? 34.0 33.5 33.1 32.1

32.1

Which of the following are best practices for creating data frames? Select all that apply. All data stored should be the same type Columns should be named Rows should be named Each column should contain the same number of data items

Columns should be named Each column should contain the same number of data items

In R, which statistical measure demonstrates how strong the relationship is between two variables? Average Standard deviation Maximum Correlation

Correlation

You have a data frame named employees with a column named last_name. What will the name of the employees column be in the results of the function rename_with(employees, toupper)? last_name Last_name Last_Name LAST_NAME

LAST_NAME

A data analyst is working with a dataset in R that has more than 50,000 observations. Why might they choose to use a tibble instead of the standard data frame? Select all that apply. Tibbles automatically only preview as many columns as fit on screen Tibbles can automatically change the names of variables Tibbles can create row names Tibbles automatically only preview the first 10 rows of data

Tibbles automatically only preview as many columns as fit on screen Tibbles automatically only preview the first 10 rows of data

Why are tibbles a useful variation of data frames? Tibbles make changing the names of variables easier. Tibbles can create row names Tibbles make printing easier Tibble can change the data type of inputs

Tibbles make printing easier

Tidy data is a way of standardizing the organization of data within R. True False

True

A data analyst wants to find out how much the predicted outcome and the actual outcome of their data model differ. What function can they use to quickly measure this? sd() mean() cor() bias()

bias()

Data analysts are cleaning their data in R. They want to be sure that their column names are unique and consistent to avoid any errors in their analysis. What R function can they use to do this automatically? rename() select() clean_names() rename_with()

clean_names()

A data analyst inputs the following command: quartet %>% group_by(set) %>% summarize(mean(x), sd(x), mean(y), sd(y), cor(x, y)). Which of the functions in this command can help them determine how strongly related their variables are? sd(y) mean(y) cor(x,y) sd(x)

cor(x,y)

A data analyst is working with the penguins data. The variable species includes three penguin species: Adelie, Chinstrap, and Gentoo. The analyst wants to create a data frame that only includes the Adelie species. The analyst receives an error message when they run the following code: penguins %>% filter(species <- "Adelie") How can the analyst change the second line of code to correct the error? filter("Adelie") filter(species == "Adelie") filter("Adelie" <- species) filter(Adelie == species)

filter(species == "Adelie")

Which of the following functions can a data analyst use to get a statistical summary of their dataset? Select all that apply. mean() cor() sd() ggplot2()

mean() cor() sd()

Which R function can be used to make changes to a data frame? mutate() colnames() str() head()

mutate()

Fill in the blank: The bias function compares the actual outcome of the data with the _____ outcome to determine whether or not the model is biased. desired probable predicted final

predicted

A data analyst is working with a data frame called sales. In the data frame, a column named location represents data in the format "city, state". The analyst wants to split the city into an individual city column and state into a new countrycolumn. What code chunk lets the analyst split the location column? untie(sales, location, into=c("city", "country"), sep=", ") separate(sales, location, into=c("country", "city" ), sep=" ") separate(sales, location, into=c("city", "country"), sep=", ") separate(sales, location, into=c("country", "city" ), sep=", ")

separate(sales, location, into=c("city", "country"), sep=", ")

A data analyst is checking a script for one of their peers. They want to learn more about a specific data frame. What function(s) will allow them to see a subset of data values in the data frame? Select all that apply. colnames() str() head() library()

str() head()

Data analysts are working with customer information from their company's sales data. The first and last names are in separate columns, but they want to create one column with both names instead. Which of the following functions can they use? select() separate() unite() arrange()

unite()

A data analyst is working with a data frame named stores. It has separate columns for city (city) and state (state). The analyst wants to combine the two columns into a single column named location, with the city and state separated by a comma. What code chunk lets the analyst create the location column? unite(stores, "location", city, state, sep=",") unite(stores, city, state, sep=",") unite(stores, "location", city, state) unite(stores, "location", city, sep=",")

unite(stores, "location", city, state, sep=",")


Ensembles d'études connexes

RNSG 1430 Thermoregulation, comfort, mobility

View Set

The Percent Proportion and Percent Equation

View Set

Bio 101 w/L Ch 9. Processes & Steps of DNA Replication

View Set

Chapter 28: Color (Conceptual Physics Exam review)

View Set

MKTG 4280 Ch. 12 McGraw-Hill Connect

View Set

Basic Spanish Colors with nouns (agreement)

View Set

Laboratory Math Practice Problems

View Set