[R] Making plot with "sub"-X values
joe1985
johannes at dsr.life.ku.dk
Fri Feb 13 14:50:43 CET 2009
Hello
I have a big dataset where i have pulled out some periods of time acording
to a herd-number (see below):
CHR_NR DATO_TEST SALMO_INDEX didiffdatoperiode
11377 2003-06-20 7.9 29
11377 2003-09-01 4.3 59
11377 2004-02-24 5.1 78
where the variable 'diffdatoperiode' is the period in days and represents
the x-value and 'CHR_NR' is the herd number.
These periods corresponds to a sum of periods in the variable 'diffdato1',
and each of these periods have an y-value represented by the variable
'SALMO_INDEX':
CHR_NR DATO_TEST SALMO_INDEX diffdato diffdato1
11377 2003-05-22 17.0 14 15
11377 2003-06-06 18.8 15 14
11377 2003-07-04 20.1 14 17
11377 2003-07-21 32.9 17 14
11377 2003-08-04 19.9 14 14
11377 2003-08-18 10.5 14 14
11377 2003-12-08 20.5 27 29
11377 2004-01-06 28.6 29 8
11377 2004-01-14 28.6 8 8
11377 2004-01-22 19.0 8 7
11377 2004-01-29 19.0 7 7
11377 2004-02-05 14.4 7 7
11377 2004-02-12 14.4 7 12
So, 29 = 15 +14, 59 = 17 + 14 + 14 +14 and 78 = 29 + 8 + 8+ +7 +7 +7 + 12.
So i need a plot where the y-axis is the 'SALMO_INDEX' corresponding to the
values in 'diffdato1', and the x-axis is the 'diffdato' and 'difdato1' at
the same time. So the periods in 'diffdato1' is kind of like "sub"-x values
to the periods in 'diffdato'. So the plot should be created like if the
three values 29, 59 and 78 each had a x-axis, but together in one x-axis.
It's a little bit hard to expalin.
Hope you can help me
--
View this message in context: http://www.nabble.com/Making-plot-with-%22sub%22-X-values-tp21996730p21996730.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list