1 > add four = function(x){x+4}
This is an R function. Functions accept arguments and return values in accordance with their purpose. In this example, we consider a function addfour, which accepts any data type x which supports addition with a scalar in R. This includes matrices, vectors, etc. Write your own simple function to find the cube of its input.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here