vendredi 29 novembre 2019

Why does lapply(file_list, function(i){} not work?

Why does this not work? Thanks for help. I got this message. Why Error in [.data.frame(true, rep(NA_integer_, length(condition)))

a = 350
b = 250
Track <- lapply(file_list, function(T1) {
  if_else (T1[2] > 0, 
           round(((acos((T1[1]-a)/sqrt(((T1[1]-a)^2)+((T1[2]-b)^2))))
                  *(180/pi)),
                 digits = 0), 
           round(((-acos((T1[1]-a)/sqrt(((T1[1]-a)^2)+((T1[2]-b)^2))))
                  *(180/pi))+360,
                 digits = 0)
  )
})

Aucun commentaire:

Enregistrer un commentaire