 

I have two problems with svyhist.  I hope this is easy, and it may be
that "simple R syntax" will do what I need.

 

1) I'm able to get a single plot out, but I need to put two
distributions in the same graphic to visually compare them.  

 

2) I get uniform breaks at intervals of 10.  I can plot the unweighted
data using MyBreaks with hist as shown in the second code snippet

 

 

######################################

SurveyData <- read.table("C:/Data/R/RADAMdata2.csv", header=TRUE,
sep=",", na.strings="NA", dec=".", strip.white=TRUE)

DsnRADAM <- svydesign(id = ~RADAM.TAZ, weights = ~RADAM2005Pct, data =
SurveyData)

DsnLAWA    <- svydesign(id = ~RADAM.TAZ,  weights = ~LAWA2005Pct,
data = SurveyData)

MyBreaks <- c(0,5,10,15,20,30,40,50,60,80,100,120)



svyhist(~Miles2LAX, DsnRADAM, breaks=MyBreaks, main="Survey
weighted",col="purple",ylim=c(0,0.05))

svyhist(~Miles2LAX, DsnLAWA,     breaks=MyBreaks, main="Survey
weighted",col="cyan",   ylim=c(0,0.05))



#####################################

SurveyData <- read.table("C:/Data/R/RADAMdata2.csv", header=TRUE,
sep=",", na.strings="NA", dec=".", strip.white=TRUE)

MyBreaks <- c(0,5,10,15,20,30,40,50,60,80,100,120)

hist(SurveyData$Miles2LAX, breaks = MyBreaks, main = paste("Histogram of
unweighted distances" ) )

#####################################















Robert Farley

Metro

1 Gateway Plaza

Mail Stop 99-23-7

Los Angeles, CA 90012-2952

Voice: (213)922-2532

Fax:    (213)922-2868

www.Metro.net 






	[[alternative HTML version deleted]]


