In R, type the expression that keeps every row of orders but only the order_id and amount columns.
In R, type the expression that keeps every row of orders but only the order_id and amount columns.
Answer
orders[, c("order_id", "amount")]
Blank before the comma is all rows; the name vector after it picks the columns. A 12 × 2 data frame.