How to deal with character(0) in R

Hi,

I am doing User based collaborative filtering in R by using the recommenderlab package. I am using very small data for testing. My datasets has on;y 11 users and 9 items.
below is my code for recommendation model

library("recommenderlab")

r<- as(data,"realRatingMatrix")

r

fit<-Recommender(r[1:10], method = "UBCF")

rec <- predict(fit, r[], n=5)

Now when i am displaying

as(rec, "list")

It shows me character (0) error.

Can you just please identify me what wrong i have done? why it is showing character (0) instead of proper value.

any suggestion is really appreciable.

Thanks,
snandy2011

It will help if make a reproducible example of your problem. See FAQ: What's a reproducible example (`reprex`) and how do I do one? for advice on doing this.