Essential R Commands¶
Section |
Command |
Explanation |
Link |
---|---|---|---|
R Basics |
|
Addition, subtraction, muliplication, division |
|
R Basics |
|
Exponentiation |
|
R Basics |
|
Assignment |
|
R Basics |
|
Determine the data type of |
|
R Basics |
|
Create an atomic vector with multiple elements |
|
R Basics |
|
Determine the length of the atomic vector |
|
R Basics |
|
Sum the values of the atomic vector |
|
R Basics |
|
Determine the mean of the atomic vector |
|
R Basics |
|
Determine the miniomum and maximum (respectively) of the atomic vector |
|
Data Frames |
|
Install a new package called |
|
Data Frames |
|
Load a pre-installed package called |
|
Data Frames |
|
Read in data from a csv file ( |
|
Data Frames |
|
Read in data from an Excel file ( |
|
Data Frames |
|
Count the number of rows of the |
|
Data Frames |
|
Count the number of columns of the |
|
Data Frames |
|
Determine the dimensions of the |
|
Data Frames |
|
Output the first and last few rows (respectively) of the |
|
Data Frames |
|
Output the structure of the |
|
Data Frames |
|
Return an atomic vector of the |
|
Data Frames |
|
Convert the atomic vector |
|
Data Frames |
|
Convert the atomic vector |
|
Data Frames |
|
Sort the dataframe |
|
Data Frames |
|
Filter the dataframe |
|
Data Frames |
|
Select columns |
|
Exploring Data |
|
Determine the median of the atomic vector |
|
Exploring Data |
|
Determine the specified quantiles (in |
|
Exploring Data |
|
Calculate the standard deviation and variance (respectively) of the atomic vector |
|
Exploring Data |
|
Tabulate the count and proportion (respectively) of the atomic vector |
|
Exploring Data |
|
Tabulate the count and proportion (respectively) of the atomic vector |
|
Exploring Data |
|
Create a histogram of the atomic vector |
|
Exploring Data |
|
Create a boxplot of the atomic vector |
|
Exploring Data |
|
Create a side-by-side boxplot of the atomic vector |
|
Exploring Data |
|
Create a scatter plot of |
|
Exploring Data |
|
Create a barplot of the atomic vector |
|
Exploring Data |
|
Create a pie chart of the atomic vector |
|
Wrangling & Visualization with the tidyverse |
|
Chain multiple tidyverse operations together |
|
Wrangling & Visualization with the tidyverse |
|
Calculate summary statistics ( |
|
Wrangling & Visualization with the tidyverse |
|
Group tidyverse operations by the |
|
Statistical Inference |
|
Conduct a one-sample t-test of means |
|
Statistical Inference |
|
Conduct a one-sample proportions test |
|
Statistical Inference |
|
Conduct a two-sample t-test of means, where |
|
Statistical Inference |
|
Conduct a two-sample proportions test |
|
Causal Inference |
|
Perform a power calculation based on the effect size ( |
|
Linear Regression |
|
Calculate the correlation between the atomic vectors |
|
Linear Regression |
|
Calculate the correlation between the atomic vectors |
|
Linear Regression |
|
Create a linear regression model called |
|
Linear Regression |
|
Calculate 95% confidence intervals for the regression coefficients in the model |
|
Linear Regression |
|
Summarize the regression model |
|
Linear Regression |
|
Apply the regression model |
|
Logistic Regression |
|
Create a logistic regression model called |
|
Logistic Regression |
|
Apply the logistic regression model |
|
Logistic Regression |
|
Calculate the log loss of a model whose predictions are stored in |
|
Tree Models |
|
Create a decision tree model called |
|
Tree Models |
|
Visualize the decision tree model |
|
Model Evaluation |
|
Define a random split of the dataframe |
|
Model Evaluation |
|
Calculate the accuracy of a model whose predictions are stored in |
|
Model Evaluation |
|
Calculate the confusion matrix of a model whose predictions are stored in |
|
Model Evaluation |
|
Calculate the area under the curve (AUC) of a model whose predictions are stored in |