Hi David,

I am trying to define t as a single numeric value and not as a vector.. I
want the function to realise that if I call test(t) and t is less than equal
10 return zero, if t greater than 10 return 2*t. Am i missing some code in
which to define t a numeric value instead of a vector?

Also, I thought that by defining test <- function(t) {...} I was defining t
as the argument of the function?

Thanks,
Dean

--
View this message in context: 
http://r.789695.n4.nabble.com/Plotting-a-function-that-includes-logical-operators-tp3697732p3698464.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@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.

Reply via email to