mhahsler / recommenderlab

recommenderlab - Lab for Developing and Testing Recommender Algorithms - R package
213 stars 61 forks source link

RECOM_RANDOM why not assign rownames? #35

Closed aliko-str closed 5 years ago

aliko-str commented 5 years ago
## create random ratings (Z-scores)
ratings <- matrix(rnorm(nrow(newdata)*ncol(newdata)),
  nrow=nrow(newdata), ncol=ncol(newdata),
  dimnames=list(NULL, model$labels))

Why NULL in dimnames, and not user ids? as(ratings, "data.frame") fails without row names.

mhahsler commented 5 years ago

Thank you for the bug report. This is now fixed in the development version on GitHub.

There is no coercion from topNList to data.frame. Coerce the topNlist into a list or a matrix.