24 Built-In Functions in R Every Data Enthusiast Should Know

Common Built-In Functions In R 

all() : This function returns TRUE if all values are TRUE

any() : This function in R returns TRUE even if any of the values is TRUE

args() : This function gives information on the arguments to a function

cat() : This function prints multiple objects, one object after another

cumprod() : This function gives cumulative product

cumsum() : This function gives cumulative sum

diff() : This function in R forms vector of first differences. To note: Diff(X) has one less element than x

history() : This functions gives you a list of the commands that you have used previously

is.factor() : It returns TRUE if the argument is a factor

is.na() : returns TRUE if the argument is NA

length() : It tells you the number of elements in a vector or in a list

ls() : It gives list names of objects in the workspace

mean() : Gives mean of the elements of vector

median() :Gives median of the elements of vector

print() : It prints a single R object

range() : It gives the minimum and maximum value elements of a vector

sort() : It sorts elements into order, by default it omits NAs

rev() : It reverses the order of vector elements

str() : It gives you information on R object

unique() : This function forms the vector of distinct values

which() : This built in function in R locates TRUE indices of logical vectors

which.max() : It locates first maximum of a numeric vector

which.min() :It locates first minimum of a numeric vector

with() : This function does the computation using columns of specified data frame

Content curated by Payal Sachdeva
Contact: payal@planetanalytics.in