Learn R Programming

condvis (version 0.2-2)

makepath: Make a path through predictor space to guide conditional tour

Description

Make a path through predictor space to guide conditional tour

Usage

makepath(Xc, ncentroids, ninterp = 4)

Arguments

Xc
a dataframe
ncentroids
number of centroids or prototype points to summarise the data
ninterp
number of points to interpolate between the centroids/prototypes, defaults to 4.

Value

  • centroidscentroids or prototype points to summarise the data
  • pathfinal path interpolated between centroids

See Also

condtour

Examples

Run this code
d <- data.frame(x = runif(500), y = runif(500))
plot(d)
mp1 <- makepath(d, 5)
points(mp1$centers, type = "b", col = "blue", pch = 16)
mp2 <- makepath(d, 40)
points(mp2$centers, type = "b", col = "red", pch = 16)

Run the code above in your browser using DataLab