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

前端 未结 2 1093
滥情空心
滥情空心 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条回答
  •  感情败类
    2021-01-22 10:06

    Try this.

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

    in the apply family functions the syntax is (data, fun, ...). The three dots are "ellipsis", they are there to host the arguments of the function passed to the apply's function.

提交回复
热议问题