By CM 2018/4/26
lapply(X, FUN, ...)
When you want to apply a function to each element of a list in turn and get a list back.
returns a list of the same length as X
each element of which is the result of applying FUN to the corresponding element of X.
sapply(X, FUN, ...)
When you want to apply a function to each element of a list in turn, but you want a vector back, rather than a list.
vapply(X, FUN, FUN.VALUE, ...)
similar to sapply
The FUN.VALUE argument expects a template for the return argument of this function FUN
FUN.VALUE: numeric / logical / ...
safer (and sometimes faster) to use
data manipulation
data visualization
statistical analysis / modeling
deployment
cleaning and preparing the data (80% time)
well structured data
Data wrangling, sometimes referred to as data munging, is the process of transforming and mapping data from one "raw" data form into another format with the intent of making it more appropriate and valuable for a variety of downstream purposes such as analytics.
install.packages(‘dplyr’) / library(dplyr)
basic verb of data manipulation
install / library
gather / spread (pivot tables in excel)
separate / unite