[R] y needing more than 2 functions

Aimee Jones alj27 at hoyamail.georgetown.edu
Tue Mar 27 01:48:07 CEST 2012

Dear all,

I'm aware if y has two separate functions (depending on the conditions
of x) you can use the ifelse function to separate y into two separate
functions depending on input. How do you do this if there a multiple
different conditions for x?

for example,

y fits the following between t>0 & t<15----->function(t) t^2, y fits
the following between t>15 & t<30-----> function(t) t^3, y fits the
following between t>30 &t<45--->function(t) t^4 etc

Thanks for any help you are able to give,
yours sincerely,

More information about the R-help mailing list