1/47
A comprehensive set of vocabulary flashcards covering R programming basics, including mathematical and logical operators, data types, data structures, control flow (loops and conditionals), and the apply family of functions.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
seq()
A function used to define numeric sequences using arguments such as from, to, and by.
%/%
The mathematical operator for integer division.
%%
The mathematical operator for modulo (remainder) division.
NaN
An indicator representing an undefined value or 'Not a Number.'
NA
An indicator representing a missing value.
NULL
An indicator representing an empty set or object.
%*%
The mathematical operator used for matrix multiplication.
xor()
A logical function representing the 'exclusive or' operation.
&& and ||
Logical operators that can only be used to compare inputs of length 1.
& and |
Logical operators used to compare elements of two vectors component-wisely.
typeof()
A function used to check the internal data type of an object.
logical
A data type representing Boolean values: TRUE and FALSE.
character
A data type used for character strings, such as "text".
factor
A data type used for texts, strings, or numbers that represent categories.
integer
A data type specifically for whole numbers, such as 3.
double (numeric)
A data type for integers or real numbers, such as −2×exp(1).
complex
A data type for complex numbers, such as 2−1i.
as.character()
A function used to convert an object to a character data type.
Vector
A basic data structure in R that does not allow mixing of different data types.
rep()
A function used to replicate elements of vectors, including arguments for 'times' and 'each'.
matrix()
A function used to define a matrix, with options for nrow, ncol, and byrow.
cbind()
A function used to combine objects by columns.
rbind()
A function used to combine objects by rows.
dim()
A function that returns the dimensions (number of rows and columns) of a matrix or data frame.
solve(X)
A function used to calculate the inverse of a matrix X.
t(X)
A function used to calculate the transpose of a matrix X.
array()
A data structure that can contain an arbitrary number of dimensions.
list()
A flexible data structure that can contain elements of different data types and structures.
data.frame
The central data structure for data sets, consisting of a list of vectors of the same length.
str()
A function that returns the internal structure of a data object.
subset()
A function used to create a subset of a data frame based on logical conditions.
identical()
A function used to check whether two objects are exactly equal.
order()
A function that returns a permutation to rearrange an argument into ascending or descending order.
any()
A logical operation that returns TRUE if at least one component of a logical vector is TRUE.
all()
A logical operation that returns TRUE if all components of a logical vector are TRUE.
which()
A function that returns the indices of each component where a logical condition is TRUE.
function()
The keyword used to define a custom function with specified parameters.
return()
A statement used to explicitly specify the value that a function should return.
… (dots)
An argument used in function definitions to allow an unspecified number of expected arguments.
if … else
A conditional statement used to execute specific command sequences based on a logical condition.
ifelse()
A vectorized version of the if-else statement used for vector-valued evaluation of conditions.
for loop
A loop structure used to repeat commands when the exact number of iterations is known.
while loop
A loop structure used to repeat operations as long as a specific condition remains TRUE.
repeat loop
A loop structure that repeats an instruction sequence until a break condition is encountered.
apply()
A function that applies another function to the margins (rows or columns) of an array or matrix.
lapply()
A function that applies another function component-wise to a list, data set, or vector and returns a list.
sapply()
A function that behaves like lapply() but returns the output as a vector or a matrix.
tapply()
A function that applies another function to each group of values defined by unique factor levels.