see metadata associated with data frame - ANS-attributes(x)
column or variable names - ANS-names(x)
Inspect/view the raw datafile - ANS-view(x)
number of rows - ANS-nrow(x)
number of col - ANS-ncol(x)
dimension of data frame - ANS-dim(x)
# "$" operator to select a column - ANS-data$data_title
summarize data in frame - ANS-gimpse(x)
to select ROWS - ANS-slice(x:x)
arrange the dataframe in descening order by the variable, and store this back as movies -
ANS-x %>% arrange(variable)
renames a variable from dataset x - ANS-x %>% rename(new_name = old_name)
loads library - ANS-library(x)
assigns a data file to an object - ANS-objectx <- read_csv("file_directory")
returns the variable filtered by constraint - ANS-x %>% filter(variable < restraint)
creates a new variable based on data from x - ANS-x <- x %>% mutate(newVariableName =
whatItIs)
plots a graph based on inputs of data - ANS-ggplot(data = data, aes(x = variable1, y = variable2,
shape = factor(cyl))) + geom_type(shape = shapenumber) + facet_wrap(~ class)
+stat_summary(fun = "median", color = "red", size = 1) + coordflip() + theme_bw()
Model Formula - ANS-ex: hwy ~ year + displ + cyl