[R] DISPLAYING A HISTOGRAM + finding NAs
Augusto.Sanabria at ga.gov.au
Augusto.Sanabria at ga.gov.au
Wed Apr 5 01:06:02 CEST 2006
Mark,
To solve your problem I would get rid of
missing values in the obs vector 'obsv' first:
obsv < obsv[!is.na(obsv)]
I would then set up the xaxis: xval < max(obsv)
Then I would plot a probabilistic histogram:
Hist(obsv,breaks=xval,freq=FALSE)
Notice that the probabilities in the yaxis
are calc. as: prob yi = Freq obs(i)/(all obs)
Hope it helps.
Augusto
Original Message
From: rhelpbounces at stat.math.ethz.ch
[mailto:rhelpbounces at stat.math.ethz.ch] On Behalf Of mark salsburg
Sent: Wednesday, 5 April 2006 3:59 AM
To: Rhelp at stat.math.ethz.ch
Subject: [R] DISPLAYING A HISTOGRAM + finding NAs
I have a vector of values (about 8000 obs between 0 and 1). I want to display
a histogram as follows:
value of vector
( bw 0 and 1) 




______________________________________
all 8000 obs.
So that each section of the x axis corresponds to a certain value...
When I use hist(vector) it outputs out a frequency histogram. I tried
transposing it with no luck.
Any ideas??
Also, I'm told I have a missing value in my vector, how do I remove that
observation??? (i.e. how do I search within my vector to find it???)
thank you in advance,,,,
[[alternative HTML version deleted]]
______________________________________________
Rhelp at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/rhelp
PLEASE do read the posting guide! http://www.Rproject.org/postingguide.html
More information about the Rhelp
mailing list