- Create ‘function()’ and assess arguments
g <- function(x) {
return(x+1) } #create function
formals(g) #formal argument list
## $x
body(g) #body of function(), must be of class "expression"
## {
## return(x + 1)
## }
g #printing object to the screen
## function(x) {
## return(x+1) }
- ‘function()’ h created, arguments assest, object printed
h <- function(x) {
return(x+1)} #create function
formals(g) #formal argument list
## $x
body(g) #body of function(), must be of class "expression"
## {
## return(x + 1)
## }
g #printing object to the screen
## function(x) {
## return(x+1) }
- This function adds one or more straight lines through the current
plot.
?abline() # to get decription
## starting httpd help server ... done
# abline(a = NULL, b = NULL, h = NULL, v = NULL, reg = NULL, coef = NULL, untf = FALSE, ...)