What is a list in R?
Choose an option to check your answer.
Lists can contain vectors, data frames, functions, or even other lists.
This flexibility makes them useful for complex analysis results.
Browse exam-wise, subject-wise, and country-wise MCQs with explanations.
Choose an option to check your answer.
Lists can contain vectors, data frames, functions, or even other lists.
This flexibility makes them useful for complex analysis results.
Choose an option to check your answer.
cbind() binds objects by column and therefore adds variables horizontally.
Rows should correspond correctly across the combined objects.
Choose an option to check your answer.
rbind() binds objects by row and therefore adds observations vertically.
The participating objects must have compatible columns.
Choose an option to check your answer.
rep() creates repeated sequences or repeated individual elements.
It is useful for constructing labels and simulated data.
Choose an option to check your answer.
seq() can specify the starting value, ending value, step size, or desired length.
This makes it suitable for non-unit and fractional sequences.
Choose an option to check your answer.
The colon operator creates a regular sequence with a step of one.
It is commonly used for indexing and simple iteration.
Choose an option to check your answer.
Many R operations automatically work across every element of a vector.
Vectorized code is usually clearer and often faster than manual looping.
Choose an option to check your answer.
The logical condition identifies qualifying rows, and the blank column position keeps all columns.
The dollar sign accesses the age variable within df.
Choose an option to check your answer.
nrow() reports the number of observations in a rectangular object.
Its companion ncol() reports the number of columns.
Choose an option to check your answer.
head() provides a quick view of the beginning of an object.
It helps verify column names and sample values without printing everything.
Choose an option to check your answer.
Ordered factors represent categories such as low, medium, and high.
The order is meaningful even when distances between levels are not numeric.
Choose an option to check your answer.
Factors store categorical values together with their possible levels.
They are useful in summaries, models, and grouped visualizations.