Skip to contents

Print, summary, and plot methods for objects returned by pcop().

Usage

# S3 method for class 'pcop'
print(x, ...)
# S3 method for class 'pcop'
summary(object, ...)
# S3 method for class 'summary.pcop'
print(x, ...)
# S3 method for class 'pcop'
plot(x, ...)

Arguments

x

A pcop or summary.pcop object.

object

A pcop object.

...

Additional arguments passed to methods. For plot.pcop(), arguments are passed to graphics::plot.

Value

print.pcop(), print.summary.pcop(), and plot.pcop() return their input invisibly. summary.pcop() returns a compact summary object.

Examples

set.seed(1)
x <- runif(100, -1, 1)
x <- cbind(x, x ^ 2 + rnorm(100, sd = 0.1))
fit <- pcop(x, plot.true = FALSE)

print(fit)
#> Principal curve of oriented points
#> Dimension: 2 
#> Curve points: 14 
#> Ch: 1.5 Cd: 0.3 
summary(fit)
#> Principal curve of oriented points summary
#> Dimension: 2 
#> Curve points: 14 
#> Projected points: 100 
#> Ch: 1.5 Cd: 0.3 
if (interactive()) {
  plot(fit)
}