R
How-to
- Access the value of last evaluated expression
- Cache objects within explicit environments in R Markdown
- Calculate AIC, BIC
- Calculate Leverage
- Calculate Partial Correlation Coefficient
- Calculate Sensitivity and Specificity
- Calculate Standardized Residual
- Calculate Variance Inflation Factors
- Calculate confidence intervals for model parameters
- Calculate the confidence interval for mean response of glm
- Calculate the proportion of a subset of a vector
- Change the null hypothesis to \(H_0 = T\) in
summary(lm) - Convert a matrix to a list
- Create a formula from a string
- Deal with
glm.fit: algorithm did not converge - Draw Fitted versus Residuals Plot
- Draw Normal QQ Plot
- Drop unused levels from factors
- Extract the number of observations from a fit
- Fit Logistic Regression Models
- Fit a model with no intercept
- Format a number as percent
- Format a number with commas
- Format numbers in a vector individually
- Generate combinations of vectors' elements
- Get a matrix indices with
which() - Include all 2-way interactions in a glm model in R
- Interpret coefficients of categorical variables in
lm - Make predictions with Logistic Regression Models
- Perform BP test
- Perform Leave-One-Out Cross Validation
- Perform Likelihood Ratio Test
- Perform Shapiro-Wilk Test
- Perform a model selection with exhaustive search
- Perform a model selection with stepwise search based on AIC/BIC
- Perform the K-fold cross-validation for glm
- Prevent from echoing a value, specifically a function's return value
- Put classes with 0 count in
table() - Put current date in the YAML meta header
- Remove
NAvalues - Remove column names
- Reorder factor elements
- Reset
par() - Retry a statement on error
- Run a livereloaded R Markdown webserver
- Split a dataset into train and test dataset
- Suppress warnings
- Use
layout()to organize plots - Use the
glmmodel as a classifier
Reference
- Assignment:
<-and<<- - Operators
- Quotes
abline()apply(X, MARGIN, FUN, ...)as.factor(x)confint(object, parm, level = 0.95, …)cooks.distance(model, ...)cumsum(x)curve()do.call(what, args)dplyr::%>%dplyr::filter()dplyr::mutate()dplyr::select()dplyr::transmute()hatvalues(model, ...)hist()lapply(X, FUN, ...)lmtest::bptest(model, ...)ls(name, all.names = FALSE)ls.str(name, all.names = FALSE)mapply(FUN, ...)new.env(parent = parent.frame())par()plot()poly(x, ..., degree = 1, raw = FALSE)replicate(n, expr, simplify = "array")rstandard(model, ...)sapply(X, FUN, ..., simplify = TRUE, USE.NAMES = TRUE)search()shapiro.test(x)sprintf(fmt, ...)step(object, scope, direction)subset(x, subset, select, drop = FALSE, …)tapply(X, INDEX, FUN, …)with(data, expr, ...)within(data, expr, ...)
Index
- Apply functions apply/
- Arrays and Matrices array/
- Attributes attributes/
- Basic math math/
- Basics basics/
- CLI cli/
- Cheat sheets cheatsheet/
- Classes class/
- Data Frame data-frame/
- Environments environment/
- Error Handling error/
- Factors factor/
- Format format/
- Functions function/
-
Generalized Linear Models (
glm) glm/ - Graphical procedures plot/
-
Linear Models (
lm) lm/ - Lists list/
- Model Formulae formula/
- NA na/
- Packages packages/
- Print print/
- R Language Definition language/
- R Markdown markdown/
- Vectors vector/
- dplyr dplyr/
- help help/
- length length/
- options options/
- stopifnot stopifnot/