C Packages and Functions Used

base

  • c(): combine values into a vector or list
  • round(): rounding of numbers
  • mean(): arithmetic mean
  • length(): length of an object
  • class(): object classes
  • []: extract or replace parts of an object
  • data.frame(): creates data frames
  • summary(): object summaries
  • colnames(): retrieve or set the row or column names
  • nrow(): return the number of rows present in x
  • ncol(): return the number of columns present in x
  • head() | tail(): return the first or last parts of an object
  • sum(): sum of vector elements
  • typeof(): returns the type of an object
  • sort(): sort (or order) a vector into ascending or descending order
  • table(): cross tabulation and table creation
  • factor(): encode a vector as a factor
  • str(): compactly display the structure of an arbitrary R object
  • plot(): generic x-y plotting
  • names(): functions to get or set the names of an object
  • hist(): computes a histogram of the given data values

readr

  • read_csv(): import data from csv files

dplyr

  • glimpse(): look at list of columns in data frame
  • select(): picks variables (columns) based on their names
  • mutate(): create new variables (columns) based on existing variables (columns)
  • count(): count unique values of one or more values
  • filter(): Subset rows using column values
  • group_by(): group data by one or more variables
  • summarize() or summarise(): summarize each group to fewer rows. Creates new data frame.

ggplot2

  • ggplot(): initializes a ggplot object
  • geom_line(): connects variables in order of variable on x axis. Used to create a line graph
  • geom_point(): used to create scatterplot, or add points to data on graph
  • scale_x_continous(): adjusts scale of continous variables on x axis.