How do I use arguments of a function when using sapply?

前端 未结 2 1124
滥情空心
滥情空心 2021-01-22 09:49

I have a dataset which I created by column binding using the cbindX function from the gdata package. This function allows me to bind columns with diffe

2条回答
  •  萌比男神i
    2021-01-22 10:25

    You should read ?sapply manual. Below example of sapply with some extra arguments:

    sapply(allcolscomb, sd, na.rm=TRUE)
    sapply(allcolscomb, function(x) sd(x, na.rm=TRUE))
    

提交回复
热议问题