Reputation: 591
I am trying to generate a plot from my data set that gives the correlation between my variables.
I am using the library GGally. here is my one line code.
ggpairs(Imputed_data, title = "Scatterplot Matrix for the features of data Set")
I am getting a error
_bin()
using
bins = 30. Pick better value with
binwidth`.
My data set has 14 variables, 13 are numeric and 1 is a factor variables.
I could understand that there is a problem with declaration of bins, that I should mention (bins=10) But, I am struck how I should do it in my code. I am new to R programming.
Upvotes: 0
Views: 3762
Reputation: 2167
I have dataframe of 33 variables I got a similar question
Following things helped me
Getting errors when plotting using ggpairs
Here it is explained how, to configure ggpair we have to pass binwidth parameter to stat_bin() using params .
In my case i followed another explanation on https://github.com/ggobi/ggally/issues/184
Following code worked for me
ggpairs(t, aes(colour = V33, alpha = 0.2), lower=list(combo=wrap("facethist",
binwidth=0.5)))
here i am coloring using a factor variable V33 alpha is 0.2 and binwidth 0.5
I did not find anywhere what binwidth does exactly. But in my understanding it should be something regarding size.
Upvotes: 1