Fix this error in the next version `Error in x[, 2] : subscript out of bounds` when X is a data.frame