1/19
Looks like no tags are added yet.
What does library() do?
Loads a package so its functions are available.
What does read_csv() do?
Reads a CSV file into a tibble; columns may be imported as text.
What do dim(), names(), glimpse(), head(), and summary() do?
Inspect dimensions, column names, structure, first rows, and summaries.
What does the |> pipe do?
Passes the left-hand result as the first argument to the next function.
What does <- do?
Assigns a result to an object, such as x <- 5.
What does filter() do?
Keeps rows matching a condition and drops rows that don't match.
What does select() do?
Keeps chosen columns; filter() keeps chosen rows.
What does count() do?
Counts observations for each combination of specified variable values.
What does mutate() do?
Creates or changes columns; use <- to save a changed result.
What does summarize() do?
Calculates summary statistics, often reducing rows to one per group.
What does group_by() do?
Makes subsequent operations, like summarize(), run separately by group.
What do arrange() and desc() do?
arrange() sorts rows; desc() makes sorting descending.
What does case_match() do?
Replaces specified values with new values; unmatched values need consideration.
What does as.numeric() do with unconvertible text?
Returns NA and usually gives a warning.
What does factor(levels = …, ordered = TRUE) do?
Creates an ordered categorical variable with specified levels.
What does mean(x, na.rm = TRUE) do?
Calculates the mean while excluding missing NA values.
What happens if mean(x) contains NA?
The result is NA unless missing values are removed.
What does sum(is.na(x)) count?
The number of missing values in x.
What does %in% do?
Tests whether each value belongs to a specified set of values.
What does n() count inside summarize()?
The number of rows in the current group, including rows with missing values.