Skip to content
Prev 173755 / 398503 Next

plotting question

On Mar 14, 2009, at 5:46 PM, David Winsemius wrote:

            
# oops, also need to preface with:
library(lattice)
Could also do it separately for each ID group. Something like  
(untested):

with(subset(dta, ID==1), plot(Year,V1, pch=3) )
with(subset(dta, ID==2), points( Year, V1, pch=5))

   # but that could get tiring for many ID
> reshape(dta, idvar="ID", timevar="Year",direction="wide")
   ID V1.1980 V1.1981 V1.1982 V1.1983
1  1       1       2       6       4
5  2       5       5       5       6
David Winsemius, MD
Heritage Laboratories
West Hartford, CT