[R] Plotting Lines Through multiple groups

Eik Vettorazzi E.Vettorazzi at uke.de
Wed Sep 28 11:21:42 CEST 2011


Hi Clara,
are there repeated measures of an animal on the same day?
Otherwise I did not get the point of the level of aggregation.

Using lattice you can do sth like
xyplot(Cort~Day,groups=Animal,type=c("p","a"),data=df)

but with your given data this just connects the raw points

hth.

Am 28.09.2011 08:03, schrieb clara_eco:
> Hi I have data in the following format
> Cort Day Animal
> 23    0      1
> 27    3      1
> 24    0      2
> 27    1      2
> 34    2      2
> 30    3      2
> 24    4      2
> 20    0      3
> 24    1      3
> 28    2      3
> 34    4      3
> etc.
> It is measured across time(day) however no every individual is measured the
> same number of times.  All I want to do is plot the Raw data and then run a
> line connecting the data points of each individual animal, for the example
> above there would be three lines as there are three animals.
> I've tried, gplots, lattice and car but I'm not really figuring it out, any
> help would be greatly appreciated!
> 
> Thanks 
> Clara
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/Plotting-Lines-Through-multiple-groups-tp3850099p3850099.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at 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.


-- 
Eik Vettorazzi
Institut für Medizinische Biometrie und Epidemiologie
Universitätsklinikum Hamburg-Eppendorf

Martinistr. 52
20246 Hamburg

T ++49/40/7410-58243
F ++49/40/7410-57790

--
Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG):

Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg

Vorstandsmitglieder: Prof. Dr. Jörg F. Debatin (Vorsitzender), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus 



More information about the R-help mailing list