Learn R Programming

kubik (version 0.2.0)

13_print_and_plot_methods: Print and Plot Methods

Description

Print and plot methods, for chs-related objects.

Usage

# S3 method for kspline
print(x, …)

# S3 method for kspline plot(x, …, control.points=FALSE) # S3 method for kspline lines(x, …, control.points=FALSE) # S3 method for kspline points(x, …)

Arguments

x

A kspline object, which is the superclass of chs, chs.derivative and chs.integral objects.

control.points

If true, plot the control points (for chs objects), or their corresponding points (for chs.derivative and chs.integral objects).

Other arguments.

Details

The print method calls intoo::object.summary, if the intoo package is on the search path.

Otherwise, it calls the default print method.

References

Please refer to the help page for chs for background information and references.

See Also

chs

Examples

Run this code
# NOT RUN {
#control points
cx <- 1:4
cy <- c (-4, -1, 1, 4)

#cubic hermite spline
#(with function object, and default slopes)
f <- chs (cx, cy)

#plot the object
#(with control points)
plot (f, control.points=TRUE)
# }

Run the code above in your browser using DataLab