My table is data.combined with following structure:
\'data.frame\': 1309 obs. of 12 variables: $ Survived: Factor w/ 3 levels \"0\",\"1\",\"None\": 1 2 2
I had the same issue but none of the above solutions worked. Then I noticed that the column of the data frame I wanted to use for the histogram wasn't numeric:
df$variable<- as.numeric(as.character(df$variable))
Taken from here