Quantcast

linear extrapolation using data from imported text file

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

linear extrapolation using data from imported text file

Andras Farkas
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
______________________________________________
[hidden email] 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.

Book1.txt (134 bytes) Download Attachment
Loading...