Mar 24, 2025
5 + 6 executed with Ctrl + Enter gives 11 in the console.5 + 6 results in 11.<- operator to assign values to variables.
a <- 5, b <- 6.a + b results in 11.sum(a, b) adds variables a and b.name <- c("Greg", "Jill"), where c() concatenates values.friends <- data.frame(name, age, gender).data.frame() function creates a table-like structure (data frame).$ operator to access specific variables in a data frame.
friends$name.[] to subset data.
friends[1, ] gets the first row.friends[, 1] gets the first column.install.packages("tidyverse").library(tidyverse).%>% to streamline code.
friends %>% select(name, age) %>% filter(age < 50).