Is there a more efficient way to loop this code in R?

后端 未结 0 797
灰色年华
灰色年华 2021-01-25 19:48

For example, I rewrite this loop

my.kernel <- function(v){
    for (x in 1:length(v)) {
      v[x] <- ifelse(abs(v[x]) <= 1, (35/32)*(1 - v[x]^2)^3, 0)
          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题