I solved that. I had some columns that all their values were NA or the same. I dropped them and it went OK. my columns classes were character, numeric and factor.
candidatesnodata.index <- c()
for (j in (1 : ncol(dataframe))) {
if ( is.numeric(dataframe[ ,j]) & length(unique(as.numeric(dataframe[ ,j]))) == 1 )
{candidatesnodata.index <- append(candidatesnodata.index,j)}
}
dataframe <- dataframe[ , - candidatesnodata.index]