QUESTION IMAGE
Question
5 multiple choice 1 point
in r, to select specific columns from a data frame, we use the syntax: dfrows,columns. what do we put in the \columns\ part to select multiple columns by their indices?
an asterisk (*) to select all columns.
a single number representing the column index.
a string representing the column name.
a vector of column indices.
In R, when using the df[rows, columns] syntax to select multiple columns by their indices, a vector of column indices is used. An asterisk (*) selects all columns (not specific multiple columns by indices). A single number selects one column. A string representing the column name selects by name, not index.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
D. A vector of column indices.