How to make this function code run quick in R - should be around 1 second and its around 19 now

前端 未结 0 689
情书的邮戳
情书的邮戳 2021-01-24 17:24
# BEGIN CODE
my.kernel <- function(Yt){
  for (i in 1:length(Yt)) {
    Yt[i] <- ifelse(abs(Yt[i]) <= 1, (35/32)*(1 - Yt[i]^2)^3, 0)}
  Yt}

Pr

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