I think that if you don't convert the year to a factor, it should show up.
Coverting to a factor I think effectively relabels the years as 1-9 rather
than 1970, 1972, etc. Also, I was trying to get a boxplot distribution
for each of the years, so I hink that if you have more than one datapoint
per year, it should be automoatic...I think.
Olivia.
On Fri, 3 Jan 2003, Nirmala Ravishankar wrote:
I just tried that but its still not labeling all the
years. When I define
the variable as a factor, it labels them as 1, 2 ....9. How do I get the
actual year to show up?
y$yr <- as.factor(y$year)
plot.default(y$yr, y$psi)
On Fri, 3 Jan 2003, Olivia Lau wrote:
Why don't you plot it in a regular plot
instead? When I did it
using plot.default(), all the labels show up for the years on the x
axis, because it's plotting each factor as a separate level.
I think Phil's solution labels each individual plot. For example, if
you're plotting dpct ~ dpct.last | year, you should get 9 plots, one for
each year, labled with 1970, 1972, etc. if year is a character string.
I have yet to find a good application of a lattice graphic for this final,
other than showing that I can do one. 8(
<bleh>
Olivia.
On Fri, 3 Jan 2003, Nirmala Ravishankar wrote:
Quick question: were any of you successful in getting all the years to
show up on the x-axis of your xyplot? All the dots show up, but the
corresponding labels don't. On the x-axis, it shows levels (1970, 1975,
1980) eventhough I am using a character variable for year.
Any ideas?
- N
_______________________________________________
gov1000-list mailing list
gov1000-list(a)fas.harvard.edu
http://www.fas.harvard.edu/mailman/listinfo/gov1000-list
_______________________________________________
gov1000-list mailing list
gov1000-list(a)fas.harvard.edu
http://www.fas.harvard.edu/mailman/listinfo/gov1000-list