在binaryratings2中,有9724个obs,包含610个变量,在genre_matrix3中,有9741个obs,包含18个变量。我遇到类似longer object length is not a multiple of shorter object length
的错误。我该怎么解决?
#Calculate dot product for User Profiles
result = matrix(0,18,706)
for (c in 1:ncol(binaryratings2)){
for (i in 1:ncol(genre_matrix3)){
result[i,c] <- sum((binaryratings2[,c]) * (genre_matrix3[,i]))
}
}