Althe majority of everything in R is done via attributes. Here I"m just refering to numeric and also character functions that are commonly supplied in developing or recoding variables.

(To exercise working with functions, attempt the attributes sections of this this interenergetic course.)

## Numeric Functions

 Function Description abs(x) absolute worth sqrt(x) square root ceiling(x) ceiling(3.475) is 4 floor(x) floor(3.475) is 3 trunc(x) trunc(5.99) is 5 round(x, digits=n) round(3.475, digits=2) is 3.48 signif(x, digits=n) signif(3.475, digits=2) is 3.5 cos(x), sin(x), tan(x) additionally acos(x), cosh(x), acosh(x), and so on. log(x) natural logarithm log10(x) widespread logarithm exp(x) e^x

## Character Functions

 Function Description substr(x, start=n1, stop=n2) Extract or rearea substrings in a character vector. x substr(x, 2, 4) is "bcd" substr(x, 2, 4) continuous expression. If fixed=TRUE then pattern is a text string. Returns equivalent indices. grep("A", c("b","A","c"), fixed=TRUE) retransforms 2 sub(pattern, replacement, x, neglect.case =FALSE, fixed=FALSE) Find pattern in x and rearea with replacement message. If fixed=FALSE then pattern is a continual expression. If addressed = T then pattern is a text string. sub("\s",".","Hello There") returns "Hello.There" strsplit(x, split) Split the aspects of character vector x at split. strsplit("abc", "") retransforms 3 aspect vector "a","b","c" paste(..., sep="") Concatenate strings after using sep string to seperate them. paste("x",1:3,sep="") retransforms c("x1","x2" "x3") paste("x",1:3,sep="M") returns c("xM1","xM2" "xM3") paste("Today is", date()) toupper(x) Uppercase tolower(x) Lowercase

## Statistical Probcapability Functions

The adhering to table describes attributes regarded probaility distributions. For random number generators below, you deserve to use set.seed(1234) or some other integer to develop reproducible pseudo-random numbers.