I have the following dataframe named train
in R:
rsro xo x1 x2 x3 rv br
4 0 0 0 0 8.4467 0.3337061885
1 1 0 0 0 8.0676 0.3435027205
0 0 0 0 0 9.0288 0.2894759898
0 1 0 1 0 8.7164 0.3014924009
0 2 0 0 0 7.9183 0.3894641113
I'm training a neural net algorithm with this call:
nn=neuralnet(rsro ~ xo + x1 + x2 + x3 + rv + br,
data=train, linear.output=F, hidden = c(4,2))
But I get this error:
Error in neurons[[i]] %*% weights[[i]] : requires numeric/complex matrix/vector arguments
I have checked all my variables, and there are no missing values and they are all numeric. There have been several other questions here about this error, but all seemed to be solved by eliminating missing or non-numeric values. How do I fix this?