You are on page 1of 2

Input Return Value # c(1,2,3) 123 1:3 123 b 123 a=4 4 a<-4 4 objects() abc names() length(b) 3 rm(a)

hist(a) exists("a") TRUE log() exp() sqrt() abs() sin() cos() sd() median() mean(b) 2 max(b) 3 min(b) 1 range() sum() args(mean) help.search("mean") help("mean") ?mean

Notes Defines a comment Creates a vector Creates an array between a and b Returns the values of an object Defines an object Defines an object Returns all the objects in the workspace Returns the names of all the elements in the object Returns the length of an object Removes an object from the workspace Creates a histogram of a previously defined object Returns TRUE or FALSE depending on whether the objects exists

Average of a object Max of a object Min of a object

Returns the arguments of a particular function Searches the help database for the text string specified Returns the help page for only the function specified Equivalent to help("")

pi

3.141593

You might also like