阅读背景:

使用“apply”函数执行带有R中的条件语句的代码

来源:互联网 

I have been working on a project for which I need to find peaks and valleys in a dataset (not just the highest numbers per column, but all of the peaks and valleys). I did manage to get it to work on 1 column, but I use a for-loop for that and I need to do this for about 50 columns, so I think I should use an 'apply' function. I just don't know how to do so. Can I put 'if' statements and such in an 'apply' function?I have been working on a project for which I ne




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: