(a) Investigate the frequency distributions for the categorical predictors.
I have tried the below but can’t seem to get it to work. Any ideas on how to fix this?
library(mlbench)
data(Soybean)
str(Soybean)
soy = Soybean[,-c(1,2)]
> table(soy)
Error in table(soy) : attempt to make a table with >= 2^31 elements
par(mfrow = c(17, 2))
for (i in 1:34) {
hist(soy[ ,i], xlab = names(soy[i]), main = paste(names(soy[i]), "Histogram"), col="deepskyblue")
}
Error in hist.default(soy[, i], xlab = names(soy[i]), main = paste(names(soy[i]), :
'x' must be numeric
> barplot(prop.table(table(soy)))
Error in table(soy) : attempt to make a table with >= 2^31 elements
What am I doing wrong?