R programming Flashcards
(37 cards)
Variables can be created using what assignment operator?
<- or =
True or False (Modified)
Variables are case-sensitive
True
True or False (Modified)
The data-type of the variables is determined by the type of character stored in the variable.
False. Type of data stored
What are the three major data types
character, numeric, and logical
It an object-oriented. A number or a result of an operation inside an object denoted by a variable.
Scalar
Set elements that usually of the same type or class
Vector
A unique identifier of the function
function-name
required input
arguments
It is a special type of vector that can contain objects of different classes.
List
It occurs when different objects are mixed in vector, so that every element in the vector is of the same class
coercion
vectors with a dimension attribute
matrices
True or False.
a matrix is constructed column-wise. entries can be thought of starting in the upper left corner running down the columns
true
Represent categorical ddata. It can be unordered or ordered.
factor
the nth element in a vector
x[n]
specific elements in a vector x in kth, nth, mth order
x[c(k,n,m)]
x[m:n]
the mth to nth element in vector x
x[x>m & x<n]
elements between m and n
the rth row and cth column of the x matrix
x[r,c]
the 1st and 3rd row and 4th and 6th column elements of x matrix
x[c(1,3), c(4,6)]
the entire rth row (including all columns)
x[r,]
prints the nth member of the list
x[[n]]
represented as special type of list where elements of the kist must be the same length
data frame
must have every element of the same class
matrices
aside from $ operator in calling variables in data frame, what is the other alternative
attach ()