I imported a 70104 x 1 matrix with hourly wind speeds into r. I am trying to fit various energy distributions to the data. however, when I try to fir the models, this error comes up "data must be a numeric vector of length greater than 1". How do I rectify this issue?
Asked
Active
Viewed 2,381 times
1
L N
- 11
- 3
-
2It would help to see some code. In particular, the function you are using to fit models. – neilfws Apr 04 '18 at 02:57
1 Answers
2
We can just wrap with c to convert it to a vector
v1 <- c(mat)
Or explicitly use as.vector to strip off the dim attributes
as.vector(mat)
data
set.seed(24)
mat <- matrix(rnorm(70104))
akrun
- 874,273
- 37
- 540
- 662