[1] "Hello"
[1] "Hiya"
Inputs and outputs
Can set defaults arguements
Can be general or specific to a package.
n()
vs. read_all_contributions()
Save time in the long run.
The computer can run a logical check.
Consider this function:
Depending in an argument
Make a function that takes a vector of students in this class and prints the name of each student.
library(tidyverse)
library(googlesheets4)
class_info <- read_sheet("https://docs.google.com/spreadsheets/d/1XOAFQvBcFvhKwEl5xH6l3nRJK2Wk0hWZ18S9kAZclQ0/edit?usp=sharing") |>
janitor::clean_names()
# selecting only the column we are interested in and making it into a vector.
name_vector <- as.vector(
class_info |>
select("preferred_name"))