Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以下做同样的事情。什么时候使用地图,什么时候使用?
library(dplyr) library(purrr) mtcars %>% map(function(x) sum(x)^2)
或者:
mtcars %>% apply(2,function(x) sum(x)^2)