Home » Data Science » Data Analysis » A data analyst is working with a data frame named cars. The analyst notices that all the column names in the data frame are capitalized. What code chunk lets the analyst change all the column names to lowercase? Q: Practice More Questions From: Working with data in R Created with Fabric.js 4.6.0 Practice More Questions Data Analysis 2000+ Qs Machine Learning 1000+ Qs Created with Fabric.js 4.6.0 Similar Questions A data analyst is working with a data frame called salary_data. They want to create a new column named hourly_salary that includes data from the wages column divided by 40. What code chunk lets the analyst create the hourly_salary column? 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? A data analyst uses the bias() function to compare the actual outcome with the predicted outcome to determine if the model is biased. They get a score of 0.8. What does this mean? You are working with the ToothGrowth dataset. You want to use the skim_without_charts() function to get a comprehensive view of the dataset. Write the code chunk that will give you this view. How many rows does the ToothGrowth dataset contain? A data analyst is working with a data frame named cars. The analyst notices that all the column names in the data frame are capitalized. What code chunk lets the analyst change all the column names to lowercase? You are working with the penguins dataset. You want to use the summarize() and max() functions to find the maximum value for the variable flipper_length_mm. You write the following code:penguins %>%drop_na() %>%group_by(species) %>%Add the code chunk that lets you find the maximum value for the variable flipper_length_mm.summarize(max(flipper_length_mm))What is the maximum flipper length in mm for the Gentoo species? A data analyst is studying weather data. They write the following code chunk: bias(actual_temp, predicted_temp) What will this code chunk calculate? A data analyst creates a data frame with data that has more than 50,000 observations in it. When they print their data frame, it slows down their console. To avoid this, they decide to switch to a tibble. Why would a tibble be more useful in this situation? A data analyst is working with a data frame named salary_data. They want to create a new column named wages that includes data from the rate column multiplied by 40. What code chunk lets the analyst create the wages column? A data analyst writes the following code chunk to return a statistical summary of their dataset: quartet %>% group_by(set) %>% summarize(mean(x), sd(x), mean(y), sd(y), cor(x, y)) Which function will return the average value of the y column? A data analyst is working with a data frame named retail. It has separate columns for dollars (price_dollars) and cents (price_cents). The analyst wants to combine the two columns into a single column named price, with the dollars and cents separated by a decimal point. For example, if the value in the price_dollars column is 10, and the value in the price_cents column is 50, the value in the price column will be 10.50. What code chunk lets the analyst create the price column? A data analyst is using statistical measures to get a better understanding of their data. What function can they use to determine how strongly related are two of the variables? A data analyst is working with the penguins dataset in R. What code chunk will allow them to sort the penguins data by the variable bill_length_mm? A data analyst is working with the penguins dataset. What code chunk does the analyst write to make sure all the column names are unique and consistent and contain only letters, numbers, and underscores? You are working with the penguins dataset. You want to use the summarize() and min() functions to find the minimum value for the variable bill_depth_mm. You write the following code:penguins %>%drop_na() %>%group_by(species) %>%Add the code chunk that lets you find the minimum value for the variable bill_depth_mm.summarize(min(bill_depth_mm))What is the minimum bill depth in mm for the Chinstrap species? A data analyst wants a quick summary of the structure of their data frame, including the column names and the number of rows and variables. What function should they use? You are working with the penguins dataset. You want to use the summarize() and mean() functions to find the mean value for the variable body_mass_g. You write the following code:penguins %>%drop_na() %>%group_by(species) %>%Add the code chunk that lets you find the mean value for the variable body_mass_g.summarize(mean(body_mass_g))What is the mean body mass in g for the Adelie species? In R, which statistical measure demonstrates how strong the relationship is between two variables? A data analyst is working with a large data frame. It contains so many columns that they don’t all fit on the screen at once. The analyst wants a quick list of all of the column names to get a better idea of what is in their data. What function should they use? 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? Which of the following are benefits of using ggplot2? Select all that apply. A data analyst creates a plot using the following code chunk:ggplot(data = penguins) +geom_point(mapping = aes(x = flipper_length_mm, y = body_mass_g))Which of the following represents a function in the code chunk? Select all that apply. Fill in the blank: In ggplot2, the term mapping refers to the connection between variables and _____ . Created with Fabric.js 4.6.0 Practice More Questions Data Analysis 200+ Qs Machine Learning 100+ Qs