search for: tp3697732p3698464

Displaying 1 result from an estimated 1 matches for "tp3697732p3698464".

2011 Jul 27
2
Plotting a function that includes logical operators
I am trying to plot the following function over the range 0-100 test <- function(t){{ if (t<=10) x<-t*0 else x<-2*t } x } when I use plot(test,0,100) the GUI produces the following; "Warning message: In if (t <= 10) x <- t * 0 else x <- 2 * t : the condition has length > 1 and only the first element will be used" I am confused as when I evaluate the function