This area discusses popular functions used in RStudio

(sum(! – count of non-missing values
ggplot(data = mpg) + geom_point(mapping = aes(x = displ, y = hwy, color = class))
as.character() changes type to be character
as.integer() changes type to be integer
c() creates a vector
c() creates a vector (concatenate, combine)
class() returns objects type > class(1) [1] “numeric”
data() view available datasets
exp() computes the exponential function
filter() subset observations based on values
ggplot() ggplot(data = ) + (mapping = aes())
head() first 6 lines
is.vector(x) returns TRUE if x is a vector
length() – how many entries are in the vector
library() loads library into workspace (must be installed first)
log(x, base)
ls() list variables assigned in workspace
match() tells which indexes of vector B match each of the entries of vector A:
max() largest value
mean() calculates the average of all vector elements
names() gives names to values in a vector so they can be referenced by name
nrow(), number of rows
order() returns the vector of indexes (helpful w/ a sorted vector)
rank() returns a vector with the rank of the entries (1st, 2nd, etc)
rm() remove from workspace
seq(1,10,2) creates vector from 1 to 10 jump by 2 > [1] 1 3 5 7 9
sort() sorts from least to most
sqrt() square root of a value
str() – displays structure of object
sum(x, y, z) adds llist of numbers
table() takes a vector and returns the frequency of each element.
tail(x, 1), last element of a vector
View() displays object as a spreadsheet
which.max() for the index of the largest value
which() convert vectors of logicals into indexes – tells which entries are TRUE.
with(data, expr, …) Evaluate data with an expression