Packages/plots Flashcards
Install packages?
install.packages(“”)
Confirmation message of loading the package/load installed package?
require()
No confirmation message but load package?
library()
Loading many packages simultaneously with pacman?
pacman : : o_load()
Clean up a package with pacman?
p_unload()
Clean up base packages?
detach (“”, unload = TRUE)
Get help in something?
?function
Plotting on a specific categorical variable?
plot(dataset$Var)
Plotting a quantitative variable?
plot(dataset$Var.Var)
Plot with two variables?
plot(dataset$Var, dataset$Var)
Plot the entire dataset?
plot(dataset)
Plotting mathematical formulas?
plot(function, min, max)
Bar plot?
barplot(
Histogram?
hist(dataset)
Put graphs in x rows and y columns?
par(mfrow = c(x, y))