hadley / adv-r

Advanced R: a book

Home Page:http://adv-r.hadley.nz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Functionals.Rmd Exercise 9.4.6#3 vars should be nm

yogat3ch opened this issue · comments

mtcars[vars] <- map(vars, ~ trans[[.x]](mtcars[[.x]]))

nm was the variable defined with the column names so it should read:
mtcars[nm] <- map(nm, ~ trans[[.x]](mtcars[[.x]]))