I would like to evaluate my model with the function of the package Recommenderlab
scheme <- evaluationScheme(UserByProductRRM, method = "cross-validation", k = 10, given =-1 , goodRating = 4)
but I don't understand why I have this error
Error in sample.int(length(x), size, replace, prob) : invalid 'size' argument
Perhaps your dataset (UserByProductRRM) has lines with only 0s. You must delete those lines. In RealRatingMatrix or BinaryRatingMatrix all lines must have at least one 1. Try rowSums function to detect lines with only 0s.