I\'ve been trying to write a program in R that implements Newton\'s method. I\'ve been mostly successful, but there are two little snags that have been bothering me. Here\'s m
Josh has answered your question
For part 2 you could have used
g <- expression( sin(x) ) g[[1]] # sin(x) f <- function(x){ eval( g[[1]] ) } f(0) # [1] 0 f(pi/6) # [1] 0.5