[R] Plotting Lines Through multiple groups
Timothy Bates
timothy.c.bates at gmail.com
Wed Sep 28 10:25:00 CEST 2011
if it was me, i'd do
library("ggplot2")
df <- read.table(pipe("pbpaste"), header=T, sep='\t')
df$Animus=factor(df$Animal, labels=c("Tom", "Dick", "Harry"))
qplot(Day, Cort, data = df, geom="line", colour=Animus)
On Sep 28, 2011, at 8:03 AM, clara_eco wrote:
> 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.
More information about the R-help
mailing list