greg
p.s. ggplot2 can unfortunately not handle objects from the package
"survey". i got this message if i try to plot a weighted survey
sample: "ggplot2 doesn't know how to deal with data of class
survey.design2survey.design".
if this would work, my problem would be probably solved by itself.
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: http://gist.github.com/270442
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
indeed. dealing with sampling weigths is not trivial. and i see that
> > p.s. ggplot2 can unfortunately not handle objects from the package
> > "survey". i got this message if i try to plot a weighted survey
> > sample: "ggplot2 doesn't know how to deal with data of class
> > survey.design2survey.design".
> > if this would work, my problem would be probably solved by itself.
>
> I doubt it; dealing with sampling weights is a nontrivial task. You would
> likely get that message by using any package specific data object that does
> not have a ggplot() method written for it. After all, there are over 2500
> contributed CRAN packages, many of which define their own object classes.
ggplot2 is not able to understand every object classes on CRAN. but,
ggplot2 is by far the best graphic package. i've never seen high
quality outputs like this before. i love them.
and survey is the most popular package to analyse complex samples. for
me - and i hope for many more too - it would be fantastic, if ggplot2
would know how to handle objects of the package survey...
thanks for any new idea to solve my problem with the sampling weights
greg
--
Here's a function (well, a function + a helper function) that should
take a data frame with subjects' responses and weights, and return a
nicely plottable ggplot.
https://gist.github.com/661249
And a possibly more legible and certainly less source()able HTML version:
http://sietse.krikkert.net/sample.html
I'm not familiar with the sample package, so I have no clue whether
this function can easily be reworked to take
survey.design2survey.design objects. I hope it can!
Cheers, and good luck,
Sietse
Sietse Brouwer