Functions
Summary of used functions in the course sorted by the order of appearance in the course.
General functions
round()- round a number to a specified number of decimal places-
abs()- absolute value of a number -
typeof()- type of the object as.*()- conversion between data typesc()- combine values into vectorlength()- length of vector-
min(),max(),mean(),sum()- calculate descriptive statistics of numeric vector -
read.csv()- read a CSV file and create a data frame write.csv()- write a data frame to a CSV fileis.na()- return logical vector ofTRUEandFALSEvalues, whereTRUEmeans that the value isNAtable()- count the unique values of a vector-
unique()- return unique values of a vector -
install.packages()- install packages from CRAN -
library()- load package in session -
names()- return the names of the columns in a data frame plot(),hist(),barplot()- basic plots
Spatial functions - sf package
st_read()- read a spatial file and create ansfobjectst_bbox()- calculate the bounding box of the geometriesst_crs()- return the coordinate reference system of the datast_transform()- transform the data to another coordinate reference systemst_area()- calculate the area of the geometriesst_perimeter()- calculate the perimeter of the geometriesst_write()- write ansfobject to a spatial file