1/52
Looks like no tags are added yet.
!
Equivalent to not
[]
Selects specific items in the dataset
Where is rows and columns in []
[row, column]
exclude = NULL
Separates NA into their own category
dim()
Shows the number rows then columns
nrow()
Tells you the number of rows
data.frame()
Puts variables into a data set
select()
Picks columns
filter()
Picks rows
level()
Shows the categories for vairables labelled factors
table()
Counts the number of observations for each unique category
colSums()
Sums up the values in each column
ggplot(penguins, aes(x=flipper, y=body)) +
geom_point(color = “blue”, alpha = 0.6))
Makes every point blue
ggplot(penguins, aes(x=flipper, y=body))+
geom_point(aes(color = “blue”))
Creates a legend with the word blue
If alpha is placed inside aes()
Legend is made, and chracteristics not applied because it assumes it’s a variable
If alpha or colour is placed outside aes()
No legend is made, and characteristics applied
facet_wrap(~variable)
Adds multiple separate graphs with the same axis

face_grid(variable~variable)
Creates a grid of graphs between two variables
cor(x,y)
Finds pearson’s correlation
lm(y~x)
Predicts linear mnodel
sample()
Randomly picks numbers`
function()
Named chunk of code that can be ran
quantile(c(lower, upper))
Finds intervals
pnorm()
Gives area under the standard normal curve below z (you put in a z score)
qnorm()
Gives z scores from an area from the left side
position
the bars dodge each other and allows visualization of the raw sample size
%
Feeds study one through another function
paired = TRUE
Columsn are matched
var.equal = TRUE
Variance are equal, useful for student’s pooled-variance t-test
as_tibble()
Adds features and cleans up presentation when you call it
labs()
Renames the axis, legend titles
fill = variable_name
Filsl in data based on the different variables
!is.na()
Excludes NA values
use = “complete.obs”
Ignore rows with NAs
se = FALSE
Doesn’t show the standard error
se = TRUE
Shows the standard error
coef()
Pulls out intercept and slope
sample(#:#, size = #)
Randomly picks # values from #:#
replace = TRUE
Replaces values
2*pnorm(-abs(z))
Calculates two tailed p value
pnorm(1.96, lower.tail = FALSE)
Gives area above 1.96
round()
Prints a rounded output
qt()
Finds tcritical value based on the value and df
pt()
Finds the p value for the given value
na_if(x,value)
Replaces x with NA
bp_post = na_if(bp_post, -999)
Within bp_post, replace -999 into NA
mutate()
Creates new columns, edits, or delete column in a dataframe
mutate(change = bp_post - bp_pre)
Makes a new difference score column
t-test(y,x)
Performs a Student’s or Welch’s two sample t-test
aov( y ~ group, data = dataframe)
Performs a one-way ANOVA
qf(alpha, df1 = group, df2 = error)
Calculate the critical F at set alpha value
filter(!is.na(bp_pre)
Filters out NA
Pr(>F)
Probability of F value being greater or equal to