~/ learn/ afm-112/ cards/ ?mean, defaults, and the first R gotcha
1 of 12

In R, type the call that rounds 511.6667 to two decimals, naming the digits argument.

In R, type the call that rounds 511.6667 to two decimals, naming the digits argument.

Answer

round(511.6667, digits = 2)

Prints [1] 511.67. Named, the arguments can go in any order: round(digits = 2, x = 511.6667) is the same call. The default digits = 0 would give 512.

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/33e4a1a3-6fb9-459a-b60a-edb60d9a7653/flashcard utf-8 LF