setwd() |
Use it to set the work directory to folder with stored data |
read.csv() |
Use it to import and open a .csv excel spreadsheet |
write.csv() |
Use it to export and save data as a .csv excel spreadsheet |
data.frame() |
Use it to create data frame object |
View() |
Use it to examine your data set in a data viewer |
merge() |
Use it to merge two data frames together |
c() |
Use it to create a list of data items to create a vector object |
exp() |
A simple mathematical function - exponential |
log() |
A simple mathematical function - logarithmic |
head() |
Use on data frame to see the first couple of row observations |
tail() |
Use on data frame to see the last couple of row observations |
min() |
Use on variable to see the lowest value |
max() |
Use on variable to see the highest value |
seq() |
Use it to generate a sequence of numbers |
cut() |
Use it to class or categorize a continuous variable |
table() |
Create a table, or to perform cross-tabulation |
cumsum() |
Compute the cumulative sums of a variable |
hist() |
Plot a histogram |
plot() |
Make a general plot |
axis() |
Supplementary code making custom plots for axis. Follow-up to plot() |
polygon() |
Supplementary code making custom plots for areas under curves. Follow-up to plot() |
lines() |
Used as a follow-up to plot() to add a line/curve to a plot |
abline() |
Used as a follow-up to plot() to add vertical/horizontal lines to a plot |
colnames() |
To rename columns |
summmary() |
Reports the min, max, median, mean, and IQRs |
sd() |
Reports the standard deviation |
boxplot() |
Plot a box plot |
dnorm() |
Generates a normal distribution from mean & standard deviation |
pnorm() |
Predicts probability under a normal distribution |