Data Manipulation

What is the primary purpose of the 'dplyr' package in R?
Statistical modeling
Data visualization
Data manipulation
Machine learning
Which function is used to filter rows based on specified conditions in dplyr?
Subset()
Filter()
Select()
Arrange()
What does the group_by() function do in 'dplyr'?
Creates a new column
Filters rows based on conditions
Groups data by one or more columns
Sorts data frame by column values
Which operator is used for chaining operations in dplyr?
%<>%
%$%
%>%
%|%
How do you calculate the mean of a numeric column in a grouped data frame using dplyr?
Group_mean()
Mean_grouped()
Aggregate(mean)
Summarize(mean=mean(column))
What does the mutate() function do in dplyr?
Filters rows based conditions
Groups data by one or more columns
Creates or modifies columns
Sorts data frame by column values
Which function is used to arrange rows based on column values in ascending order in dplyr?in
Order()
Arrange()
Sort()
Ascending()
What does the select function do in dplyr?
Choose specific columns
Renames columns
Filters rows based on conditions
Groups data by one or more columns
How can you remove duplicate rows based on selected columns in dplyr?
Remove_duplicates()
Distinct()
Unique_rows()
Dedup()
Which function is used to calculate the total number of rows in a data frame?
Count()
Total_rows()
N()
Length()
How do you create a new variable in a data frame based on existing variables using dplyr?
Modify()
Create_var()
Transform()
Mutate()
In dplyr what does the %in% operator check for?
Equality
Inequality
Presence in a vector
Absence in a vector
What does na.omit() function do in R?
Replaces missing values with the mean of the column
Removes rows with missing values
Imputes missing values with zeros
Fills missing values with the previous non-missing value
 
What does the is.na() function in R do?
Identifies missing values in a vector or data frame
Checks if a vector is numeric
Computes the mean of a numeric vector
Filters rows based on conditions
What is the purpose of the complete.cases() function in R?
Completes missing values with the mean of the column
Identifies cases with complete data(no missing values)
Adds new cases to a data frame
Computes summary statistics for complete cases
How do you filter rows with missing values in a specific column, say "Age", using dplyr?
Filter(data, is.na(Age))
Filter(data, Age==NA)
Filter(data, Age %in% NA)
Filter(data, !complete.cases(Age))
{"name":"Data Manipulation", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"What is the primary purpose of the 'dplyr' package in R?, Which function is used to filter rows based on specified conditions in dplyr?, What does the group_by() function do in 'dplyr'?","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Make your own Survey
- it's free to start.