After typing:
glm.fit=glm(Y[[1]]~.,data=X)
library("boot")
glmE=cv.glm(X,glm.fit,K=3)
I get the following error:
Error in model.frame.default(formula = Y[[1]] ~ ., data = list(x1 = c(1L, : długości zmiennych różnią się (znaleziono dla 'x1')
The last line is: variable lengths differ (found for 'x1')
X is the data frame of inputs (predictors), and Y is the output data frame. I have this problem with real data, just put this for simplicity.
What should I change to make it work, preferably without merging inputs and outputs(X,Y) ?