~/ learn/ afm-112/ cards/ Equal-length columns, $, nrow, dim, names
1 of 10

In R, with prov4 and amount4 defined, type the call that builds the data frame mini with columns order_id (1001 to 1004), prov and amount.

In R, with prov4 and amount4 defined, type the call that builds the data frame mini with columns order_id (1001 to 1004), prov and amount.

Answer

mini <- data.frame(order_id = 1001:1004, prov = prov4, amount = amount4)

Each name = vector pair becomes a column; all three must have length 4. Printing mini shows the header row and row names 1–4.

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/2270a971-773d-43fd-9d95-c1c72fdac053/flashcard utf-8 LF