SUNY Geneseo Department of Mathematics
Tuesday, September 23
Math 221 10
Fall 2014
Prof. Doug Baldwin
curve
function in R?curve( expression, low, high, ...options... )
add=TRUE
option adds new curve to existing plotcol="colorname"
option sets color of linexname="variablename"
option specifies name of variable in expression to vary for plotting> curve( pi - 2/x^2, -10, 10 )
> curve( x^3, -5, 5, add=TRUE, col="red")
> curve( y^2, -10, 10, xname="y", add=TRUE, col="orange")
ylim=c(low, high)
option sets range of Y values to show> curve( pi - 2/x^2, -10, 0, ylim=c(2,4))
rm
function does it> x = 1
> x
[1] 1
> rm(x)
> x
Error: object 'x' not found