Dear R experts,
 
I am trying to do linear extrapolation on a dataset like the attached document. 
I looked at the approx and approxfun function that seem to do this function, 
but not fully understand them. I was wondering if someone could help with 
writing commands to do the following based on the attached file's example:
 
ID#1 and ID #2 both have response parameters ("MEASUREMENT" in the Book1.txt 
file) for a given time point ("TIME (hours)" in the Book1.txt file). Using 
linear extrapolation I would like to be able to compute the percent time spent 
in the "MEASUREMENT" range of 9 to 10, for ID#1 and ID#2, together 
and individually.  
 
in the attached simple example, if I did the calculation then the results 
would be:
 
1;  66% for ID #1 and 100% for ID#2, individually. This is the 1st value I 
would like to compute
 
2; Combined together the results would be the average of 66% and 100%, which 
equals to  83%, This is the 2nd value I would like to compute
 
all of your help is apreciated,
 
thanks,
 
Andras
ID#     TIME (hours)    MEASUREMENT
1       0       8
1       24      9
1       48      10
1       72      9
2       0       9
2       24      10
2       48      10
2       72      10
______________________________________________
[email protected] 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.

Reply via email to