When merging two dataframes i get the following error:
votes <- as.data.frame(RFM$votes)
origin <- as.data.frame(RFM$y)
colnames(origin)[1] <- 'origin'
fit_score <- merge(votes,origin, by.x=row.names, by.y=row.names)
Error in as.vector(x, mode) :
cannot coerce type 'closure' to vector of type 'any'
Does anyone understand the error and knows how to solve?