Skip to content
Prev 192140 / 398500 Next

Howto Superimpose Multiple Density Curves Into One Plot

It looks like the data has other columnnames than the samplecode you provided.

Use colnames(dat) to get the columnnames. Replace V1 with the columnname of the values and V2 with the column name of the ID's.

HTH,

Thierry


----------------------------------------------------------------------------
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest
Cel biometrie, methodologie en kwaliteitszorg / Section biometrics, methodology and quality assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium
tel. + 32 54/436 185
Thierry.Onkelinx at inbo.be
www.inbo.be

To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey

-----Oorspronkelijk bericht-----
Van: Gundala Viswanath [mailto:gundalav at gmail.com] 
Verzonden: woensdag 2 september 2009 14:33
Aan: ONKELINX, Thierry
CC: r-help at stat.math.ethz.ch
Onderwerp: Re: [R] Howto Superimpose Multiple Density Curves Into One Plot

Hi Thierry,

Thanks for the reply. I tried this:
But I got such error:
Error in density.default(data$x, adjust = adjust, kernel = kernel, weight = data$weight,  :
  need at least 2 points to select a bandwidth automatically
Error in density.default(data$x, adjust = adjust, kernel = kernel, weight = data$weight,  :
  need at least 2 points to select a bandwidth automatically
Error: could not find function "facet_wrap"
Error in density.default(data$x, adjust = adjust, kernel = kernel, weight = data$weight,  :
  need at least 2 points to select a bandwidth automatically
Error: could not find function "facet_wrap"

Maybe I miss something? What could possibly go wrong?

- Edward
On Wed, Sep 2, 2009 at 8:30 PM, ONKELINX, Thierry<Thierry.ONKELINX at inbo.be> wrote:
Druk dit bericht a.u.b. niet onnodig af.
Please do not print this message unnecessarily.

Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer 
en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is
door een geldig ondertekend document. The views expressed in  this message 
and any annex are purely those of the writer and may not be regarded as stating 
an official position of INBO, as long as the message is not confirmed by a duly 
signed document.