Professional Documents
Culture Documents
RM Lab (Vanshika)
RM Lab (Vanshika)
Concatenate Elements
You can also concatenate, or join, two or more
elements, by using the paste() function
To combine both text and a variable ,R uses
comma(,)
R Data Types
[Type here]
Variable can store data of different types,
and different types can do different things.
num<-30 # num is a type of numeric
num<-“sally” # num is now of type character
or string
# Syntax: num<-string1
# Example: num<-3456.8
Class (num)
#Output: “numeric”
R Vectors
A vector is simply a list of items that are of
the same type.
To combine the list of items to a vector, use
the c () function and separate the items by a
comma.
[Type here]