1

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?

L N
  • 11
  • 3

1 Answers1

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