[R] Plotting Multiple Factors By Dates With Lattice
arun
smartpink111 at yahoo.com
Thu Aug 15 22:44:16 CEST 2013
Hi Rich,
It's better to dput() your dataset. From what you showed:
burns.date.ffg<- read.table(text="
'sampdate','func_feed_grp','pct'
'2000-07-18','Filterer',0.0351
'2000-07-18','Gatherer',0.7054
'2000-07-18','Grazer',0.0442
'2000-07-18','Predator',0.1078
'2000-07-18','Shredder',0.1074
'2003-07-08','Filterer',0.1570
'2003-07-08','Gatherer',0.7039
'2003-07-08','Grazer',0.0023
'2003-07-08','Predator',0.0456
'2003-07-08','Shredder',0.0912
'2005-07-13','Filterer',0.0293
'2005-07-13','Gatherer',0.6634
'2005-07-13','Grazer',0.0055
'2005-07-13','Predator',0.0552
'2005-07-13','Shredder',0.2466
'2006-06-28','Filterer',0.0414
'2006-06-28','Gatherer',0.4776
'2006-06-28','Grazer',0.1033
'2006-06-28','Predator',0.2012
'2006-06-28','Shredder',0.1765
'2010-09-14','Filterer',0.0811
'2010-09-14','Gatherer',0.5785
'2010-09-14','Grazer',0.0284
'2010-09-14','Omnivore',0.0131
'2010-09-14','Parasite',0.0018
'2010-09-14','Predator',0.0736
'2010-09-14','Shredder',0.2234
'2011-07-13','Filterer',0.0041
'2011-07-13','Gatherer',0.9011
'2011-07-13','Grazer',0.0563
'2011-07-13','Omnivore',0.0100
'2011-07-13','Parasite',0.0037
'2011-07-13','Predator',0.0247
'2011-07-15','Filterer',0.0385
'2011-07-15','Gatherer',0.8469
'2011-07-15','Grazer',0.0147
'2011-07-15','Omnivore',0.0005
'2011-07-15','Parasite',0.0197
'2011-07-15','Predator',0.0688
'2011-07-15','Shredder',0.0109
'2012-07-11','Filterer',0.1275
'2012-07-11','Gatherer',0.5030
'2012-07-11','Grazer',0.0257
'2012-07-11','Omnivore',0.0008
'2012-07-11','Predator',0.1464
'2012-07-11','Shredder',0.1966
",sep=",",header=TRUE)
burns.date.ffg$sampdate<- as.Date(as.character(burns.date.ffg$sampdate))
library(lattice)
xyplot(pct~sampdate|func_feed_grp,data=burns.date.ffg) #no error
#or
xyplot(pct~sampdate,data=burns.date.ffg,groups=func_feed_grp,pch=1:7,type="l")
#or
xyplot(pct~sampdate|func_feed_grp,data=burns.date.ffg,groups=func_feed_grp,type="l")
A.K.
----- Original Message -----
From: Rich Shepard <rshepard at appl-ecosys.com>
To: arun <smartpink111 at yahoo.com>
Cc:
Sent: Thursday, August 15, 2013 4:23 PM
Subject: Re: [R] Plotting Multiple Factors By Dates With Lattice
On Thu, 15 Aug 2013, arun wrote:
> #or
> xyplot(pct~sampdate|func_feed_grp,data=burns.date.ffg,groups=func_feed_grp,type="l")
A.K.,
That's still producing the same error, but now I have more to look at.
Thanks,
Rich
--
Richard B. Shepard, Ph.D. | Have knowledge, will travel.
Applied Ecosystem Services, Inc. |
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
More information about the R-help
mailing list