On Mon, Sep 14, 2009 at 5:19 AM, Schalk Heunis <schalk.heu...@enerweb.co.za>wrote:
> Chris > try this (assume your dataset is in a dataframe called ms): > library(lattice) > xyplot(Value~Time|Name,data = ms) > > HTH > Schalk > > > > On Mon, Sep 14, 2009 at 2:19 AM, Chris Li <chri...@austwaterenv.com.au>wrote: > >> >> Hi all, >> >> I am new to R and I have got a question in regards to factors. >> >> Say I have a simple dataset like the following: >> >> Name Time Value >> a 1:00 1.25 >> a 2:00 1.26 >> b 1:00 1.29 >> b 2:00 1.28 >> c 1:00 1.21 >> c 1:30 1.20 >> c 2:00 1.23 >> >> I want to write a script that automatically plot value against time for a, >> b >> and c. Because I have got more than 1 datasets, therefore the name of the >> next dataset may consist d, e, h and g. So I will need a script that can >> detect the changes in Name automatically. >> >> Thank you very much for your time. >> >> Chris >> -- >> View this message in context: >> http://www.nabble.com/Question-about-Factors-tp25428665p25428665.html >> Sent from the R help mailing list archive at Nabble.com. >> >> ______________________________________________ >> R-help@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >> > > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.