I\'ve got a function that uses readline to ask people to enter in data. But I\'m at a loss as to the best method to insure that the data entered meet my criteria. I\'m figuring
In R the boolean types TRUE
and FALSE
can also be represented by T
and F
. So first off try changing the variables that you have named T
to something sensible... like x
maybe???
Secondly, in your typeof(x)
argument, you called the variable T, so that won't work. In addition there were no quotes around numeric. Try if(!(is.numeric(x)))
Thirdly, your variables are inconsistently named, V and V, and then V1 and V2. Aside from hard to read, it also just won't work.
Lastly, your return statement needs a second closing parenthesis, the function code block needs a closing curly brace.