diff --git a/DESCRIPTION b/DESCRIPTION index be622e8d..d4c69189 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: tourr Title: Tour Methods for Multivariate Data Visualisation -Version: 0.6.18 +Version: 1.0.0 Authors@R: c( person("Hadley", "Wickham", email = "h.wickham@gmail.com", role = c("aut", "ctb"), comment = c(ORCID = "0000-0003-4757-117X")), person("Dianne", "Cook", email = "dicook@monash.edu", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-3813-7155")), diff --git a/NEWS.md b/NEWS.md index 9cfccb72..b35fd097 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +# tourr 1.0.0 + +* Small changes in prep for CRAN +* Time for it to be a full version number + # tourr 0.6.18 * Changed line colours to take a factor, and be handled the same as points. diff --git a/R/display-andrews.r b/R/display-andrews.r index ca7ed9d1..5c24c000 100644 --- a/R/display-andrews.r +++ b/R/display-andrews.r @@ -36,6 +36,7 @@ andrews <- function(x) { #' Andrew's curves, see \code{\link{andrews}} #' #' @param col color to be plotted. Defaults to "black" +#' @param palette name of color palette for point colour, used by \code{\link{hcl.colors}}, default "Zissou 1" #' @param ... other arguments passed on to \code{\link{animate}} #' @seealso \code{\link{animate}} for options that apply to all animations #' @keywords hplot @@ -47,7 +48,7 @@ andrews <- function(x) { #' #' # It's easy to experiment with different tour paths: #' animate_andrews(flea[, 1:6], guided_tour(cmass())) -display_andrews <- function(col = "black", ...) { +display_andrews <- function(col = "black", palette = "Zissou 1", ...) { grid <- NULL init <- function(data) { grid <<- seq(-pi, pi, length = 50) diff --git a/R/display-density.r b/R/display-density.r index b2208dbb..1921cde0 100644 --- a/R/display-density.r +++ b/R/display-density.r @@ -10,7 +10,7 @@ #' If not set, defaults to maximum distance from origin to each row of data. #' @param col color to use for points, can be a vector or hexcolors or a factor. Defaults to "black". #' @param rug draw rug plot showing position of actual data points? -#' @param palette name of color palette for point colour, used by \code{\link{grDevices::hcl.colors}}, default "Zissou 1" +#' @param palette name of color palette for point colour, used by \code{\link{hcl.colors}}, default "Zissou 1" #' @param density_max allow control of the y range for density plot #' @param bw binwidth for histogram and density, between 0-1, default 0.2 #' @param scale_density Height of density is scaled at each projection, default FALSE diff --git a/R/display-density2d.r b/R/display-density2d.r index dee6827a..b2f9f90d 100644 --- a/R/display-density2d.r +++ b/R/display-density2d.r @@ -13,7 +13,7 @@ #' @param pch shape of the point to be plotted. Defaults to 20. #' @param cex size of the point to be plotted. Defaults to 1. #' @param contour_quartile Vector of quartiles to plot the contours at. Defaults to 5. -#' @param palette name of color palette for point colour, used by \code{\link{grDevices::hcl.colors}}, default "Zissou 1" +#' @param palette name of color palette for point colour, used by \code{\link{hcl.colors}}, default "Zissou 1" #' @param ... other arguments passed on to \code{\link{animate}} and #' \code{\link{display_density2d}} #' @importFrom graphics contour diff --git a/R/display-faces.r b/R/display-faces.r index 99077387..5c72e62b 100644 --- a/R/display-faces.r +++ b/R/display-faces.r @@ -13,10 +13,11 @@ #' @examples #' # The drawing code is fairly slow, so this animation works best with a #' # limited number of cases -#' animate_faces(flea[1:2, 1:6]) -#' animate_faces(flea[1:4, 1:6]) +#' flea_s <- rescale(flea[,1:6]) +#' animate_faces(flea_s[1:2, 1:6]) +#' animate_faces(flea_s[1:4, 1:6]) #' -#' animate_faces(flea[1:2, 1:6], grand_tour(5)) +#' animate_faces(flea_s[1:2, 1:6], grand_tour(5)) display_faces <- function(...) { if (!requireNamespace("TeachingDemos", quietly = TRUE)) { stop("Please install the TeachingDemos package", call. = FALSE) diff --git a/R/display-groupxy.r b/R/display-groupxy.r index 9e35a92f..1c7202c5 100644 --- a/R/display-groupxy.r +++ b/R/display-groupxy.r @@ -17,19 +17,21 @@ #' @param cex size of the point to be plotted. Defaults to 1. #' @param group_by variable to group by. Must have less than 25 unique values. #' @param plot_xgp if TRUE, plots points from other groups in light grey -#' @param palette name of color palette for point colour, used by \code{\link{grDevices::hcl.colors}}, default "Zissou 1" +#' @param edges.col colour of edges to be plotted, Defaults to "black" +#' @param edges.width line width for edges, default 1 +#' @param palette name of color palette for point colour, used by \code{\link{hcl.colors}}, default "Zissou 1" #' @param ... other arguments passed on to \code{\link{animate}} and #' \code{\link{display_groupxy}} #' @export #' @examples -#' f <- flea[, 1:6] -#' col <- rainbow(length(unique(flea$species)))[as.numeric(as.factor(flea$species))] -#' pch <- as.numeric(flea$species) + 14 -#' -#' animate_groupxy(f, col = col, pch = pch, group_by = flea$species) -#' animate_groupxy(f, col = col, pch = pch, group_by = flea$species, plot_xgp = FALSE) +#' animate_groupxy(flea[, 1:6], col = flea$species, +#' pch = flea$species, group_by = flea$species) +#' animate_groupxy(flea[, 1:6], col = flea$species, +#' pch = flea$species, group_by = flea$species, +#' plot_xgp = FALSE) display_groupxy <- function(centr = TRUE, axes = "center", half_range = NULL, - col = "black", pch = 20, cex = 1, edges = NULL, + col = "black", pch = 20, cex = 1, + edges = NULL, edges.col = "black", edges.width=1, group_by = NULL, plot_xgp = TRUE, palette = "Zissou 1", ...) { labels <- NULL @@ -43,6 +45,12 @@ display_groupxy <- function(centr = TRUE, axes = "center", half_range = NULL, edges.gps <- edges.col edges.col <- mapColors(edges.col, palette) } + # If shapes are a variable, convert shapes + if (is.factor(pch)) { + shapes <- mapShapes(pch) + } else { + shapes <- pch + } init <- function(data) { half_range <<- compute_half_range(half_range, data, centr) @@ -77,13 +85,30 @@ display_groupxy <- function(centr = TRUE, axes = "center", half_range = NULL, blank_plot(xlim = c(-1, 1), ylim = c(-1, 1)) draw_tour_axes(proj, labels, limits = 1, axes) + # add a legend, only if a variable was used + if (is.factor(gps)) { + numcol <- unique(col) + if (length(numcol) > 1) { + legend("topright", legend=unique(gps), + col=numcol, pch=15) + } + } + if (is.factor(pch)) { + numpch <- unique(shapes) + if (length(numpch) > 1) { + legend("bottomright", legend=unique(pch), + col="black", pch=unique(shapes)) + } + } if (ngps < 2) { - points(x, col = col, pch = pch, cex = cex, new = FALSE) + points(x, col = col, pch = shapes, cex = cex, new = FALSE) if (!is.null(edges)) { segments( x[edges[, 1], 1], x[edges[, 1], 2], - x[edges[, 2], 1], x[edges[, 2], 2] + x[edges[, 2], 1], x[edges[, 2], 2], + col = edges.col, + lwd = edges.width ) } } @@ -91,14 +116,14 @@ display_groupxy <- function(centr = TRUE, axes = "center", half_range = NULL, for (i in 1:ngps) { x.sub <- x[group_by == gps[i], ] col.sub <- if (length(col) == nrow(x)) col[group_by == gps[i]] else col - pch.sub <- if (length(pch) == nrow(x)) pch[group_by == gps[i]] else pch + pch.sub <- if (length(shapes) == nrow(x)) shapes[group_by == gps[i]] else shapes cex.sub <- if (length(cex) == nrow(x)) cex[group_by == gps[i]] else cex blank_plot(xlim = c(-1, 1), ylim = c(-1, 1)) if (plot_xgp) { points(x[group_by != gps[i], ], col = "#DEDEDEDE", new = FALSE, - pch = if (length(pch) > 1) pch[group_by != gps[i]] else pch, + shapes = if (length(shapes) > 1) shapes[group_by != gps[i]] else shapes, cex = if (length(cex) > 1) cex[group_by != gps[i]] else cex ) } @@ -107,7 +132,9 @@ display_groupxy <- function(centr = TRUE, axes = "center", half_range = NULL, if (!is.null(edges)) { segments( x[edges[group_by == gps[i], 1], 1], x[edges[group_by == gps[i], 1], 2], - x[edges[group_by == gps[i], 2], 1], x[edges[group_by == gps[i], 2], 2] + x[edges[group_by == gps[i], 2], 1], x[edges[group_by == gps[i], 2], 2], + col = edges.col[group_by == gps[i]], + lwd = edges.width ) } } diff --git a/R/display-pca.r b/R/display-pca.r index 4bc3ae5a..e898c2cf 100644 --- a/R/display-pca.r +++ b/R/display-pca.r @@ -17,12 +17,12 @@ #' @param edges A two column integer matrix giving indices of ends of lines. #' @param edges.col colour of edges to be plotted, Defaults to "black. #' @param rescale Default FALSE. If TRUE, rescale all variables to range [0,1]. -#' @param palette name of color palette for point colour, used by \code{\link{grDevices::hcl.colors}}, default "Zissou 1" +#' @param palette name of color palette for point colour, used by \code{\link{hcl.colors}}, default "Zissou 1" #' @param ... other arguments passed on to \code{\link{animate}} and #' \code{\link{display_slice}} #' @export #' @examples -#' flea_std <- scale(flea[, 1:6]) +#' flea_std <- apply(flea[,1:6], 2, function(x) (x-mean(x))/sd(x)) #' flea_pca <- prcomp(flea_std, center = FALSE, ) #' flea_coefs <- flea_pca$rotation[, 1:3] #' flea_scores <- flea_pca$x[, 1:3] diff --git a/R/display-sage.R b/R/display-sage.R index bbdc71bd..10c456e0 100644 --- a/R/display-sage.R +++ b/R/display-sage.R @@ -12,7 +12,7 @@ #' @param gam scaling of the effective dimensionality for rescaling. Defaults to 1. #' @param R scale for the radial transformation. #' If not set, defaults to maximum distance from origin to each row of data. -#' @param palette name of color palette for point colour, used by \code{\link{grDevices::hcl.colors}}, default "Zissou 1" +#' @param palette name of color palette for point colour, used by \code{\link{hcl.colors}}, default "Zissou 1" #' @param ... other arguments passed on to \code{\link{animate}} and #' \code{\link{display_sage}} #' @export diff --git a/R/display-slice.r b/R/display-slice.r index 761ac7b3..2628ede9 100644 --- a/R/display-slice.r +++ b/R/display-slice.r @@ -23,7 +23,7 @@ #' If NULL (default) the slice will be anchored at the data center. #' @param anchor_nav position of the anchor: center, topright or off #' @param rescale Default FALSE. If TRUE, rescale all variables to range [0,1]. -#' @param palette name of color palette for point colour, used by \code{\link{grDevices::hcl.colors}}, default "Zissou 1" +#' @param palette name of color palette for point colour, used by \code{\link{hcl.colors}}, default "Zissou 1" #' @param ... other arguments passed on to \code{\link{animate}} and #' \code{\link{display_slice}} #' @export diff --git a/R/display-trails.r b/R/display-trails.r index 6aa6abf9..1688626c 100644 --- a/R/display-trails.r +++ b/R/display-trails.r @@ -17,6 +17,9 @@ #' @param ... other arguments passed on to \code{\link{animate}} and #' \code{\link{display_xy}} #' @export +#' @examples +#' animate_trails(flea[,1:6], col=flea$species) +#' display_trails <- function(center = TRUE, axes = "center", half_range = NULL, col = "black", pch = 20, cex = 1, past = 3, ...) { # Inherit most behaviour from display_xy. This is a little hacky, but diff --git a/R/display-xy.r b/R/display-xy.r index 95d83843..b3038db6 100644 --- a/R/display-xy.r +++ b/R/display-xy.r @@ -15,7 +15,7 @@ #' @param edges.col colour of edges to be plotted, Defaults to "black" #' @param obs_labels vector of text labels to display #' @param edges.width line width for edges, default 1 -#' @param palette name of color palette for point colour, used by \code{\link{grDevices::hcl.colors}}, default "Zissou 1" +#' @param palette name of color palette for point colour, used by \code{\link{hcl.colors}}, default "Zissou 1" #' @param ... other arguments passed on to \code{\link{animate}} and #' \code{\link{display_xy}} #' @importFrom graphics legend @@ -25,7 +25,8 @@ #' animate(flea[, 1:6], tour_path = grand_tour(), display = display_xy()) #' animate(flea[, 1:6], #' tour_path = grand_tour(), -#' display = display_xy(axes = "bottomleft") +#' display = display_xy(), +#' scale = TRUE #' ) #' animate(flea[, 1:6], #' tour_path = grand_tour(), @@ -44,7 +45,7 @@ #' #' animate_xy(flea[, -7], col = flea$species) #' animate_xy(flea[, -7], col = flea$species, -#' pch = as.numeric(flea$species)) +#' pch = flea$species) #' #' animate_xy(flea[, -7], col = flea$species, #' obs_labels=as.character(1:nrow(flea)), axes="off") diff --git a/R/manual_slice.r b/R/manual_slice.r index f8c4c083..aa10ac61 100644 --- a/R/manual_slice.r +++ b/R/manual_slice.r @@ -15,7 +15,7 @@ #' @param half_range half range to use when calculating limits of projected. #' If not set, defaults to maximum distance from origin to each row of data. #' @param anchor_nav position of the anchor: center, topright or off -#' @param palette name of color palette for point colour, used by \code{\link{grDevices::hcl.colors}}, default "Zissou 1" +#' @param palette name of color palette for point colour, used by \code{\link{hcl.colors}}, default "Zissou 1" #' @param ... other options passed to output device #' @export #' @examples diff --git a/R/path-dist.r b/R/path-dist.r index 6a7b4461..9c1eb19e 100644 --- a/R/path-dist.r +++ b/R/path-dist.r @@ -5,7 +5,8 @@ #' @examples #' # This code is to be used as an example but you should increase #' # the max from 2 to 50, say, to check tour coverage. -#' grand <- interpolate(save_history(flea[, 1:6], max = 2), 0.2) +#' flea_std <- apply(flea[,1:6], 2, function(x) (x-mean(x))/sd(x)) +#' grand <- interpolate(save_history(flea_std, max = 2), 0.2) #' # The grand tour ----------------------------- #' # Look at the tour path in a tour, how well does it cover a sphere #' # Using MDS to summarise the high-d space of projections @@ -20,7 +21,7 @@ #' #' # Compare five guided tours ----------------------------- #' holes1d <- guided_tour(holes(), 1) -#' tour_reps <- replicate(5, save_history(flea[, 1:6], holes1d, max = 2), +#' tour_reps <- replicate(5, save_history(flea_std, holes1d, max = 2), #' simplify = FALSE #' ) #' tour_reps2 <- lapply(tour_reps, interpolate, 0.2) @@ -33,15 +34,13 @@ #' ord <- as.data.frame(cmdscale(d, 2)) #' #' info <- cbind(ord, index_values) -#' if (require("ggplot2")) { -#' ggplot(data = info, aes(x = step, y = value, group = try)) + -#' geom_line() -#' ##ggplot(data = info, aes(x = V1, y = V2, group = try)) + -#' ## geom_path() + -#' ## geom_point(aes(size = value)) + -#' ## coord_equal() -#' ##last_plot() + facet_wrap(~try) -#' } +#' ggplot(data = info, aes(x = step, y = value, group = try)) + +#' geom_line() +#' ##ggplot(data = info, aes(x = V1, y = V2, group = try)) + +#' ## geom_path() + +#' ## geom_point(aes(size = value)) + +#' ## coord_equal() +#' ##last_plot() + facet_wrap(~try) path_dist <- function(history) { history <- as.array(history) n <- dim(history)[3] diff --git a/R/tour-guided.r b/R/tour-guided.r index 31ea3e92..1b98e929 100644 --- a/R/tour-guided.r +++ b/R/tour-guided.r @@ -29,16 +29,17 @@ #' \code{\link{search_better_random}} for different search strategies #' @export #' @examples -#' animate_xy(flea[, 1:6], guided_tour(holes()), sphere = TRUE) +#' flea_std <- apply(flea[,1:6], 2, function(x) (x-mean(x))/sd(x)) +#' animate_xy(flea_std, guided_tour(holes()), sphere = TRUE) #' \donttest{ -#' animate_xy(flea[, 1:6], guided_tour(holes(), search_f = search_better_random), sphere = TRUE) -#' animate_dist(flea[, 1:6], guided_tour(holes(), 1), sphere = TRUE) -#' animate_xy(flea[, 1:6], guided_tour(lda_pp(flea$species)), sphere = TRUE, col = flea$species) +#' animate_xy(flea_std, guided_tour(holes(), search_f = search_better_random), sphere = TRUE) +#' animate_dist(flea_std, guided_tour(holes(), 1), sphere = TRUE) +#' animate_xy(flea_std, guided_tour(lda_pp(flea$species)), sphere = TRUE, col = flea$species) #' #' # save_history is particularly useful in conjunction with the #' # guided tour as it allows us to look at the tour path in many different #' # ways -#' f <- flea[, 1:3] +#' f <- flea_std[, 1:3] #' tries <- replicate(5, save_history(f, guided_tour(holes())), simplify = FALSE) #' } guided_tour <- function(index_f, d = 2, alpha = 0.5, cooling = 0.99, max.tries = 25, diff --git a/R/util.r b/R/util.r index d5562315..c2290cd4 100644 --- a/R/util.r +++ b/R/util.r @@ -118,7 +118,7 @@ areColors <- function(x) { #' Map vector of factors to color #' #' @param x vector -#' @param palette name of color palette for point colour, used by \code{\link{grDevices::hcl.colors}}, default "Zissou 1" +#' @param palette name of color palette for point colour, used by \code{\link{hcl.colors}}, default "Zissou 1" #' @export mapColors <- function(x, palette) { n <- length(unique(x)) diff --git a/cran-comments.md b/cran-comments.md index d10475d1..a52a9e95 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,8 +1,6 @@ ## Overview -This is a small updated, with several new methods added, and multiple fixes. - -Although the New Maintainer is flagged, the maintainer is the same. The only change is that full name is now used, so that it matches the ORCID records. +This is a fairly major update, with new display options and new parameters on many display options. There are no major structural changes to the code. \dontrun is used for example code where the method would break, and thus the code should not be run. It is important for users to be able to see this example. @@ -13,7 +11,8 @@ Although the New Maintainer is flagged, the maintainer is the same. The only cha * Fedora Linux, R-devel, clang, gfortran * Ubuntu Linux 20.04.1 LTS, R-release, GCC -## R CMD check results +## ── R CMD check results ──────────────────────── tourr 1.0.0 ──── +Duration: 1m 16.8s 0 errors ✔ | 0 warnings ✔ | 0 notes ✔ @@ -21,14 +20,10 @@ Although the New Maintainer is flagged, the maintainer is the same. The only cha All downstream dependencies have been checked. -> revdep_check() -── INIT ────────────────────────────── Computing revdeps ── -── INSTALL ────────────────────────────────── 2 versions ── -Installing CRAN version of tourr -Installing DEV version of tourr -── CHECK ─────────────────────────────────── 10 packages ── -✔ cheem 0.2.0 ── E: 0 | W: 0 | N: 1 -✔ composits 0.1.1 ── E: 0 | W: 0 | N: 0 +> revdepcheck::revdep_check() +── CHECK ──────────────────────────────────────── 11 packages ── +✔ cheem 0.3.0 ── E: 0 | W: 0 | N: 0 +✔ composits 0.1.1 ── E: 1 | W: 0 | N: 0 ✔ detourr 0.1.0 ── E: 0 | W: 0 | N: 1 ✔ diveR 0.1.2 ── E: 1 | W: 0 | N: 0 ✔ ferrn 0.0.2 ── E: 0 | W: 0 | N: 0 @@ -37,5 +32,9 @@ Installing DEV version of tourr ✔ loon.tourr 0.1.3 ── E: 1 | W: 0 | N: 0 I REPPlab 0.9.4 ── E: 1 | W: 0 | N: 0 ✔ spinifex 0.3.6 ── E: 0 | W: 0 | N: 0 -OK: 10 +✔ woylier 0.0.5 ── E: 0 | W: 0 | N: 0 +OK: 11 BROKEN: 0 +Total time: 17 min + +REPPlab cannot be fully checked. It doesn't Depend but only Suggests the tourr package. diff --git a/docs/404.html b/docs/404.html index 6d155044..f7b2645f 100644 --- a/docs/404.html +++ b/docs/404.html @@ -39,7 +39,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 1d280271..344ee42f 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/articles/edges.html b/docs/articles/edges.html index 82b77932..88313c1f 100644 --- a/docs/articles/edges.html +++ b/docs/articles/edges.html @@ -40,7 +40,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/articles/edges_files/figure-html/unnamed-chunk-2-1.png b/docs/articles/edges_files/figure-html/unnamed-chunk-2-1.png index cb294c79..f3a76819 100644 Binary files a/docs/articles/edges_files/figure-html/unnamed-chunk-2-1.png and b/docs/articles/edges_files/figure-html/unnamed-chunk-2-1.png differ diff --git a/docs/articles/edges_files/figure-html/unnamed-chunk-3-1.png b/docs/articles/edges_files/figure-html/unnamed-chunk-3-1.png index 776701a6..8690dd2c 100644 Binary files a/docs/articles/edges_files/figure-html/unnamed-chunk-3-1.png and b/docs/articles/edges_files/figure-html/unnamed-chunk-3-1.png differ diff --git a/docs/articles/edges_files/figure-html/unnamed-chunk-4-1.png b/docs/articles/edges_files/figure-html/unnamed-chunk-4-1.png index 6f1d61e5..f1eab81b 100644 Binary files a/docs/articles/edges_files/figure-html/unnamed-chunk-4-1.png and b/docs/articles/edges_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/docs/articles/index.html b/docs/articles/index.html index 2c83d692..d65179fd 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/articles/tourr.html b/docs/articles/tourr.html index ef0c2195..cd28a6cc 100644 --- a/docs/articles/tourr.html +++ b/docs/articles/tourr.html @@ -40,7 +40,7 @@ tourr - 0.6.18 + 1.0.0 @@ -120,10 +120,9 @@

Quick start
-f <- flea[, 1:6]
+f <- apply(flea[,1:6], 2, function(x) (x-mean(x))/sd(x))
 animate(f)
-#> Converting input data to the required matrix format.
-#> Using half_range 66
+#> Using half_range 4.4

Here we only see the first frame that is generated on the tour path, but if you call animate in your console you will launch a @@ -135,8 +134,7 @@

Quick start= grand_tour(), display = display_xy() ) -#> Converting input data to the required matrix format. -#> Using half_range 66 +#> Using half_range 4.4

The most common application is to use a grand tour, which means that the projections (or bases) are randomly selected and give a global @@ -171,40 +169,8 @@

Tour typesanimate(f, tour_path = guided_tour(holes()), display = display_xy()) -#> Converting input data to the required matrix format. -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> No better bases found after 25 tries. Giving up. -#> Final projection: -#> 0.256 0.875 -#> 0.004 -0.344 -#> 0.382 -0.318 -#> -0.727 0.085 -#> 0.487 -0.064 -#> -0.151 0.055 -#> Using half_range 66 +#> Value 0.970 48.1 % better - NEW BASIS +#> Using half_range 4.4

When running the full guided tour for this example, the final view shows three clusters that correspond to the three species in the @@ -214,40 +180,8 @@

Tour typesanimate(f, tour_path = guided_tour(holes()), display = display_xy(col = flea$species)) -#> Converting input data to the required matrix format. -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> No better bases found after 25 tries. Giving up. -#> Final projection: -#> -0.402 -0.321 -#> -0.732 -0.191 -#> -0.244 0.163 -#> -0.392 0.820 -#> -0.183 -0.393 -#> 0.235 0.087 -#> Using half_range 66 +#> Value 1.043 9.5 % better - NEW BASIS +#> Using half_range 4.4

Alternatively, a colour vector can be created manually and passed into the guided tour.

@@ -261,40 +195,8 @@

Tour typesanimate(f, tour_path = guided_tour(holes()), display = display_xy(col = flea_col)) -#> Converting input data to the required matrix format. -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> Value 1.582 0.0 % better -#> No better bases found after 25 tries. Giving up. -#> Final projection: -#> 0.039 0.230 -#> -0.061 -0.532 -#> -0.369 -0.398 -#> 0.054 -0.216 -#> 0.919 -0.113 -#> -0.109 0.668 -#> Using half_range 66 +#> Value 1.063 29.9 % better - NEW BASIS +#> Using half_range 4.4

@@ -316,14 +218,12 @@

Display types= grand_tour(d = 1), display = display_dist() ) -#> Converting input data to the required matrix format. -#> Using half_range 66

+#> Using half_range 4.4

but there is also a shortcut available

 animate_dist(f)
-#> Converting input data to the required matrix format.
-#> Using half_range 66
+#> Using half_range 4.4

@@ -343,10 +243,8 @@

Saving a tour
 t1 <- save_history(f, max = 3)
-#> Converting input data to the required matrix format.
 animate(f, planned_tour(t1))
-#> Converting input data to the required matrix format.
-#> Using half_range 66

+#> Using half_range 4.4

diff --git a/docs/articles/tourr_files/figure-html/unnamed-chunk-2-1.png b/docs/articles/tourr_files/figure-html/unnamed-chunk-2-1.png index 4245ea1d..55e6bd19 100644 Binary files a/docs/articles/tourr_files/figure-html/unnamed-chunk-2-1.png and b/docs/articles/tourr_files/figure-html/unnamed-chunk-2-1.png differ diff --git a/docs/articles/tourr_files/figure-html/unnamed-chunk-3-1.png b/docs/articles/tourr_files/figure-html/unnamed-chunk-3-1.png index ab0f7432..d2b3f0bb 100644 Binary files a/docs/articles/tourr_files/figure-html/unnamed-chunk-3-1.png and b/docs/articles/tourr_files/figure-html/unnamed-chunk-3-1.png differ diff --git a/docs/articles/tourr_files/figure-html/unnamed-chunk-4-1.png b/docs/articles/tourr_files/figure-html/unnamed-chunk-4-1.png index 911d849d..ffad2dc9 100644 Binary files a/docs/articles/tourr_files/figure-html/unnamed-chunk-4-1.png and b/docs/articles/tourr_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/docs/articles/tourr_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/tourr_files/figure-html/unnamed-chunk-5-1.png index 3e170237..78301619 100644 Binary files a/docs/articles/tourr_files/figure-html/unnamed-chunk-5-1.png and b/docs/articles/tourr_files/figure-html/unnamed-chunk-5-1.png differ diff --git a/docs/articles/tourr_files/figure-html/unnamed-chunk-6-1.png b/docs/articles/tourr_files/figure-html/unnamed-chunk-6-1.png index 1c2ed71f..3183b968 100644 Binary files a/docs/articles/tourr_files/figure-html/unnamed-chunk-6-1.png and b/docs/articles/tourr_files/figure-html/unnamed-chunk-6-1.png differ diff --git a/docs/articles/tourr_files/figure-html/unnamed-chunk-7-1.png b/docs/articles/tourr_files/figure-html/unnamed-chunk-7-1.png index 178a35b0..c20a14fa 100644 Binary files a/docs/articles/tourr_files/figure-html/unnamed-chunk-7-1.png and b/docs/articles/tourr_files/figure-html/unnamed-chunk-7-1.png differ diff --git a/docs/articles/tourr_files/figure-html/unnamed-chunk-7-2.png b/docs/articles/tourr_files/figure-html/unnamed-chunk-7-2.png index 493a8bd7..86209886 100644 Binary files a/docs/articles/tourr_files/figure-html/unnamed-chunk-7-2.png and b/docs/articles/tourr_files/figure-html/unnamed-chunk-7-2.png differ diff --git a/docs/articles/tourr_files/figure-html/unnamed-chunk-8-1.png b/docs/articles/tourr_files/figure-html/unnamed-chunk-8-1.png index 178a35b0..c20a14fa 100644 Binary files a/docs/articles/tourr_files/figure-html/unnamed-chunk-8-1.png and b/docs/articles/tourr_files/figure-html/unnamed-chunk-8-1.png differ diff --git a/docs/articles/tourr_files/figure-html/unnamed-chunk-8-2.png b/docs/articles/tourr_files/figure-html/unnamed-chunk-8-2.png index 68caaa31..e4afb5d4 100644 Binary files a/docs/articles/tourr_files/figure-html/unnamed-chunk-8-2.png and b/docs/articles/tourr_files/figure-html/unnamed-chunk-8-2.png differ diff --git a/docs/articles/tourr_files/figure-html/unnamed-chunk-9-1.png b/docs/articles/tourr_files/figure-html/unnamed-chunk-9-1.png index 199ea675..875307b5 100644 Binary files a/docs/articles/tourr_files/figure-html/unnamed-chunk-9-1.png and b/docs/articles/tourr_files/figure-html/unnamed-chunk-9-1.png differ diff --git a/docs/authors.html b/docs/authors.html index d33304c2..d8c85432 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/index.html b/docs/index.html index 253eb6d8..ca288d99 100644 --- a/docs/index.html +++ b/docs/index.html @@ -42,7 +42,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/news/index.html b/docs/news/index.html index a7dbe698..d3f48ec6 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 @@ -60,6 +60,11 @@

Changelog

Source: NEWS.md +
+ +
diff --git a/docs/reference/Laser-measurements-1.png b/docs/reference/Laser-measurements-1.png index c28dae87..c339a482 100644 Binary files a/docs/reference/Laser-measurements-1.png and b/docs/reference/Laser-measurements-1.png differ diff --git a/docs/reference/Laser-measurements.html b/docs/reference/Laser-measurements.html index 97b41f2c..55587d5f 100644 --- a/docs/reference/Laser-measurements.html +++ b/docs/reference/Laser-measurements.html @@ -19,7 +19,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/Olive-oil-measurements-1.png b/docs/reference/Olive-oil-measurements-1.png index 48b56831..687b6e50 100644 Binary files a/docs/reference/Olive-oil-measurements-1.png and b/docs/reference/Olive-oil-measurements-1.png differ diff --git a/docs/reference/Olive-oil-measurements-2.png b/docs/reference/Olive-oil-measurements-2.png index c88b86cb..5fdd15fc 100644 Binary files a/docs/reference/Olive-oil-measurements-2.png and b/docs/reference/Olive-oil-measurements-2.png differ diff --git a/docs/reference/Olive-oil-measurements.html b/docs/reference/Olive-oil-measurements.html index 289a26db..766ff7e1 100644 --- a/docs/reference/Olive-oil-measurements.html +++ b/docs/reference/Olive-oil-measurements.html @@ -20,7 +20,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/Ozone-measurements.html b/docs/reference/Ozone-measurements.html index 49a68954..94c31ac8 100644 --- a/docs/reference/Ozone-measurements.html +++ b/docs/reference/Ozone-measurements.html @@ -22,7 +22,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/Places-Ratings-1.png b/docs/reference/Places-Ratings-1.png index 7bb93548..6cb48db9 100644 Binary files a/docs/reference/Places-Ratings-1.png and b/docs/reference/Places-Ratings-1.png differ diff --git a/docs/reference/Places-Ratings.html b/docs/reference/Places-Ratings.html index 2f17010f..62520caf 100644 --- a/docs/reference/Places-Ratings.html +++ b/docs/reference/Places-Ratings.html @@ -20,7 +20,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/Rat-CNS-1.png b/docs/reference/Rat-CNS-1.png index f8e5a85b..cff4707b 100644 Binary files a/docs/reference/Rat-CNS-1.png and b/docs/reference/Rat-CNS-1.png differ diff --git a/docs/reference/Rat-CNS.html b/docs/reference/Rat-CNS.html index 1bfbb2b2..10cfa030 100644 --- a/docs/reference/Rat-CNS.html +++ b/docs/reference/Rat-CNS.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/Rplot002.png b/docs/reference/Rplot002.png index 1b0855f6..6fd9111f 100644 Binary files a/docs/reference/Rplot002.png and b/docs/reference/Rplot002.png differ diff --git a/docs/reference/Rplot003.png b/docs/reference/Rplot003.png index d9ba8566..15cf2967 100644 Binary files a/docs/reference/Rplot003.png and b/docs/reference/Rplot003.png differ diff --git a/docs/reference/Rplot004.png b/docs/reference/Rplot004.png index 5270165f..8b79a5a1 100644 Binary files a/docs/reference/Rplot004.png and b/docs/reference/Rplot004.png differ diff --git a/docs/reference/Rplot005.png b/docs/reference/Rplot005.png index 4b0759ea..1188d2e8 100644 Binary files a/docs/reference/Rplot005.png and b/docs/reference/Rplot005.png differ diff --git a/docs/reference/Rplot006.png b/docs/reference/Rplot006.png index ad8e17d8..717d7fb5 100644 Binary files a/docs/reference/Rplot006.png and b/docs/reference/Rplot006.png differ diff --git a/docs/reference/Rplot007.png b/docs/reference/Rplot007.png index cb82eb23..5d357b3b 100644 Binary files a/docs/reference/Rplot007.png and b/docs/reference/Rplot007.png differ diff --git a/docs/reference/Rplot008.png b/docs/reference/Rplot008.png index 4407e0e1..8b30a926 100644 Binary files a/docs/reference/Rplot008.png and b/docs/reference/Rplot008.png differ diff --git a/docs/reference/Rplot009.png b/docs/reference/Rplot009.png index 988ed565..ff243233 100644 Binary files a/docs/reference/Rplot009.png and b/docs/reference/Rplot009.png differ diff --git a/docs/reference/Rplot010.png b/docs/reference/Rplot010.png index f41be962..832d2691 100644 Binary files a/docs/reference/Rplot010.png and b/docs/reference/Rplot010.png differ diff --git a/docs/reference/Rplot011.png b/docs/reference/Rplot011.png index b970be7f..889f0bab 100644 Binary files a/docs/reference/Rplot011.png and b/docs/reference/Rplot011.png differ diff --git a/docs/reference/Rplot012.png b/docs/reference/Rplot012.png index f406bdc7..60c01a7d 100644 Binary files a/docs/reference/Rplot012.png and b/docs/reference/Rplot012.png differ diff --git a/docs/reference/Rplot013.png b/docs/reference/Rplot013.png index 0359d0f7..1c6b0df3 100644 Binary files a/docs/reference/Rplot013.png and b/docs/reference/Rplot013.png differ diff --git a/docs/reference/Rplot014.png b/docs/reference/Rplot014.png index 8af93a3e..104bef48 100644 Binary files a/docs/reference/Rplot014.png and b/docs/reference/Rplot014.png differ diff --git a/docs/reference/Rplot015.png b/docs/reference/Rplot015.png index 39f2c3d9..91541753 100644 Binary files a/docs/reference/Rplot015.png and b/docs/reference/Rplot015.png differ diff --git a/docs/reference/Rplot016.png b/docs/reference/Rplot016.png index e525b0cb..e6e0521e 100644 Binary files a/docs/reference/Rplot016.png and b/docs/reference/Rplot016.png differ diff --git a/docs/reference/Rplot017.png b/docs/reference/Rplot017.png index 0acad213..dd012f1a 100644 Binary files a/docs/reference/Rplot017.png and b/docs/reference/Rplot017.png differ diff --git a/docs/reference/Rplot018.png b/docs/reference/Rplot018.png index c724ca16..d9694fc9 100644 Binary files a/docs/reference/Rplot018.png and b/docs/reference/Rplot018.png differ diff --git a/docs/reference/Rplot021.png b/docs/reference/Rplot021.png index f7ad4417..359e86d6 100644 Binary files a/docs/reference/Rplot021.png and b/docs/reference/Rplot021.png differ diff --git a/docs/reference/Rplot024.png b/docs/reference/Rplot024.png index fafa825d..253bd467 100644 Binary files a/docs/reference/Rplot024.png and b/docs/reference/Rplot024.png differ diff --git a/docs/reference/Rplot027.png b/docs/reference/Rplot027.png index f63ce34e..88639c75 100644 Binary files a/docs/reference/Rplot027.png and b/docs/reference/Rplot027.png differ diff --git a/docs/reference/Rplot030.png b/docs/reference/Rplot030.png index 5cedb5cb..ff265a02 100644 Binary files a/docs/reference/Rplot030.png and b/docs/reference/Rplot030.png differ diff --git a/docs/reference/Rplot031.png b/docs/reference/Rplot031.png index 8ddae78d..df68fb44 100644 Binary files a/docs/reference/Rplot031.png and b/docs/reference/Rplot031.png differ diff --git a/docs/reference/Rplot034.png b/docs/reference/Rplot034.png index ad962fc0..1fa30ab6 100644 Binary files a/docs/reference/Rplot034.png and b/docs/reference/Rplot034.png differ diff --git a/docs/reference/Tropical-Atmosphere-Ocean.html b/docs/reference/Tropical-Atmosphere-Ocean.html index 15498805..a25e408d 100644 --- a/docs/reference/Tropical-Atmosphere-Ocean.html +++ b/docs/reference/Tropical-Atmosphere-Ocean.html @@ -24,7 +24,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/anaglyph.html b/docs/reference/anaglyph.html index 83f0d6af..8d0ea794 100644 --- a/docs/reference/anaglyph.html +++ b/docs/reference/anaglyph.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/anchored_orthogonal_distance.html b/docs/reference/anchored_orthogonal_distance.html index e9bdc068..0cbc7c35 100644 --- a/docs/reference/anchored_orthogonal_distance.html +++ b/docs/reference/anchored_orthogonal_distance.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/andrews-2.png b/docs/reference/andrews-2.png index 0fc64005..2d54ee2c 100644 Binary files a/docs/reference/andrews-2.png and b/docs/reference/andrews-2.png differ diff --git a/docs/reference/andrews.html b/docs/reference/andrews.html index bc54245b..b684bc9f 100644 --- a/docs/reference/andrews.html +++ b/docs/reference/andrews.html @@ -19,7 +19,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/angular_breaks.html b/docs/reference/angular_breaks.html index ba5795a5..9da14f1c 100644 --- a/docs/reference/angular_breaks.html +++ b/docs/reference/angular_breaks.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/animate-1.png b/docs/reference/animate-1.png index 72744527..77947508 100644 Binary files a/docs/reference/animate-1.png and b/docs/reference/animate-1.png differ diff --git a/docs/reference/animate-2.png b/docs/reference/animate-2.png index 305951fe..93af5879 100644 Binary files a/docs/reference/animate-2.png and b/docs/reference/animate-2.png differ diff --git a/docs/reference/animate-3.png b/docs/reference/animate-3.png index 95de4db7..14002e8f 100644 Binary files a/docs/reference/animate-3.png and b/docs/reference/animate-3.png differ diff --git a/docs/reference/animate-4.png b/docs/reference/animate-4.png index fb285863..9025009e 100644 Binary files a/docs/reference/animate-4.png and b/docs/reference/animate-4.png differ diff --git a/docs/reference/animate.html b/docs/reference/animate.html index 8e95eb74..f60d20aa 100644 --- a/docs/reference/animate.html +++ b/docs/reference/animate.html @@ -20,7 +20,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/areColors.html b/docs/reference/areColors.html index 5c96e00c..e6bac5e0 100644 --- a/docs/reference/areColors.html +++ b/docs/reference/areColors.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/bases_little.html b/docs/reference/bases_little.html index c0f0c984..5d3fa203 100644 --- a/docs/reference/bases_little.html +++ b/docs/reference/bases_little.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/basis_init.html b/docs/reference/basis_init.html index f3562eb0..3ecba096 100644 --- a/docs/reference/basis_init.html +++ b/docs/reference/basis_init.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/basis_nearby.html b/docs/reference/basis_nearby.html index 6f521353..50aef365 100644 --- a/docs/reference/basis_nearby.html +++ b/docs/reference/basis_nearby.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/basis_random.html b/docs/reference/basis_random.html index ad354cc4..e0812145 100644 --- a/docs/reference/basis_random.html +++ b/docs/reference/basis_random.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/blank_plot.html b/docs/reference/blank_plot.html index acc8d52b..bfc43330 100644 --- a/docs/reference/blank_plot.html +++ b/docs/reference/blank_plot.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/center.html b/docs/reference/center.html index 24f0af85..226b372e 100644 --- a/docs/reference/center.html +++ b/docs/reference/center.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/check_freezer_safe.html b/docs/reference/check_freezer_safe.html index c9d25e8d..09e2dc33 100644 --- a/docs/reference/check_freezer_safe.html +++ b/docs/reference/check_freezer_safe.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/cmass.html b/docs/reference/cmass.html index 4604bfd9..828ac50e 100644 --- a/docs/reference/cmass.html +++ b/docs/reference/cmass.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/compute_v_rel.html b/docs/reference/compute_v_rel.html index 814c329d..f5eaf62c 100644 --- a/docs/reference/compute_v_rel.html +++ b/docs/reference/compute_v_rel.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/correct_orientation.html b/docs/reference/correct_orientation.html index 6bba22a5..a5a0b8d5 100644 --- a/docs/reference/correct_orientation.html +++ b/docs/reference/correct_orientation.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/cumulative_radial.html b/docs/reference/cumulative_radial.html index 5e7cb769..d81f4d65 100644 --- a/docs/reference/cumulative_radial.html +++ b/docs/reference/cumulative_radial.html @@ -20,7 +20,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/dcor2d.html b/docs/reference/dcor2d.html index 1b931945..5d8bf837 100644 --- a/docs/reference/dcor2d.html +++ b/docs/reference/dcor2d.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/dependence_tour-1.png b/docs/reference/dependence_tour-1.png index 77238473..caefb52a 100644 Binary files a/docs/reference/dependence_tour-1.png and b/docs/reference/dependence_tour-1.png differ diff --git a/docs/reference/dependence_tour-2.png b/docs/reference/dependence_tour-2.png index ac27b15c..6f781652 100644 Binary files a/docs/reference/dependence_tour-2.png and b/docs/reference/dependence_tour-2.png differ diff --git a/docs/reference/dependence_tour-3.png b/docs/reference/dependence_tour-3.png index d03fe2d7..8b1be71f 100644 Binary files a/docs/reference/dependence_tour-3.png and b/docs/reference/dependence_tour-3.png differ diff --git a/docs/reference/dependence_tour.html b/docs/reference/dependence_tour.html index 701fa825..fe339334 100644 --- a/docs/reference/dependence_tour.html +++ b/docs/reference/dependence_tour.html @@ -21,7 +21,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/display_andrews-11.png b/docs/reference/display_andrews-11.png index e8028654..35afe579 100644 Binary files a/docs/reference/display_andrews-11.png and b/docs/reference/display_andrews-11.png differ diff --git a/docs/reference/display_andrews-12.png b/docs/reference/display_andrews-12.png index e8028654..35afe579 100644 Binary files a/docs/reference/display_andrews-12.png and b/docs/reference/display_andrews-12.png differ diff --git a/docs/reference/display_andrews-3.png b/docs/reference/display_andrews-3.png index 1c81c1f9..d84255ac 100644 Binary files a/docs/reference/display_andrews-3.png and b/docs/reference/display_andrews-3.png differ diff --git a/docs/reference/display_andrews-6.png b/docs/reference/display_andrews-6.png index 01a3e5bc..00ec5f12 100644 Binary files a/docs/reference/display_andrews-6.png and b/docs/reference/display_andrews-6.png differ diff --git a/docs/reference/display_andrews-9.png b/docs/reference/display_andrews-9.png index 0d7519d2..a250d900 100644 Binary files a/docs/reference/display_andrews-9.png and b/docs/reference/display_andrews-9.png differ diff --git a/docs/reference/display_andrews.html b/docs/reference/display_andrews.html index 8a726ecb..5c769937 100644 --- a/docs/reference/display_andrews.html +++ b/docs/reference/display_andrews.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0 @@ -68,7 +68,7 @@

Andrews' curves tour path animation.

-
display_andrews(col = "black", ...)
+    
display_andrews(col = "black", palette = "Zissou 1", ...)
 
 animate_andrews(data, tour_path = grand_tour(3), col = "black", ...)
@@ -79,6 +79,10 @@

Arguments

color to be plotted. Defaults to "black"

+
palette
+

name of color palette for point colour, used by hcl.colors, default "Zissou 1"

+ +
...

other arguments passed on to animate

@@ -124,31 +128,31 @@

Examples

#> Value -0.582 -0.0 % better #> Value -0.582 -0.0 % better #> Value -0.582 -0.0 % better -#> Value -0.565 -2.9 % better #> Value -0.582 -0.0 % better #> Value -0.582 -0.0 % better #> Value -0.582 -0.0 % better #> Value -0.582 -0.0 % better #> Value -0.582 -0.0 % better -#> Value -0.581 -0.1 % better #> Value -0.582 -0.0 % better #> Value -0.582 -0.0 % better -#> Value -0.577 -0.9 % better #> Value -0.582 -0.0 % better #> Value -0.582 -0.0 % better -#> Value -0.574 -1.3 % better +#> Value -0.582 -0.0 % better +#> Value -0.582 -0.0 % better +#> Value -0.582 -0.0 % better +#> Value -0.582 -0.0 % better #> Value -0.582 -0.0 % better #> Value -0.582 -0.0 % better #> Value -0.582 -0.0 % better #> Value -0.582 -0.0 % better #> No better bases found after 25 tries. Giving up. #> Final projection: -#> 0.151 -0.594 -#> -0.600 -0.344 -#> -0.104 0.395 -#> -0.039 0.573 -#> 0.489 -0.198 -#> -0.605 -0.071 +#> 0.233 0.669 +#> -0.044 -0.027 +#> -0.313 -0.146 +#> 0.088 0.597 +#> 0.750 -0.049 +#> -0.525 0.415 diff --git a/docs/reference/display_density2d-11.png b/docs/reference/display_density2d-11.png index 5918582f..5507e0e1 100644 Binary files a/docs/reference/display_density2d-11.png and b/docs/reference/display_density2d-11.png differ diff --git a/docs/reference/display_density2d-12.png b/docs/reference/display_density2d-12.png index 31eeb124..57489cd9 100644 Binary files a/docs/reference/display_density2d-12.png and b/docs/reference/display_density2d-12.png differ diff --git a/docs/reference/display_density2d-13.png b/docs/reference/display_density2d-13.png index 0d6f0e44..5bb0804e 100644 Binary files a/docs/reference/display_density2d-13.png and b/docs/reference/display_density2d-13.png differ diff --git a/docs/reference/display_density2d-14.png b/docs/reference/display_density2d-14.png index 5effab47..f1a54676 100644 Binary files a/docs/reference/display_density2d-14.png and b/docs/reference/display_density2d-14.png differ diff --git a/docs/reference/display_density2d-15.png b/docs/reference/display_density2d-15.png index 3de7b319..742380ae 100644 Binary files a/docs/reference/display_density2d-15.png and b/docs/reference/display_density2d-15.png differ diff --git a/docs/reference/display_density2d-16.png b/docs/reference/display_density2d-16.png index d85e7c26..f6a60823 100644 Binary files a/docs/reference/display_density2d-16.png and b/docs/reference/display_density2d-16.png differ diff --git a/docs/reference/display_density2d-17.png b/docs/reference/display_density2d-17.png index ba24557c..df824bf5 100644 Binary files a/docs/reference/display_density2d-17.png and b/docs/reference/display_density2d-17.png differ diff --git a/docs/reference/display_density2d-18.png b/docs/reference/display_density2d-18.png index 58d3f111..2b55a9c0 100644 Binary files a/docs/reference/display_density2d-18.png and b/docs/reference/display_density2d-18.png differ diff --git a/docs/reference/display_density2d-2.png b/docs/reference/display_density2d-2.png index 859d4aac..7e4ba505 100644 Binary files a/docs/reference/display_density2d-2.png and b/docs/reference/display_density2d-2.png differ diff --git a/docs/reference/display_density2d-21.png b/docs/reference/display_density2d-21.png index cad879d5..be8b4fde 100644 Binary files a/docs/reference/display_density2d-21.png and b/docs/reference/display_density2d-21.png differ diff --git a/docs/reference/display_density2d-24.png b/docs/reference/display_density2d-24.png index 8ef36eec..7f0e147a 100644 Binary files a/docs/reference/display_density2d-24.png and b/docs/reference/display_density2d-24.png differ diff --git a/docs/reference/display_density2d-27.png b/docs/reference/display_density2d-27.png index d00e3077..ac1bd55b 100644 Binary files a/docs/reference/display_density2d-27.png and b/docs/reference/display_density2d-27.png differ diff --git a/docs/reference/display_density2d-3.png b/docs/reference/display_density2d-3.png index 0eaff62b..0ea0f8ea 100644 Binary files a/docs/reference/display_density2d-3.png and b/docs/reference/display_density2d-3.png differ diff --git a/docs/reference/display_density2d-30.png b/docs/reference/display_density2d-30.png index 6df662bd..af24c9eb 100644 Binary files a/docs/reference/display_density2d-30.png and b/docs/reference/display_density2d-30.png differ diff --git a/docs/reference/display_density2d-31.png b/docs/reference/display_density2d-31.png index 7925ee51..22aeecd0 100644 Binary files a/docs/reference/display_density2d-31.png and b/docs/reference/display_density2d-31.png differ diff --git a/docs/reference/display_density2d-34.png b/docs/reference/display_density2d-34.png index 41c5a577..0322a0e9 100644 Binary files a/docs/reference/display_density2d-34.png and b/docs/reference/display_density2d-34.png differ diff --git a/docs/reference/display_density2d-5.png b/docs/reference/display_density2d-5.png index b230af5e..07dd9e42 100644 Binary files a/docs/reference/display_density2d-5.png and b/docs/reference/display_density2d-5.png differ diff --git a/docs/reference/display_density2d-6.png b/docs/reference/display_density2d-6.png index 9efc9062..f4c6ab8f 100644 Binary files a/docs/reference/display_density2d-6.png and b/docs/reference/display_density2d-6.png differ diff --git a/docs/reference/display_density2d-9.png b/docs/reference/display_density2d-9.png index 347cb33e..571f5ef6 100644 Binary files a/docs/reference/display_density2d-9.png and b/docs/reference/display_density2d-9.png differ diff --git a/docs/reference/display_density2d.html b/docs/reference/display_density2d.html index 484e281d..0a9294a0 100644 --- a/docs/reference/display_density2d.html +++ b/docs/reference/display_density2d.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0
@@ -120,7 +120,7 @@

Arguments

palette
-

name of color palette for point colour, used by grDevices::hcl.colors, default "Zissou 1"

+

name of color palette for point colour, used by hcl.colors, default "Zissou 1"

...
@@ -203,9 +203,9 @@

Examples

#> Value 1.582 0.0 % better #> No better bases found after 25 tries. Giving up. #> Final projection: -#> -0.871 0.427 -#> -0.473 -0.863 -#> -0.133 0.270 +#> 0.199 0.601 +#> -0.828 -0.320 +#> 0.525 -0.732 #> Using half_range 65 diff --git a/docs/reference/display_depth-1.png b/docs/reference/display_depth-1.png index c2e47f14..f88c9a00 100644 Binary files a/docs/reference/display_depth-1.png and b/docs/reference/display_depth-1.png differ diff --git a/docs/reference/display_depth.html b/docs/reference/display_depth.html index bb84d8de..ae09a759 100644 --- a/docs/reference/display_depth.html +++ b/docs/reference/display_depth.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/display_dist-10.png b/docs/reference/display_dist-10.png index 1d59dc5e..111962b5 100644 Binary files a/docs/reference/display_dist-10.png and b/docs/reference/display_dist-10.png differ diff --git a/docs/reference/display_dist-12.png b/docs/reference/display_dist-12.png index 7ce68f4e..1119c334 100644 Binary files a/docs/reference/display_dist-12.png and b/docs/reference/display_dist-12.png differ diff --git a/docs/reference/display_dist-2.png b/docs/reference/display_dist-2.png index 54bfca47..97b3b83f 100644 Binary files a/docs/reference/display_dist-2.png and b/docs/reference/display_dist-2.png differ diff --git a/docs/reference/display_dist-4.png b/docs/reference/display_dist-4.png index c514278a..c73fe589 100644 Binary files a/docs/reference/display_dist-4.png and b/docs/reference/display_dist-4.png differ diff --git a/docs/reference/display_dist-6.png b/docs/reference/display_dist-6.png index 3d1f0989..0bf8b380 100644 Binary files a/docs/reference/display_dist-6.png and b/docs/reference/display_dist-6.png differ diff --git a/docs/reference/display_dist-8.png b/docs/reference/display_dist-8.png index af24e107..8688385a 100644 Binary files a/docs/reference/display_dist-8.png and b/docs/reference/display_dist-8.png differ diff --git a/docs/reference/display_dist.html b/docs/reference/display_dist.html index e90062a6..6709861f 100644 --- a/docs/reference/display_dist.html +++ b/docs/reference/display_dist.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 @@ -108,7 +108,7 @@

Arguments

palette
-

name of color palette for point colour, used by grDevices::hcl.colors, default "Zissou 1"

+

name of color palette for point colour, used by hcl.colors, default "Zissou 1"

density_max
diff --git a/docs/reference/display_faces-1.png b/docs/reference/display_faces-1.png index be9f68bc..9b8ac731 100644 Binary files a/docs/reference/display_faces-1.png and b/docs/reference/display_faces-1.png differ diff --git a/docs/reference/display_faces-2.png b/docs/reference/display_faces-2.png index c82c68e8..209642be 100644 Binary files a/docs/reference/display_faces-2.png and b/docs/reference/display_faces-2.png differ diff --git a/docs/reference/display_faces-3.png b/docs/reference/display_faces-3.png index aea1486f..5eda4054 100644 Binary files a/docs/reference/display_faces-3.png and b/docs/reference/display_faces-3.png differ diff --git a/docs/reference/display_faces-4.png b/docs/reference/display_faces-4.png index 7daa2306..fd785193 100644 Binary files a/docs/reference/display_faces-4.png and b/docs/reference/display_faces-4.png differ diff --git a/docs/reference/display_faces-5.png b/docs/reference/display_faces-5.png index 6bd67cf3..691a464e 100644 Binary files a/docs/reference/display_faces-5.png and b/docs/reference/display_faces-5.png differ diff --git a/docs/reference/display_faces-6.png b/docs/reference/display_faces-6.png index ac3fb082..5bfa37c5 100644 Binary files a/docs/reference/display_faces-6.png and b/docs/reference/display_faces-6.png differ diff --git a/docs/reference/display_faces.html b/docs/reference/display_faces.html index f322c1a9..65dd61cc 100644 --- a/docs/reference/display_faces.html +++ b/docs/reference/display_faces.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0 @@ -101,25 +101,17 @@

See also

Examples

# The drawing code is fairly slow, so this animation works best with a
 # limited number of cases
-animate_faces(flea[1:2, 1:6])
-#> Converting input data to the required matrix format.
-#> Warning: NaNs produced
+flea_s <- rescale(flea[,1:6])
+animate_faces(flea_s[1:2, 1:6])
 
-#> Warning: NaNs produced
-#> Error in 1:(k - 1): NA/NaN argument
 
-animate_faces(flea[1:4, 1:6])
-#> Converting input data to the required matrix format.
-#> Warning: NaNs produced
-#> Warning: NaNs produced
-#> Error in 1:(k - 1): NA/NaN argument
+animate_faces(flea_s[1:4, 1:6])
 
-
-animate_faces(flea[1:2, 1:6], grand_tour(5))
-#> Converting input data to the required matrix format.
-#> Warning: NaNs produced
-#> Error in 1:(k - 1): NA/NaN argument
 
+
+animate_faces(flea_s[1:2, 1:6], grand_tour(5))
+
+
 
diff --git a/docs/reference/display_groupxy-1.png b/docs/reference/display_groupxy-1.png index 74ee8d4e..f57c05d9 100644 Binary files a/docs/reference/display_groupxy-1.png and b/docs/reference/display_groupxy-1.png differ diff --git a/docs/reference/display_groupxy-2.png b/docs/reference/display_groupxy-2.png index eb39a168..7432d0b6 100644 Binary files a/docs/reference/display_groupxy-2.png and b/docs/reference/display_groupxy-2.png differ diff --git a/docs/reference/display_groupxy-3.png b/docs/reference/display_groupxy-3.png index 4fd08826..e0c865ae 100644 Binary files a/docs/reference/display_groupxy-3.png and b/docs/reference/display_groupxy-3.png differ diff --git a/docs/reference/display_groupxy-4.png b/docs/reference/display_groupxy-4.png index 3c0b0f07..b29fa161 100644 Binary files a/docs/reference/display_groupxy-4.png and b/docs/reference/display_groupxy-4.png differ diff --git a/docs/reference/display_groupxy.html b/docs/reference/display_groupxy.html index c6b6b7c2..52cb4a47 100644 --- a/docs/reference/display_groupxy.html +++ b/docs/reference/display_groupxy.html @@ -20,7 +20,7 @@ tourr - 0.6.18 + 1.0.0 @@ -80,6 +80,8 @@

Display 2D tour projections displayed separately by groups

pch = 20, cex = 1, edges = NULL, + edges.col = "black", + edges.width = 1, group_by = NULL, plot_xgp = TRUE, palette = "Zissou 1", @@ -122,6 +124,14 @@

Arguments

A two column integer matrix giving indices of ends of lines.

+
edges.col
+

colour of edges to be plotted, Defaults to "black"

+ + +
edges.width
+

line width for edges, default 1

+ +
group_by

variable to group by. Must have less than 25 unique values.

@@ -131,7 +141,7 @@

Arguments

palette
-

name of color palette for point colour, used by grDevices::hcl.colors, default "Zissou 1"

+

name of color palette for point colour, used by hcl.colors, default "Zissou 1"

...
@@ -150,16 +160,25 @@

Arguments

Examples

-
f <- flea[, 1:6]
-col <- rainbow(length(unique(flea$species)))[as.numeric(as.factor(flea$species))]
-pch <- as.numeric(flea$species) + 14
-
-animate_groupxy(f, col = col, pch = pch, group_by = flea$species)
+    
animate_groupxy(flea[, 1:6], col = flea$species,
+  pch = flea$species, group_by = flea$species)
 #> Converting input data to the required matrix format.
-#> Error in is.factor(edges.col): object 'edges.col' not found
-animate_groupxy(f, col = col, pch = pch, group_by = flea$species, plot_xgp = FALSE)
+#> Using half_range 66
+#> Warning: "shapes" is not a graphical parameter
+#> Warning: "shapes" is not a graphical parameter
+#> Warning: "shapes" is not a graphical parameter
+
+#> Warning: "shapes" is not a graphical parameter
+#> Warning: "shapes" is not a graphical parameter
+#> Warning: "shapes" is not a graphical parameter
+
+animate_groupxy(flea[, 1:6], col = flea$species,
+  pch = flea$species, group_by = flea$species,
+  plot_xgp = FALSE)
 #> Converting input data to the required matrix format.
-#> Error in is.factor(edges.col): object 'edges.col' not found
+#> Using half_range 66
+
+
 
diff --git a/docs/reference/display_image.html b/docs/reference/display_image.html index a1675618..eac87f58 100644 --- a/docs/reference/display_image.html +++ b/docs/reference/display_image.html @@ -20,7 +20,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/display_pca-1.png b/docs/reference/display_pca-1.png index d9e31527..40306e7d 100644 Binary files a/docs/reference/display_pca-1.png and b/docs/reference/display_pca-1.png differ diff --git a/docs/reference/display_pca.html b/docs/reference/display_pca.html index 0c874f00..a5bf9ce6 100644 --- a/docs/reference/display_pca.html +++ b/docs/reference/display_pca.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0 @@ -128,7 +128,7 @@

Arguments

palette
-

name of color palette for point colour, used by grDevices::hcl.colors, default "Zissou 1"

+

name of color palette for point colour, used by hcl.colors, default "Zissou 1"

...
@@ -151,7 +151,7 @@

Arguments

Examples

-
flea_std <- scale(flea[, 1:6])
+    
flea_std <- apply(flea[,1:6], 2, function(x) (x-mean(x))/sd(x))
 flea_pca <- prcomp(flea_std, center = FALSE, )
 flea_coefs <- flea_pca$rotation[, 1:3]
 flea_scores <- flea_pca$x[, 1:3]
diff --git a/docs/reference/display_pcp-1.png b/docs/reference/display_pcp-1.png
index b4f7ff53..2d67d937 100644
Binary files a/docs/reference/display_pcp-1.png and b/docs/reference/display_pcp-1.png differ
diff --git a/docs/reference/display_pcp-2.png b/docs/reference/display_pcp-2.png
index 285585c6..d00d3fba 100644
Binary files a/docs/reference/display_pcp-2.png and b/docs/reference/display_pcp-2.png differ
diff --git a/docs/reference/display_pcp.html b/docs/reference/display_pcp.html
index 4e23634b..2876b482 100644
--- a/docs/reference/display_pcp.html
+++ b/docs/reference/display_pcp.html
@@ -17,7 +17,7 @@
       
       
         tourr
-        0.6.18
+        1.0.0
       
     
diff --git a/docs/reference/display_sage-1.png b/docs/reference/display_sage-1.png index 1ca97c3f..262a005d 100644 Binary files a/docs/reference/display_sage-1.png and b/docs/reference/display_sage-1.png differ diff --git a/docs/reference/display_sage-2.png b/docs/reference/display_sage-2.png index 7df50458..bea80eff 100644 Binary files a/docs/reference/display_sage-2.png and b/docs/reference/display_sage-2.png differ diff --git a/docs/reference/display_sage.html b/docs/reference/display_sage.html index 2f2e0ba9..18541919 100644 --- a/docs/reference/display_sage.html +++ b/docs/reference/display_sage.html @@ -19,7 +19,7 @@ tourr - 0.6.18 + 1.0.0
@@ -113,7 +113,7 @@

Arguments

palette
-

name of color palette for point colour, used by grDevices::hcl.colors, default "Zissou 1"

+

name of color palette for point colour, used by hcl.colors, default "Zissou 1"

...
diff --git a/docs/reference/display_scatmat-2.png b/docs/reference/display_scatmat-2.png index 9817e86b..11e4cbfb 100644 Binary files a/docs/reference/display_scatmat-2.png and b/docs/reference/display_scatmat-2.png differ diff --git a/docs/reference/display_scatmat-4.png b/docs/reference/display_scatmat-4.png index aacc3dac..b00f110e 100644 Binary files a/docs/reference/display_scatmat-4.png and b/docs/reference/display_scatmat-4.png differ diff --git a/docs/reference/display_scatmat.html b/docs/reference/display_scatmat.html index fad672c1..c9a4c665 100644 --- a/docs/reference/display_scatmat.html +++ b/docs/reference/display_scatmat.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0
diff --git a/docs/reference/display_slice-1.png b/docs/reference/display_slice-1.png index a765b4d6..f1422106 100644 Binary files a/docs/reference/display_slice-1.png and b/docs/reference/display_slice-1.png differ diff --git a/docs/reference/display_slice-2.png b/docs/reference/display_slice-2.png index 64535465..e655b477 100644 Binary files a/docs/reference/display_slice-2.png and b/docs/reference/display_slice-2.png differ diff --git a/docs/reference/display_slice-3.png b/docs/reference/display_slice-3.png index 0155bea8..0c3eda8b 100644 Binary files a/docs/reference/display_slice-3.png and b/docs/reference/display_slice-3.png differ diff --git a/docs/reference/display_slice-4.png b/docs/reference/display_slice-4.png index 934bc93c..ce90c807 100644 Binary files a/docs/reference/display_slice-4.png and b/docs/reference/display_slice-4.png differ diff --git a/docs/reference/display_slice.html b/docs/reference/display_slice.html index 5eec6580..7703332a 100644 --- a/docs/reference/display_slice.html +++ b/docs/reference/display_slice.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 @@ -149,7 +149,7 @@

Arguments

palette
-

name of color palette for point colour, used by grDevices::hcl.colors, default "Zissou 1"

+

name of color palette for point colour, used by hcl.colors, default "Zissou 1"

...
diff --git a/docs/reference/display_stars-2.png b/docs/reference/display_stars-2.png index aa7ab7da..79d452a5 100644 Binary files a/docs/reference/display_stars-2.png and b/docs/reference/display_stars-2.png differ diff --git a/docs/reference/display_stars-4.png b/docs/reference/display_stars-4.png index 3673e497..ae40e169 100644 Binary files a/docs/reference/display_stars-4.png and b/docs/reference/display_stars-4.png differ diff --git a/docs/reference/display_stars-6.png b/docs/reference/display_stars-6.png index c7f14b85..d18c56a5 100644 Binary files a/docs/reference/display_stars-6.png and b/docs/reference/display_stars-6.png differ diff --git a/docs/reference/display_stars-8.png b/docs/reference/display_stars-8.png index 4211dc47..4c8a83c5 100644 Binary files a/docs/reference/display_stars-8.png and b/docs/reference/display_stars-8.png differ diff --git a/docs/reference/display_stars.html b/docs/reference/display_stars.html index 7e2ac1d2..4308f586 100644 --- a/docs/reference/display_stars.html +++ b/docs/reference/display_stars.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/display_stereo-3.png b/docs/reference/display_stereo-3.png index f924cb75..ccaa9b3e 100644 Binary files a/docs/reference/display_stereo-3.png and b/docs/reference/display_stereo-3.png differ diff --git a/docs/reference/display_stereo.html b/docs/reference/display_stereo.html index 0f30c180..d7b7669b 100644 --- a/docs/reference/display_stereo.html +++ b/docs/reference/display_stereo.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/display_trails-1.png b/docs/reference/display_trails-1.png new file mode 100644 index 00000000..50eaad59 Binary files /dev/null and b/docs/reference/display_trails-1.png differ diff --git a/docs/reference/display_trails.html b/docs/reference/display_trails.html index baba05e2..3789a483 100644 --- a/docs/reference/display_trails.html +++ b/docs/reference/display_trails.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 @@ -128,6 +128,15 @@

Arguments

+
+

Examples

+
animate_trails(flea[,1:6], col=flea$species)
+#> Converting input data to the required matrix format.
+#> Using half_range 66
+
+
+
+
@@ -130,7 +130,7 @@

Arguments

palette
-

name of color palette for point colour, used by grDevices::hcl.colors, default "Zissou 1"

+

name of color palette for point colour, used by hcl.colors, default "Zissou 1"

...
@@ -159,7 +159,8 @@

Examples

animate(flea[, 1:6], tour_path = grand_tour(), - display = display_xy(axes = "bottomleft") + display = display_xy(), + scale = TRUE ) #> Converting input data to the required matrix format. #> Using half_range 66 @@ -176,7 +177,7 @@

Examples

animate_xy(flea[, 1:3], tour_path = guided_tour(holes()), sphere = TRUE) #> Converting input data to the required matrix format. -#> Value 0.869 1.5 % better - NEW BASIS +#> Value 0.858 4.2 % better - NEW BASIS #> Using half_range 3.2 animate_xy(flea[, 1:6], center = FALSE) @@ -205,7 +206,7 @@

Examples

#> Using half_range 66 animate_xy(flea[, -7], col = flea$species, - pch = as.numeric(flea$species)) + pch = flea$species) #> Converting input data to the required matrix format. #> Using half_range 66 diff --git a/docs/reference/draw_slice_center.html b/docs/reference/draw_slice_center.html index 97a15f16..894a3df3 100644 --- a/docs/reference/draw_slice_center.html +++ b/docs/reference/draw_slice_center.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/draw_tour_axes-1.png b/docs/reference/draw_tour_axes-1.png index 9af8fbf5..4f54e75c 100644 Binary files a/docs/reference/draw_tour_axes-1.png and b/docs/reference/draw_tour_axes-1.png differ diff --git a/docs/reference/draw_tour_axes-2.png b/docs/reference/draw_tour_axes-2.png index 4b2388f9..ddbb3dba 100644 Binary files a/docs/reference/draw_tour_axes-2.png and b/docs/reference/draw_tour_axes-2.png differ diff --git a/docs/reference/draw_tour_axes.html b/docs/reference/draw_tour_axes.html index 2369448f..2955301c 100644 --- a/docs/reference/draw_tour_axes.html +++ b/docs/reference/draw_tour_axes.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/estimate_eps.html b/docs/reference/estimate_eps.html index 3accf3a2..e9f9eae9 100644 --- a/docs/reference/estimate_eps.html +++ b/docs/reference/estimate_eps.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/eucl_norm_sq.html b/docs/reference/eucl_norm_sq.html index 843afa30..5d22232d 100644 --- a/docs/reference/eucl_norm_sq.html +++ b/docs/reference/eucl_norm_sq.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/find_best_dir.html b/docs/reference/find_best_dir.html index 93e39406..857af837 100644 --- a/docs/reference/find_best_dir.html +++ b/docs/reference/find_best_dir.html @@ -19,7 +19,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/find_best_frozen_dir.html b/docs/reference/find_best_frozen_dir.html index 4c02bd57..330bfbab 100644 --- a/docs/reference/find_best_frozen_dir.html +++ b/docs/reference/find_best_frozen_dir.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/find_frozen_path_peak.html b/docs/reference/find_frozen_path_peak.html index b87693ad..a731cf11 100644 --- a/docs/reference/find_frozen_path_peak.html +++ b/docs/reference/find_frozen_path_peak.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/find_path_peak.html b/docs/reference/find_path_peak.html index d9434d7a..47c282f3 100644 --- a/docs/reference/find_path_peak.html +++ b/docs/reference/find_path_peak.html @@ -20,7 +20,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/find_platform.html b/docs/reference/find_platform.html index bb9a660c..77462c21 100644 --- a/docs/reference/find_platform.html +++ b/docs/reference/find_platform.html @@ -20,7 +20,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/freeze.html b/docs/reference/freeze.html index 45f43f64..a1a0ab75 100644 --- a/docs/reference/freeze.html +++ b/docs/reference/freeze.html @@ -19,7 +19,7 @@ tourr - 0.6.18 + 1.0.0 @@ -89,23 +89,23 @@

Examples

input <- basis_random(4, 2) freeze(input, frozen) -#> [,1] [,2] -#> [1,] 0.2013621 0.92760715 -#> [2,] -0.6285967 0.31497121 -#> [3,] 0.0000000 0.00000000 -#> [4,] -0.7501527 -0.02552751 +#> [,1] [,2] +#> [1,] 0.1805913 0.5180353 +#> [2,] 0.1388004 -0.2229295 +#> [3,] 0.0000000 0.0000000 +#> [4,] -0.8236207 -0.3847669 thaw(input, frozen) -#> [,1] [,2] -#> [1,] 0.1743847 0.80333136 -#> [2,] -0.5443807 0.27277307 -#> [3,] 0.5000000 0.50000000 -#> [4,] -0.6496513 -0.02210747 +#> [,1] [,2] +#> [1,] 0.1563966 0.4486317 +#> [2,] 0.1202047 -0.1930626 +#> [3,] 0.5000000 0.5000000 +#> [4,] -0.7132764 -0.3332179 freeze(basis_random(4, 2), frozen) -#> [,1] [,2] -#> [1,] 0.8050244 -0.08426066 -#> [2,] 0.5089694 -0.27067294 -#> [3,] 0.0000000 0.00000000 -#> [4,] -0.2805265 -0.88733492 +#> [,1] [,2] +#> [1,] 0.01420098 0.75484763 +#> [2,] 0.13410974 -0.52329523 +#> [3,] 0.00000000 0.00000000 +#> [4,] -0.95820572 0.04149124
diff --git a/docs/reference/frozen_guided_tour.html b/docs/reference/frozen_guided_tour.html index fdf6aae6..afc1a5d3 100644 --- a/docs/reference/frozen_guided_tour.html +++ b/docs/reference/frozen_guided_tour.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/frozen_tour-1.png b/docs/reference/frozen_tour-1.png index 8d530cbf..fb39abab 100644 Binary files a/docs/reference/frozen_tour-1.png and b/docs/reference/frozen_tour-1.png differ diff --git a/docs/reference/frozen_tour-2.png b/docs/reference/frozen_tour-2.png index 05b91344..42b65cc6 100644 Binary files a/docs/reference/frozen_tour-2.png and b/docs/reference/frozen_tour-2.png differ diff --git a/docs/reference/frozen_tour-3.png b/docs/reference/frozen_tour-3.png index 91f2b6d3..cf3fc9d6 100644 Binary files a/docs/reference/frozen_tour-3.png and b/docs/reference/frozen_tour-3.png differ diff --git a/docs/reference/frozen_tour-4.png b/docs/reference/frozen_tour-4.png index ca1bb02c..9f1e5bf6 100644 Binary files a/docs/reference/frozen_tour-4.png and b/docs/reference/frozen_tour-4.png differ diff --git a/docs/reference/frozen_tour.html b/docs/reference/frozen_tour.html index 00e55bab..042d1493 100644 --- a/docs/reference/frozen_tour.html +++ b/docs/reference/frozen_tour.html @@ -20,7 +20,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/geodesic_info.html b/docs/reference/geodesic_info.html index 8ce28931..a696f9d9 100644 --- a/docs/reference/geodesic_info.html +++ b/docs/reference/geodesic_info.html @@ -23,7 +23,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/geodesic_path.html b/docs/reference/geodesic_path.html index 75de3e37..86432f21 100644 --- a/docs/reference/geodesic_path.html +++ b/docs/reference/geodesic_path.html @@ -19,7 +19,7 @@ tourr - 0.6.18 + 1.0.0 @@ -121,12 +121,12 @@

Examples

path <- geodesic_path(a, b) path$dist -#> [1] 1.881076 +#> [1] 1.202971 all.equal(a, path$interpolate(0)) #> [1] TRUE # Not true generally - a rotated into plane of b all.equal(b, path$interpolate(1)) -#> [1] "Mean relative difference: 1.105405" +#> [1] "Mean relative difference: 1.179555"
diff --git a/docs/reference/grand_tour-1.png b/docs/reference/grand_tour-1.png index b10a35a3..60321b02 100644 Binary files a/docs/reference/grand_tour-1.png and b/docs/reference/grand_tour-1.png differ diff --git a/docs/reference/grand_tour-2.png b/docs/reference/grand_tour-2.png index e0de05f8..6ab59187 100644 Binary files a/docs/reference/grand_tour-2.png and b/docs/reference/grand_tour-2.png differ diff --git a/docs/reference/grand_tour-3.png b/docs/reference/grand_tour-3.png index 3643280e..3788506c 100644 Binary files a/docs/reference/grand_tour-3.png and b/docs/reference/grand_tour-3.png differ diff --git a/docs/reference/grand_tour-4.png b/docs/reference/grand_tour-4.png index 668bd714..20838bfa 100644 Binary files a/docs/reference/grand_tour-4.png and b/docs/reference/grand_tour-4.png differ diff --git a/docs/reference/grand_tour.html b/docs/reference/grand_tour.html index fb2c35c3..e1747d9b 100644 --- a/docs/reference/grand_tour.html +++ b/docs/reference/grand_tour.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/guided_section_tour.html b/docs/reference/guided_section_tour.html index 60d13348..27cb5549 100644 --- a/docs/reference/guided_section_tour.html +++ b/docs/reference/guided_section_tour.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/guided_tour-1.png b/docs/reference/guided_tour-1.png index 1afd64ff..0670a267 100644 Binary files a/docs/reference/guided_tour-1.png and b/docs/reference/guided_tour-1.png differ diff --git a/docs/reference/guided_tour-2.png b/docs/reference/guided_tour-2.png index 00e689a7..32623544 100644 Binary files a/docs/reference/guided_tour-2.png and b/docs/reference/guided_tour-2.png differ diff --git a/docs/reference/guided_tour-3.png b/docs/reference/guided_tour-3.png index 2a52934f..c55616bd 100644 Binary files a/docs/reference/guided_tour-3.png and b/docs/reference/guided_tour-3.png differ diff --git a/docs/reference/guided_tour-4.png b/docs/reference/guided_tour-4.png index b37d2a44..322dc0f1 100644 Binary files a/docs/reference/guided_tour-4.png and b/docs/reference/guided_tour-4.png differ diff --git a/docs/reference/guided_tour-5.png b/docs/reference/guided_tour-5.png index bd9ea111..0933792c 100644 Binary files a/docs/reference/guided_tour-5.png and b/docs/reference/guided_tour-5.png differ diff --git a/docs/reference/guided_tour.html b/docs/reference/guided_tour.html index 5f1adf1b..c1b7fcaf 100644 --- a/docs/reference/guided_tour.html +++ b/docs/reference/guided_tour.html @@ -19,7 +19,7 @@ tourr - 0.6.18 + 1.0.0 @@ -142,185 +142,187 @@

See also

Examples

-
animate_xy(flea[, 1:6], guided_tour(holes()), sphere = TRUE)
-#> Converting input data to the required matrix format.
-#> Value  0.811   2.7 % better  - NEW BASIS
+    
flea_std <- apply(flea[,1:6], 2, function(x) (x-mean(x))/sd(x))
+animate_xy(flea_std, guided_tour(holes()), sphere = TRUE)
+#> Value  0.878   2.6 % better  - NEW BASIS
 #> Using half_range 3.8
 
 # \donttest{
-animate_xy(flea[, 1:6], guided_tour(holes(), search_f = search_better_random), sphere = TRUE)
-#> Converting input data to the required matrix format.
-#> Old 0.8061676 
-#> New 0.8021759 try 1 
-#> Accept with probability, prob = 0.7582966 
+animate_xy(flea_std, guided_tour(holes(), search_f = search_better_random), sphere = TRUE)
+#> Old 0.8214868 
+#> New 0.8117052 try 2 
+#> Accept with probability, prob = 0.3414302 
 #> Using half_range 3.8
 
-animate_dist(flea[, 1:6], guided_tour(holes(), 1), sphere = TRUE)
-#> Converting input data to the required matrix format.
-#> Value  0.752   9.7 % better  - NEW BASIS
+animate_dist(flea_std, guided_tour(holes(), 1), sphere = TRUE)
+#> Value  0.736   3.4 % better  - NEW BASIS
 #> Using half_range 3.8
 
 
-animate_xy(flea[, 1:6], guided_tour(lda_pp(flea$species)), sphere = TRUE, col = flea$species)
-#> Converting input data to the required matrix format.
-#> Value  0.889   11.9 % better  - NEW BASIS
+animate_xy(flea_std, guided_tour(lda_pp(flea$species)), sphere = TRUE, col = flea$species)
+#> Value  0.962   6.4 % better  - NEW BASIS
 #> Using half_range 3.8
 
 # save_history is particularly useful in conjunction with the
 # guided tour as it allows us to look at the tour path in many different
 # ways
-f <- flea[, 1:3]
+f <- flea_std[, 1:3]
 tries <- replicate(5, save_history(f, guided_tour(holes())), simplify = FALSE)
-#> Converting input data to the required matrix format.
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
+#> Value  0.967   5.0 % better  - NEW BASIS
+#> Value  0.972   0.6 % better  - NEW BASIS
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
 #> No better bases found after 25 tries.  Giving up.
 #> Final projection: 
-#> -0.834  0.161  
-#> 0.512  0.580  
-#> 0.204  -0.799  
-#> Converting input data to the required matrix format.
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
+#> -0.673  -0.705  
+#> -0.657  0.433  
+#> -0.338  0.562  
+#> Value  0.937   19.6 % better  - NEW BASIS
+#> Value  0.972   3.7 % better  - NEW BASIS
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
 #> No better bases found after 25 tries.  Giving up.
 #> Final projection: 
-#> -0.724  -0.026  
-#> -0.676  0.221  
-#> 0.134  0.975  
-#> Converting input data to the required matrix format.
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
+#> 0.876  0.434  
+#> -0.222  0.750  
+#> -0.429  0.499  
+#> Value  0.944   34.0 % better  - NEW BASIS
+#> Value  0.972   3.0 % better  - NEW BASIS
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
 #> No better bases found after 25 tries.  Giving up.
 #> Final projection: 
-#> 0.171  -0.959  
-#> 0.738  -0.026  
-#> 0.653  0.281  
-#> Converting input data to the required matrix format.
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
+#> -0.937  -0.283  
+#> 0.097  -0.776  
+#> 0.336  -0.563  
+#> Value  0.864   25.2 % better  - NEW BASIS
+#> Value  0.964   11.6 % better  - NEW BASIS
+#> Value  0.972   0.8 % better  - NEW BASIS
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.0 % better 
 #> No better bases found after 25 tries.  Giving up.
 #> Final projection: 
-#> -0.284  -0.932  
-#> -0.811  0.108  
-#> 0.512  -0.346  
-#> Converting input data to the required matrix format.
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
-#> Value  1.582   0.0 % better 
+#> -0.764  0.610  
+#> -0.580  -0.509  
+#> -0.281  -0.607  
+#> Value  0.971   8.2 % better  - NEW BASIS
+#> Value  0.972   0.1 % better 
+#> Value  0.972   0.1 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.1 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.1 % better 
+#> Value  0.972   0.1 % better 
+#> Value  0.972   0.1 % better 
+#> Value  0.972   0.1 % better 
+#> Value  0.972   0.1 % better 
+#> Value  0.972   0.1 % better 
+#> Value  0.972   0.1 % better 
+#> Value  0.972   0.1 % better 
+#> Value  0.972   0.1 % better 
+#> Value  0.972   0.1 % better 
+#> Value  0.972   0.0 % better 
+#> Value  0.972   0.1 % better 
+#> Value  0.972   0.1 % better 
+#> Value  0.972   0.1 % better 
+#> Value  0.972   0.1 % better 
+#> Value  0.972   0.1 % better 
+#> Value  0.972   0.1 % better 
+#> Value  0.972   0.1 % better 
+#> Value  0.972   0.1 % better 
 #> No better bases found after 25 tries.  Giving up.
 #> Final projection: 
-#> 0.308  -0.032  
-#> -0.539  0.818  
-#> 0.784  0.574  
+#> -0.743  -0.649  
+#> 0.409  -0.632  
+#> 0.530  -0.423  
 # }
 
 
diff --git a/docs/reference/holes.html b/docs/reference/holes.html index e0858d07..b9db9e3e 100644 --- a/docs/reference/holes.html +++ b/docs/reference/holes.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0
diff --git a/docs/reference/index.html b/docs/reference/index.html index e374cb57..f003b833 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0
diff --git a/docs/reference/interpolate.html b/docs/reference/interpolate.html index d62f9002..8859fc3f 100644 --- a/docs/reference/interpolate.html +++ b/docs/reference/interpolate.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0 @@ -93,11 +93,11 @@

Examples

dim(t1) #> [1] 6 1 10 dim(interpolate(t1, 0.01)) -#> [1] 6 1 1117 +#> [1] 6 1 1155 dim(interpolate(t1, 0.05)) -#> [1] 6 1 228 +#> [1] 6 1 237 dim(interpolate(t1, 0.1)) -#> [1] 6 1 117 +#> [1] 6 1 120
diff --git a/docs/reference/is_orthonormal.html b/docs/reference/is_orthonormal.html index fafeb16e..0c6367b1 100644 --- a/docs/reference/is_orthonormal.html +++ b/docs/reference/is_orthonormal.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/lda_pp.html b/docs/reference/lda_pp.html index 302bdef1..40edeff6 100644 --- a/docs/reference/lda_pp.html +++ b/docs/reference/lda_pp.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/linear_breaks.html b/docs/reference/linear_breaks.html index 3120f6f7..17cbae21 100644 --- a/docs/reference/linear_breaks.html +++ b/docs/reference/linear_breaks.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/little_tour-1.png b/docs/reference/little_tour-1.png index fe16a902..1c1f2bbf 100644 Binary files a/docs/reference/little_tour-1.png and b/docs/reference/little_tour-1.png differ diff --git a/docs/reference/little_tour-2.png b/docs/reference/little_tour-2.png index fd49d5ef..6cdbbd27 100644 Binary files a/docs/reference/little_tour-2.png and b/docs/reference/little_tour-2.png differ diff --git a/docs/reference/little_tour-3.png b/docs/reference/little_tour-3.png index 09f114d2..dbd43158 100644 Binary files a/docs/reference/little_tour-3.png and b/docs/reference/little_tour-3.png differ diff --git a/docs/reference/little_tour-4.png b/docs/reference/little_tour-4.png index ff2cc298..093a5641 100644 Binary files a/docs/reference/little_tour-4.png and b/docs/reference/little_tour-4.png differ diff --git a/docs/reference/little_tour-5.png b/docs/reference/little_tour-5.png index 3472300e..9af2126e 100644 Binary files a/docs/reference/little_tour-5.png and b/docs/reference/little_tour-5.png differ diff --git a/docs/reference/little_tour.html b/docs/reference/little_tour.html index 5014c8a8..a9832bba 100644 --- a/docs/reference/little_tour.html +++ b/docs/reference/little_tour.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/local_tour-1.png b/docs/reference/local_tour-1.png index e6d9d885..abc97b84 100644 Binary files a/docs/reference/local_tour-1.png and b/docs/reference/local_tour-1.png differ diff --git a/docs/reference/local_tour-2.png b/docs/reference/local_tour-2.png index 5177179d..81d8e5ec 100644 Binary files a/docs/reference/local_tour-2.png and b/docs/reference/local_tour-2.png differ diff --git a/docs/reference/local_tour-3.png b/docs/reference/local_tour-3.png index 19232c6b..d1949d9b 100644 Binary files a/docs/reference/local_tour-3.png and b/docs/reference/local_tour-3.png differ diff --git a/docs/reference/local_tour.html b/docs/reference/local_tour.html index ca35f55c..46253a01 100644 --- a/docs/reference/local_tour.html +++ b/docs/reference/local_tour.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/manual_slice-1.png b/docs/reference/manual_slice-1.png index d9a58877..47796c07 100644 Binary files a/docs/reference/manual_slice-1.png and b/docs/reference/manual_slice-1.png differ diff --git a/docs/reference/manual_slice.html b/docs/reference/manual_slice.html index 155ac489..e33f1f46 100644 --- a/docs/reference/manual_slice.html +++ b/docs/reference/manual_slice.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0 @@ -129,7 +129,7 @@

Arguments

palette
-

name of color palette for point colour, used by grDevices::hcl.colors, default "Zissou 1"

+

name of color palette for point colour, used by hcl.colors, default "Zissou 1"

...
diff --git a/docs/reference/mapColors.html b/docs/reference/mapColors.html index 5aafefae..42c756e4 100644 --- a/docs/reference/mapColors.html +++ b/docs/reference/mapColors.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 @@ -76,7 +76,7 @@

Arguments

palette
-

name of color palette for point colour, used by grDevices::hcl.colors, default "Zissou 1"

+

name of color palette for point colour, used by hcl.colors, default "Zissou 1"

diff --git a/docs/reference/mapShapes.html b/docs/reference/mapShapes.html index c5f96c84..a3b77eb8 100644 --- a/docs/reference/mapShapes.html +++ b/docs/reference/mapShapes.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/new_geodesic_path.html b/docs/reference/new_geodesic_path.html index 4a7a32d4..585d19fa 100644 --- a/docs/reference/new_geodesic_path.html +++ b/docs/reference/new_geodesic_path.html @@ -21,7 +21,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/new_tour.html b/docs/reference/new_tour.html index 53e4addc..aebe8a0f 100644 --- a/docs/reference/new_tour.html +++ b/docs/reference/new_tour.html @@ -19,7 +19,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/norm_bin.html b/docs/reference/norm_bin.html index 0eb154c9..d49c8e33 100644 --- a/docs/reference/norm_bin.html +++ b/docs/reference/norm_bin.html @@ -21,7 +21,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/normalise.html b/docs/reference/normalise.html index 880358ad..24843ee0 100644 --- a/docs/reference/normalise.html +++ b/docs/reference/normalise.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/orthonormalise.html b/docs/reference/orthonormalise.html index 4ee59fb1..29bb8d41 100644 --- a/docs/reference/orthonormalise.html +++ b/docs/reference/orthonormalise.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/orthonormalise_by.html b/docs/reference/orthonormalise_by.html index a4c8b7af..632858af 100644 --- a/docs/reference/orthonormalise_by.html +++ b/docs/reference/orthonormalise_by.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/path_curves.html b/docs/reference/path_curves.html index e2c9baa1..d871fd8e 100644 --- a/docs/reference/path_curves.html +++ b/docs/reference/path_curves.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/path_dist.html b/docs/reference/path_dist.html index 455f4de8..71208415 100644 --- a/docs/reference/path_dist.html +++ b/docs/reference/path_dist.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 @@ -80,8 +80,8 @@

Arguments

Examples

# This code is to be used as an example but you should increase
 # the max from 2 to 50, say, to check tour coverage.
-grand <- interpolate(save_history(flea[, 1:6], max = 2), 0.2)
-#> Converting input data to the required matrix format.
+flea_std <- apply(flea[,1:6], 2, function(x) (x-mean(x))/sd(x))
+grand <- interpolate(save_history(flea_std, max = 2), 0.2)
 # The grand tour  -----------------------------
 # Look at the tour path in a tour, how well does it cover a sphere
 # Using MDS to summarise the high-d space of projections
@@ -100,149 +100,14 @@ 

Examples

# Compare five guided tours ----------------------------- holes1d <- guided_tour(holes(), 1) -tour_reps <- replicate(5, save_history(flea[, 1:6], holes1d, max = 2), +tour_reps <- replicate(5, save_history(flea_std, holes1d, max = 2), simplify = FALSE ) -#> Converting input data to the required matrix format. -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> No better bases found after 25 tries. Giving up. -#> Final projection: -#> -0.240 -0.125 0.901 -0.318 0.115 0.038 -#> Converting input data to the required matrix format. -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> No better bases found after 25 tries. Giving up. -#> Final projection: -#> 0.701 -0.013 0.244 -0.042 0.441 -0.502 -#> Converting input data to the required matrix format. -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> No better bases found after 25 tries. Giving up. -#> Final projection: -#> -0.844 0.436 0.102 0.110 -0.023 -0.272 -#> Converting input data to the required matrix format. -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> No better bases found after 25 tries. Giving up. -#> Final projection: -#> 0.142 -0.126 0.021 0.281 -0.529 0.777 -#> Converting input data to the required matrix format. -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> Value 2.541 0.0 % better -#> No better bases found after 25 tries. Giving up. -#> Final projection: -#> -0.512 -0.683 0.019 0.203 -0.239 -0.417 +#> Value 1.175 161.5 % better - NEW BASIS +#> Value 1.256 124.2 % better - NEW BASIS +#> Value 1.099 161.1 % better - NEW BASIS +#> Value 1.191 8.7 % better - NEW BASIS +#> Value 0.969 72.9 % better - NEW BASIS tour_reps2 <- lapply(tour_reps, interpolate, 0.2) bases <- unlist(lapply(tour_reps2, as.list), recursive = FALSE) @@ -253,15 +118,8 @@

Examples

ord <- as.data.frame(cmdscale(d, 2)) info <- cbind(ord, index_values) -if (require("ggplot2")) { - ggplot(data = info, aes(x = step, y = value, group = try)) + - geom_line() - ##ggplot(data = info, aes(x = V1, y = V2, group = try)) + - ## geom_path() + - ## geom_point(aes(size = value)) + - ## coord_equal() - ##last_plot() + facet_wrap(~try) -} +ggplot(data = info, aes(x = step, y = value, group = try)) + + geom_line() #> Don't know how to automatically pick scale for object of type <function>. #> Defaulting to continuous. #> Error in geom_line(): Problem while computing aesthetics. @@ -271,6 +129,11 @@

Examples

#> The following aesthetics are invalid: #> `x = step` #> Did you mistype the name of a data column or forget to add `after_stat()`? +##ggplot(data = info, aes(x = V1, y = V2, group = try)) + +## geom_path() + +## geom_point(aes(size = value)) + +## coord_equal() +##last_plot() + facet_wrap(~try)
diff --git a/docs/reference/path_index-1.png b/docs/reference/path_index-1.png index df91c494..5def7766 100644 Binary files a/docs/reference/path_index-1.png and b/docs/reference/path_index-1.png differ diff --git a/docs/reference/path_index-2.png b/docs/reference/path_index-2.png index 62c9da38..15d364c5 100644 Binary files a/docs/reference/path_index-2.png and b/docs/reference/path_index-2.png differ diff --git a/docs/reference/path_index.html b/docs/reference/path_index.html index 696cd608..c44d658d 100644 --- a/docs/reference/path_index.html +++ b/docs/reference/path_index.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 @@ -93,87 +93,92 @@

See also

Examples

fl_holes <- save_history(flea[, 1:6], guided_tour(holes()), sphere = TRUE)
 #> Converting input data to the required matrix format.
-#> Value  0.817   6.0 % better  - NEW BASIS
-#> Value  0.853   4.4 % better  - NEW BASIS
-#> Value  0.862   1.0 % better  - NEW BASIS
-#> Value  0.862   0.1 % better 
-#> Value  0.863   0.2 % better  - NEW BASIS
-#> Value  0.866   0.4 % better  - NEW BASIS
-#> Value  0.867   0.1 % better  - NEW BASIS
-#> Value  0.869   0.2 % better  - NEW BASIS
-#> Value  0.871   0.2 % better  - NEW BASIS
-#> Value  0.873   0.2 % better  - NEW BASIS
-#> Value  0.876   0.4 % better  - NEW BASIS
-#> Value  0.876   0.0 % better 
-#> Value  0.877   0.0 % better 
-#> Value  0.877   0.1 % better 
-#> Value  0.877   0.1 % better 
-#> Value  0.876   0.0 % better 
-#> Value  0.877   0.1 % better  - NEW BASIS
-#> Value  0.878   0.1 % better 
-#> Value  0.881   0.4 % better  - NEW BASIS
-#> Value  0.882   0.2 % better  - NEW BASIS
-#> Value  0.883   0.0 % better 
-#> Value  0.883   0.1 % better 
-#> Value  0.883   0.0 % better 
-#> Value  0.883   0.1 % better  - NEW BASIS
-#> Value  0.884   0.1 % better  - NEW BASIS
-#> Value  0.885   0.1 % better  - NEW BASIS
-#> Value  0.894   1.0 % better  - NEW BASIS
-#> Value  0.898   0.4 % better  - NEW BASIS
-#> Value  0.903   0.6 % better  - NEW BASIS
-#> Value  0.906   0.3 % better  - NEW BASIS
-#> Value  0.910   0.5 % better  - NEW BASIS
-#> Value  0.914   0.3 % better  - NEW BASIS
+#> Value  0.845   1.3 % better  - NEW BASIS
+#> Value  0.867   2.6 % better  - NEW BASIS
+#> Value  0.875   1.0 % better  - NEW BASIS
+#> Value  0.880   0.5 % better  - NEW BASIS
+#> Value  0.901   2.4 % better  - NEW BASIS
+#> Value  0.902   0.1 % better 
+#> Value  0.902   0.1 % better  - NEW BASIS
+#> Value  0.904   0.2 % better  - NEW BASIS
+#> Value  0.904   0.0 % better 
+#> Value  0.904   0.0 % better 
+#> Value  0.904   0.0 % better 
+#> Value  0.904   0.1 % better 
+#> Value  0.905   0.1 % better 
+#> Value  0.905   0.1 % better 
+#> Value  0.905   0.1 % better  - NEW BASIS
+#> Value  0.906   0.1 % better 
+#> Value  0.906   0.1 % better  - NEW BASIS
+#> Value  0.906   0.0 % better 
+#> Value  0.908   0.2 % better  - NEW BASIS
+#> Value  0.908   0.0 % better 
+#> Value  0.908   0.0 % better 
+#> Value  0.909   0.2 % better  - NEW BASIS
+#> Value  0.910   0.0 % better 
+#> Value  0.911   0.2 % better  - NEW BASIS
+#> Value  0.912   0.1 % better  - NEW BASIS
+#> Value  0.913   0.1 % better  - NEW BASIS
+#> Value  0.914   0.1 % better 
 #> Value  0.914   0.1 % better 
 #> Value  0.916   0.3 % better  - NEW BASIS
-#> Value  0.919   0.3 % better  - NEW BASIS
-#> Value  0.924   0.5 % better  - NEW BASIS
-#> Value  0.925   0.2 % better  - NEW BASIS
-#> Value  0.926   0.1 % better 
-#> Value  0.927   0.2 % better  - NEW BASIS
-#> Value  0.928   0.1 % better  - NEW BASIS
+#> Value  0.917   0.1 % better  - NEW BASIS
+#> Value  0.917   0.0 % better 
+#> Value  0.918   0.1 % better  - NEW BASIS
+#> Value  0.919   0.1 % better  - NEW BASIS
+#> Value  0.921   0.2 % better  - NEW BASIS
+#> Value  0.921   0.1 % better 
+#> Value  0.922   0.2 % better  - NEW BASIS
+#> Value  0.927   0.5 % better  - NEW BASIS
 #> Value  0.929   0.2 % better  - NEW BASIS
-#> Value  0.932   0.3 % better  - NEW BASIS
-#> Value  0.934   0.2 % better  - NEW BASIS
-#> Value  0.935   0.1 % better 
-#> Value  0.934   0.0 % better 
-#> Value  0.934   0.1 % better 
-#> Value  0.934   0.0 % better 
-#> Value  0.934   0.0 % better 
-#> Value  0.934   0.0 % better 
+#> Value  0.931   0.3 % better  - NEW BASIS
+#> Value  0.932   0.1 % better 
+#> Value  0.932   0.1 % better 
+#> Value  0.932   0.1 % better 
+#> Value  0.932   0.0 % better 
+#> Value  0.932   0.1 % better 
+#> Value  0.932   0.1 % better  - NEW BASIS
+#> Value  0.933   0.0 % better 
+#> Value  0.933   0.1 % better 
+#> Value  0.933   0.0 % better 
+#> Value  0.934   0.1 % better  - NEW BASIS
 #> Value  0.934   0.0 % better 
 #> Value  0.935   0.1 % better 
 #> Value  0.934   0.0 % better 
-#> Value  0.934   0.0 % better 
-#> Value  0.934   0.0 % better 
 #> Value  0.934   0.1 % better 
 #> Value  0.934   0.1 % better 
 #> Value  0.934   0.0 % better 
 #> Value  0.934   0.1 % better 
+#> Value  0.934   0.1 % better 
+#> Value  0.934   0.1 % better 
+#> Value  0.934   0.1 % better 
 #> Value  0.934   0.0 % better 
-#> Value  0.934   -0.0 % better 
 #> Value  0.934   0.0 % better 
 #> Value  0.934   0.1 % better 
 #> Value  0.934   0.0 % better 
+#> Value  0.934   0.1 % better 
+#> Value  0.934   0.1 % better 
 #> Value  0.934   0.0 % better 
+#> Value  0.934   0.1 % better 
 #> Value  0.934   0.0 % better 
 #> Value  0.934   0.0 % better 
+#> Value  0.934   0.1 % better 
+#> Value  0.934   0.1 % better 
+#> Value  0.934   0.1 % better 
 #> Value  0.934   0.0 % better 
 #> No better bases found after 25 tries.  Giving up.
 #> Final projection: 
-#> 0.706  0.645  
-#> -0.416  0.666  
-#> 0.139  0.021  
-#> -0.129  0.239  
-#> 0.537  -0.267  
-#> 0.061  -0.109  
+#> -0.774  0.580  
+#> 0.351  0.692  
+#> -0.108  -0.005  
+#> 0.101  0.229  
+#> -0.494  -0.346  
+#> -0.106  -0.110  
 path_index(fl_holes, holes())
-#>  [1] 0.7709381 0.8170550 0.8532431 0.8616238 0.8630056 0.8661705 0.8671572
-#>  [8] 0.8686687 0.8705462 0.8725480 0.8762733 0.8771689 0.8806417 0.8824408
-#> [15] 0.8834002 0.8843186 0.8852353 0.8944692 0.8983732 0.9033724 0.9062098
-#> [22] 0.9104019 0.9135817 0.9163340 0.9193837 0.9236878 0.9251671 0.9268696
-#> [29] 0.9278338 0.9294604 0.9318559 0.9338224 0.9338224
+#>  [1] 0.8337691 0.8448838 0.8666414 0.8753518 0.8797158 0.9011892 0.9023293
+#>  [8] 0.9037842 0.9047929 0.9058242 0.9076701 0.9092279 0.9112091 0.9122437
+#> [15] 0.9132170 0.9156420 0.9166765 0.9177388 0.9187142 0.9206339 0.9220459
+#> [22] 0.9267844 0.9287189 0.9312699 0.9323319 0.9336372 0.9336372
 #> attr(,"class")
 #> [1] "path_index"
 ## path_index(fl_holes, cmass())
@@ -186,33 +191,23 @@ 

Examples

# Use interpolate to show all intermediate bases as well hi <- path_index(interpolate(fl_holes), holes()) hi -#> [1] 0.7709381 0.7736229 0.7764434 0.7793693 0.7823699 0.7854136 0.7884687 -#> [8] 0.7915035 0.7944869 0.7973881 0.8001775 0.8028268 0.8053094 0.8076009 -#> [15] 0.8096793 0.8115258 0.8131246 0.8144635 0.8155341 0.8163314 0.8168546 -#> [22] 0.8168546 0.8201506 0.8233946 0.8265518 0.8295920 0.8324894 0.8352235 -#> [29] 0.8377786 0.8401436 0.8423113 0.8442781 0.8460431 0.8476074 0.8489733 -#> [36] 0.8501442 0.8511234 0.8519144 0.8525202 0.8529433 0.8531855 0.8532481 -#> [43] 0.8532481 0.8551340 0.8568056 0.8582467 0.8594440 0.8603867 0.8610669 -#> [50] 0.8614798 0.8614798 0.8621798 0.8626708 0.8629524 0.8630263 0.8630263 -#> [57] 0.8640675 0.8649049 0.8655327 0.8659476 0.8661492 0.8661492 0.8667605 -#> [64] 0.8670901 0.8670901 0.8680146 0.8685820 0.8685820 0.8694905 0.8701159 -#> [71] 0.8704629 0.8704629 0.8714745 0.8721513 0.8724990 0.8724990 0.8738662 -#> [78] 0.8749202 0.8756672 0.8761154 0.8761154 0.8765997 0.8769340 0.8771508 -#> [85] 0.8771508 0.8777680 0.8783658 0.8789292 0.8794411 0.8798836 0.8802388 -#> [92] 0.8804902 0.8806233 0.8806233 0.8814770 0.8820561 0.8823715 0.8823715 -#> [99] 0.8828272 0.8831594 0.8833784 0.8833784 0.8839756 0.8842788 0.8842788 -#> [106] 0.8848921 0.8852019 0.8852019 0.8860485 0.8868730 0.8876812 0.8884740 -#> [113] 0.8892479 0.8899959 0.8907093 0.8913783 0.8919939 0.8925479 0.8930346 -#> [120] 0.8934501 0.8937930 0.8940636 0.8942637 0.8943955 0.8944610 0.8944610 -#> [127] 0.8959439 0.8970745 0.8978523 0.8982808 0.8982808 0.8995696 0.9006689 -#> [134] 0.9015808 0.9023062 0.9028453 0.9031972 0.9033603 0.9033603 0.9047206 -#> [141] 0.9056518 0.9061375 0.9061375 0.9078724 0.9091764 0.9100226 0.9103918 -#> [148] 0.9103918 0.9114133 0.9122521 0.9128952 0.9133323 0.9135557 0.9135557 -#> [155] 0.9148939 0.9158076 0.9162857 0.9162857 0.9177096 0.9186995 0.9192552 -#> [162] 0.9192552 0.9206049 0.9217163 0.9225891 0.9232211 0.9236083 0.9236083 -#> [169] 0.9245834 0.9250921 0.9250921 0.9261805 0.9267646 0.9267646 0.9275178 -#> [176] 0.9278264 0.9278264 0.9287383 0.9292865 0.9292865 0.9303541 0.9311616 -#> [183] 0.9316874 0.9316874 0.9328044 0.9335164 0.9335164 0.9335164 +#> [1] 0.8337691 0.8362300 0.8384916 0.8404956 0.8421847 0.8435047 0.8444061 +#> [8] 0.8448456 0.8448456 0.8484745 0.8517684 0.8547151 0.8573090 0.8595506 +#> [15] 0.8614466 0.8630094 0.8642565 0.8652099 0.8658955 0.8663419 0.8665798 +#> [22] 0.8665798 0.8691415 0.8712785 0.8729754 0.8742225 0.8750158 0.8750158 +#> [29] 0.8767385 0.8781081 0.8790930 0.8796671 0.8796671 0.8825587 0.8853671 +#> [36] 0.8880557 0.8905874 0.8929256 0.8950345 0.8968800 0.8984308 0.8996586 +#> [43] 0.9005391 0.9010526 0.9010526 0.9018927 0.9023032 0.9023032 0.9032015 +#> [50] 0.9036907 0.9036907 0.9042889 0.9046688 0.9046688 0.9052987 0.9056885 +#> [57] 0.9058242 0.9058242 0.9066236 0.9071882 0.9075307 0.9076663 0.9076663 +#> [64] 0.9084136 0.9089197 0.9091859 0.9091859 0.9101246 0.9107744 0.9111402 +#> [71] 0.9111402 0.9120046 0.9120046 0.9128105 0.9131994 0.9131994 0.9141399 +#> [78] 0.9148684 0.9153664 0.9156157 0.9156157 0.9163493 0.9166644 0.9166644 +#> [85] 0.9174183 0.9177302 0.9177302 0.9183520 0.9186724 0.9186724 0.9196046 +#> [92] 0.9202444 0.9205920 0.9205920 0.9213346 0.9218169 0.9220345 0.9220345 +#> [99] 0.9233451 0.9244748 0.9254011 0.9261039 0.9265660 0.9267735 0.9267735 +#> [106] 0.9280138 0.9286401 0.9286401 0.9300199 0.9308983 0.9312624 0.9312624 +#> [113] 0.9319944 0.9323151 0.9323151 0.9332274 0.9336253 0.9336253 #> attr(,"class") #> [1] "path_index" plot(hi) diff --git a/docs/reference/paths_index-1.png b/docs/reference/paths_index-1.png index 64794b21..534b465a 100644 Binary files a/docs/reference/paths_index-1.png and b/docs/reference/paths_index-1.png differ diff --git a/docs/reference/paths_index.html b/docs/reference/paths_index.html index 5367e868..ff622124 100644 --- a/docs/reference/paths_index.html +++ b/docs/reference/paths_index.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0
@@ -93,45 +93,45 @@

Examples

#> Value 2.541 0.0 % better #> No better bases found after 2 tries. Giving up. #> Final projection: -#> -0.152 0.640 0.469 -0.017 -0.588 0.034 +#> 0.649 -0.621 -0.285 0.199 0.240 0.124 #> Converting input data to the required matrix format. #> Value 2.541 0.0 % better #> No better bases found after 2 tries. Giving up. #> Final projection: -#> -0.010 -0.890 -0.378 -0.194 0.092 0.139 +#> -0.275 -0.278 0.462 -0.680 -0.124 -0.395 #> Converting input data to the required matrix format. #> Value 2.541 0.0 % better #> No better bases found after 2 tries. Giving up. #> Final projection: -#> 0.797 -0.239 0.068 -0.414 -0.036 -0.362 +#> -0.232 0.440 0.463 0.660 -0.026 -0.321 #> Converting input data to the required matrix format. #> Value 2.541 0.0 % better #> No better bases found after 2 tries. Giving up. #> Final projection: -#> 0.036 0.036 -0.082 -0.979 0.133 -0.124 +#> -0.663 -0.017 -0.015 -0.118 -0.549 0.495 #> Converting input data to the required matrix format. +#> Value 2.541 3.4 % better - NEW BASIS #> Value 2.541 0.0 % better #> No better bases found after 2 tries. Giving up. #> Final projection: -#> -0.018 -0.780 0.182 0.055 0.295 -0.517 +#> -0.053 -0.615 -0.336 0.624 -0.317 -0.130 # Interpolate between target bases itries <- lapply(tries, interpolate) paths <- paths_index(itries, holes()) head(paths) #> try step value improvement -#> 1 1 1 2.541494 0 -#> 2 2 1 2.541494 0 -#> 3 3 1 2.541009 0 -#> 4 4 1 2.541494 0 -#> 5 5 1 2.541494 0 +#> 1 1 1 2.541494 0.00000000 +#> 2 2 1 2.541494 0.00000000 +#> 3 3 1 2.541494 0.00000000 +#> 4 4 1 2.541494 0.00000000 +#> 5 5 1 2.456985 0.00000000 +#> 6 5 2 2.526657 0.06967194 if (require(ggplot2)) { ggplot(data = paths, aes(x=step, y=value, group = try)) + geom_line() ## ggplot(data = paths, aes(x=step, y=improvement, group = try)) + geom_line() } -#> `geom_line()`: Each group consists of only one observation. -#> Do you need to adjust the group aesthetic?
diff --git a/docs/reference/pda_pp.html b/docs/reference/pda_pp.html index cca5ea2a..4d2a0131 100644 --- a/docs/reference/pda_pp.html +++ b/docs/reference/pda_pp.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/planned_tour-1.png b/docs/reference/planned_tour-1.png index 95bd48f5..d0aa0f0c 100644 Binary files a/docs/reference/planned_tour-1.png and b/docs/reference/planned_tour-1.png differ diff --git a/docs/reference/planned_tour-3.png b/docs/reference/planned_tour-3.png index cfde271b..114e0125 100644 Binary files a/docs/reference/planned_tour-3.png and b/docs/reference/planned_tour-3.png differ diff --git a/docs/reference/planned_tour.html b/docs/reference/planned_tour.html index a4ca89db..ed4fd613 100644 --- a/docs/reference/planned_tour.html +++ b/docs/reference/planned_tour.html @@ -19,7 +19,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/plot.path_curve.html b/docs/reference/plot.path_curve.html index 54e3c286..8205f7bd 100644 --- a/docs/reference/plot.path_curve.html +++ b/docs/reference/plot.path_curve.html @@ -20,7 +20,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/plot.path_index.html b/docs/reference/plot.path_index.html index d532c97c..3adccccb 100644 --- a/docs/reference/plot.path_index.html +++ b/docs/reference/plot.path_index.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/proj_dist.html b/docs/reference/proj_dist.html index 8d282341..e5385683 100644 --- a/docs/reference/proj_dist.html +++ b/docs/reference/proj_dist.html @@ -19,7 +19,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/project3d.html b/docs/reference/project3d.html index 672e42f4..5f94b1a9 100644 --- a/docs/reference/project3d.html +++ b/docs/reference/project3d.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/radial_bin_weight_inv.html b/docs/reference/radial_bin_weight_inv.html index b76810b3..8bf226a5 100644 --- a/docs/reference/radial_bin_weight_inv.html +++ b/docs/reference/radial_bin_weight_inv.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/radial_tour-1.png b/docs/reference/radial_tour-1.png index a440f56f..2be66787 100644 Binary files a/docs/reference/radial_tour-1.png and b/docs/reference/radial_tour-1.png differ diff --git a/docs/reference/radial_tour-2.png b/docs/reference/radial_tour-2.png index 843cb6cf..052b5b51 100644 Binary files a/docs/reference/radial_tour-2.png and b/docs/reference/radial_tour-2.png differ diff --git a/docs/reference/radial_tour-3.png b/docs/reference/radial_tour-3.png index 5b7d482c..698567be 100644 Binary files a/docs/reference/radial_tour-3.png and b/docs/reference/radial_tour-3.png differ diff --git a/docs/reference/radial_tour-4.png b/docs/reference/radial_tour-4.png index 45a0b5c7..8ccf10aa 100644 Binary files a/docs/reference/radial_tour-4.png and b/docs/reference/radial_tour-4.png differ diff --git a/docs/reference/radial_tour-5.png b/docs/reference/radial_tour-5.png index e606e90d..17581ab0 100644 Binary files a/docs/reference/radial_tour-5.png and b/docs/reference/radial_tour-5.png differ diff --git a/docs/reference/radial_tour-6.png b/docs/reference/radial_tour-6.png index d17a6851..476cbb8e 100644 Binary files a/docs/reference/radial_tour-6.png and b/docs/reference/radial_tour-6.png differ diff --git a/docs/reference/radial_tour.html b/docs/reference/radial_tour.html index 12d01a28..196ce25c 100644 --- a/docs/reference/radial_tour.html +++ b/docs/reference/radial_tour.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/render.html b/docs/reference/render.html index 9a112ba6..f8702a80 100644 --- a/docs/reference/render.html +++ b/docs/reference/render.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/render_anim.html b/docs/reference/render_anim.html index fa80a45b..08639aaa 100644 --- a/docs/reference/render_anim.html +++ b/docs/reference/render_anim.html @@ -22,7 +22,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/render_gif.html b/docs/reference/render_gif.html index 55ea355f..42e20bb0 100644 --- a/docs/reference/render_gif.html +++ b/docs/reference/render_gif.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/render_proj-1.png b/docs/reference/render_proj-1.png index 95b96558..a0d873cc 100644 Binary files a/docs/reference/render_proj-1.png and b/docs/reference/render_proj-1.png differ diff --git a/docs/reference/render_proj.html b/docs/reference/render_proj.html index b7c24f0b..0e93b807 100644 --- a/docs/reference/render_proj.html +++ b/docs/reference/render_proj.html @@ -21,7 +21,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/rescale.html b/docs/reference/rescale.html index eebd51b2..05f002b5 100644 --- a/docs/reference/rescale.html +++ b/docs/reference/rescale.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/save_history-1.png b/docs/reference/save_history-1.png index 2f11e578..0bb27bd5 100644 Binary files a/docs/reference/save_history-1.png and b/docs/reference/save_history-1.png differ diff --git a/docs/reference/save_history-2.png b/docs/reference/save_history-2.png index a9125872..d6b11ac1 100644 Binary files a/docs/reference/save_history-2.png and b/docs/reference/save_history-2.png differ diff --git a/docs/reference/save_history-3.png b/docs/reference/save_history-3.png index e5f2b4a4..f26c529c 100644 Binary files a/docs/reference/save_history-3.png and b/docs/reference/save_history-3.png differ diff --git a/docs/reference/save_history.html b/docs/reference/save_history.html index 085a245a..52b596d7 100644 --- a/docs/reference/save_history.html +++ b/docs/reference/save_history.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 @@ -141,12 +141,24 @@

Examples

t2 <- save_history(testdata, guided_tour(holes(), max.tries = 10), max = 5 ) -#> Value 0.881 9.0 % better - NEW BASIS -#> Value 0.882 0.2 % better - NEW BASIS -#> Value 0.896 1.6 % better - NEW BASIS -#> Value 0.897 0.1 % better - NEW BASIS +#> Value 0.886 0.8 % better - NEW BASIS +#> Value 0.888 0.3 % better - NEW BASIS +#> Value 0.889 0.0 % better +#> Value 0.889 0.0 % better +#> Value 0.889 0.0 % better +#> Value 0.889 0.0 % better +#> Value 0.889 0.0 % better +#> Value 0.889 0.0 % better +#> Value 0.889 0.0 % better +#> Value 0.889 0.0 % better +#> Value 0.889 0.0 % better +#> No better bases found after 10 tries. Giving up. +#> Final projection: +#> -0.805 -0.592 +#> 0.333 -0.507 +#> 0.491 -0.627 animate_xy(testdata, planned_tour(t2)) -#> Using half_range 3 +#> Using half_range 3.5 # Or you can use saved histories to visualise the path that the tour took. diff --git a/docs/reference/search_better-1.png b/docs/reference/search_better-1.png index d4ca6ebe..d23f687a 100644 Binary files a/docs/reference/search_better-1.png and b/docs/reference/search_better-1.png differ diff --git a/docs/reference/search_better.html b/docs/reference/search_better.html index 744ae84b..b7e765bf 100644 --- a/docs/reference/search_better.html +++ b/docs/reference/search_better.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 @@ -120,12 +120,12 @@

Examples

#> Old 1.581977 #> No better bases found after 25 tries. Giving up. #> Final projection: -#> -0.251 -0.212 -#> -0.611 0.610 -#> 0.293 -0.090 -#> 0.337 0.186 -#> 0.538 0.163 -#> 0.273 0.716 +#> -0.220 -0.443 +#> 0.450 -0.320 +#> 0.312 0.613 +#> -0.435 0.077 +#> -0.546 -0.191 +#> 0.405 -0.531 #> Using half_range 66
diff --git a/docs/reference/search_better_random-1.png b/docs/reference/search_better_random-1.png index a8ac7f55..431d14c8 100644 Binary files a/docs/reference/search_better_random-1.png and b/docs/reference/search_better_random-1.png differ diff --git a/docs/reference/search_better_random.html b/docs/reference/search_better_random.html index 4096e04d..31b51c76 100644 --- a/docs/reference/search_better_random.html +++ b/docs/reference/search_better_random.html @@ -21,7 +21,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/search_frozen_geodesic.html b/docs/reference/search_frozen_geodesic.html index 76388ef4..49397ed6 100644 --- a/docs/reference/search_frozen_geodesic.html +++ b/docs/reference/search_frozen_geodesic.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/search_geodesic-1.png b/docs/reference/search_geodesic-1.png index 52eca77b..5638d989 100644 Binary files a/docs/reference/search_geodesic-1.png and b/docs/reference/search_geodesic-1.png differ diff --git a/docs/reference/search_geodesic.html b/docs/reference/search_geodesic.html index 6da3f23b..7ded6590 100644 --- a/docs/reference/search_geodesic.html +++ b/docs/reference/search_geodesic.html @@ -22,7 +22,7 @@ tourr - 0.6.18 + 1.0.0 @@ -164,12 +164,12 @@

Examples

#> Value 1.582 0.0 % better #> No better bases found after 25 tries. Giving up. #> Final projection: -#> -0.332 -0.121 -#> 0.594 0.087 -#> 0.503 -0.024 -#> 0.351 0.524 -#> 0.400 -0.613 -#> -0.032 0.572 +#> -0.056 -0.746 +#> 0.340 0.332 +#> 0.435 -0.186 +#> 0.742 0.162 +#> 0.369 -0.499 +#> 0.067 -0.152 #> Using half_range 66
diff --git a/docs/reference/search_polish.html b/docs/reference/search_polish.html index 56ef33f3..373f18b9 100644 --- a/docs/reference/search_polish.html +++ b/docs/reference/search_polish.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/search_posse.html b/docs/reference/search_posse.html index 5bf1da10..da158668 100644 --- a/docs/reference/search_posse.html +++ b/docs/reference/search_posse.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/slice_binning.html b/docs/reference/slice_binning.html index eb081725..1ee5fee1 100644 --- a/docs/reference/slice_binning.html +++ b/docs/reference/slice_binning.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/slice_index.html b/docs/reference/slice_index.html index 73485b14..e9690b91 100644 --- a/docs/reference/slice_index.html +++ b/docs/reference/slice_index.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/sphere_data.html b/docs/reference/sphere_data.html index c79a73b8..c6b6de34 100644 --- a/docs/reference/sphere_data.html +++ b/docs/reference/sphere_data.html @@ -20,7 +20,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/splines2d.html b/docs/reference/splines2d.html index 761f40cb..df28e13d 100644 --- a/docs/reference/splines2d.html +++ b/docs/reference/splines2d.html @@ -20,7 +20,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/step_angle.html b/docs/reference/step_angle.html index e4de1086..5c570633 100644 --- a/docs/reference/step_angle.html +++ b/docs/reference/step_angle.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/step_fraction.html b/docs/reference/step_fraction.html index c53aea32..b65b79a5 100644 --- a/docs/reference/step_fraction.html +++ b/docs/reference/step_fraction.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/t1.html b/docs/reference/t1.html index e5b8a788..625c0f04 100644 --- a/docs/reference/t1.html +++ b/docs/reference/t1.html @@ -23,7 +23,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/to_stop.html b/docs/reference/to_stop.html index 21f23ab1..d43b7fde 100644 --- a/docs/reference/to_stop.html +++ b/docs/reference/to_stop.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/tourr-package.html b/docs/reference/tourr-package.html index 331c3d2d..49d294ae 100644 --- a/docs/reference/tourr-package.html +++ b/docs/reference/tourr-package.html @@ -18,7 +18,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/weights_bincount_radial.html b/docs/reference/weights_bincount_radial.html index 84a778f7..12e1127c 100644 --- a/docs/reference/weights_bincount_radial.html +++ b/docs/reference/weights_bincount_radial.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/docs/reference/xnul.html b/docs/reference/xnul.html index e5de9c31..a64e0d34 100644 --- a/docs/reference/xnul.html +++ b/docs/reference/xnul.html @@ -17,7 +17,7 @@ tourr - 0.6.18 + 1.0.0 diff --git a/inst/CITATION b/inst/CITATION index b168b96e..bcad5fdb 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -1,17 +1,14 @@ citHeader("To cite tourr in publications use:") -citEntry(entry = "Article", - title = "{tourr}: An {R} Package for Exploring Multivariate Data with Projections", - author = personList(as.person("Hadley Wickham"), - as.person("Dianne Cook"), - as.person("Heike Hofmann"), - as.person("Andreas Buja")), - journal = "Journal of Statistical Software", - year = "2011", - volume = "40", - number = "2", - pages = "1--18", - url = "https://doi.org/10.18637/jss.v040.i02", +bibentry("Article", + title = "{tourr}: An {R} Package for Exploring Multivariate Data with Projections", + author = "Hadley Wickham, Dianne Cook, Heike Hofmann, Andreas Buja", + journal = "Journal of Statistical Software", + year = "2011", + volume = "40", + number = "2", + pages = "1--18", + url = "https://doi.org/10.18637/jss.v040.i02", textVersion = paste("Hadley Wickham, Dianne Cook, Heike Hofmann, Andreas Buja (2011).", @@ -20,17 +17,15 @@ citEntry(entry = "Article", "URL http://www.jstatsoft.org/v40/i02/.") ) -citEntry(entry = "Article", - title = "A slice tour for finding hollowness in high-dimensional data", - author = personList(as.person("Ursula Laa"), - as.person("Dianne Cook"), - as.person("German Valencia")), - journal = "Journal of Computational and Graphical Statistics", - year = "2020", - volume = "29", - number = "3", - pages = "681--687", - url = "https://doi.org/10.1080/10618600.2020.1777140", +bibentry("Article", + title = "A slice tour for finding hollowness in high-dimensional data", + author = "Ursula Laa, Dianne Cook, German Valencia", + journal = "Journal of Computational and Graphical Statistics", + year = "2020", + volume = "29", + number = "3", + pages = "681--687", + url = "https://doi.org/10.1080/10618600.2020.1777140", textVersion = paste("Ursula Laa, Dianne Cook, German Valencia (2020).", diff --git a/man/display_andrews.Rd b/man/display_andrews.Rd index c8a8d184..f9839a4c 100644 --- a/man/display_andrews.Rd +++ b/man/display_andrews.Rd @@ -5,13 +5,15 @@ \alias{animate_andrews} \title{Andrews' curves tour path animation.} \usage{ -display_andrews(col = "black", ...) +display_andrews(col = "black", palette = "Zissou 1", ...) animate_andrews(data, tour_path = grand_tour(3), col = "black", ...) } \arguments{ \item{col}{color to be plotted. Defaults to "black"} +\item{palette}{name of color palette for point colour, used by \code{\link{hcl.colors}}, default "Zissou 1"} + \item{...}{other arguments passed on to \code{\link{animate}}} \item{data}{matrix, or data frame containing numeric columns} diff --git a/man/display_density2d.Rd b/man/display_density2d.Rd index caded43b..1f6a5ac4 100644 --- a/man/display_density2d.Rd +++ b/man/display_density2d.Rd @@ -40,7 +40,7 @@ If not set, defaults to maximum distance from origin to each row of data.} \item{edges}{A two column integer matrix giving indices of ends of lines.} -\item{palette}{name of color palette for point colour, used by \code{\link{grDevices::hcl.colors}}, default "Zissou 1"} +\item{palette}{name of color palette for point colour, used by \code{\link{hcl.colors}}, default "Zissou 1"} \item{...}{other arguments passed on to \code{\link{animate}} and \code{\link{display_density2d}}} diff --git a/man/display_dist.Rd b/man/display_dist.Rd index 2c452c64..4eafd21f 100644 --- a/man/display_dist.Rd +++ b/man/display_dist.Rd @@ -34,7 +34,7 @@ If not set, defaults to maximum distance from origin to each row of data.} \item{rug}{draw rug plot showing position of actual data points?} -\item{palette}{name of color palette for point colour, used by \code{\link{grDevices::hcl.colors}}, default "Zissou 1"} +\item{palette}{name of color palette for point colour, used by \code{\link{hcl.colors}}, default "Zissou 1"} \item{density_max}{allow control of the y range for density plot} diff --git a/man/display_faces.Rd b/man/display_faces.Rd index c0f4a14f..e7e04eab 100644 --- a/man/display_faces.Rd +++ b/man/display_faces.Rd @@ -27,10 +27,11 @@ Chernoff faces. See \code{\link[TeachingDemos]{faces2}} for more details. \examples{ # The drawing code is fairly slow, so this animation works best with a # limited number of cases -animate_faces(flea[1:2, 1:6]) -animate_faces(flea[1:4, 1:6]) +flea_s <- rescale(flea[,1:6]) +animate_faces(flea_s[1:2, 1:6]) +animate_faces(flea_s[1:4, 1:6]) -animate_faces(flea[1:2, 1:6], grand_tour(5)) +animate_faces(flea_s[1:2, 1:6], grand_tour(5)) } \seealso{ \code{\link{animate}} for options that apply to all animations diff --git a/man/display_groupxy.Rd b/man/display_groupxy.Rd index a959b959..101021a9 100644 --- a/man/display_groupxy.Rd +++ b/man/display_groupxy.Rd @@ -13,6 +13,8 @@ display_groupxy( pch = 20, cex = 1, edges = NULL, + edges.col = "black", + edges.width = 1, group_by = NULL, plot_xgp = TRUE, palette = "Zissou 1", @@ -39,11 +41,15 @@ If not set, defaults to maximum distance from origin to each row of data.} \item{edges}{A two column integer matrix giving indices of ends of lines.} +\item{edges.col}{colour of edges to be plotted, Defaults to "black"} + +\item{edges.width}{line width for edges, default 1} + \item{group_by}{variable to group by. Must have less than 25 unique values.} \item{plot_xgp}{if TRUE, plots points from other groups in light grey} -\item{palette}{name of color palette for point colour, used by \code{\link{grDevices::hcl.colors}}, default "Zissou 1"} +\item{palette}{name of color palette for point colour, used by \code{\link{hcl.colors}}, default "Zissou 1"} \item{...}{other arguments passed on to \code{\link{animate}} and \code{\link{display_groupxy}}} @@ -59,10 +65,9 @@ This function is designed to allow comparisons across multiple groups, contours overlaid. } \examples{ -f <- flea[, 1:6] -col <- rainbow(length(unique(flea$species)))[as.numeric(as.factor(flea$species))] -pch <- as.numeric(flea$species) + 14 - -animate_groupxy(f, col = col, pch = pch, group_by = flea$species) -animate_groupxy(f, col = col, pch = pch, group_by = flea$species, plot_xgp = FALSE) +animate_groupxy(flea[, 1:6], col = flea$species, + pch = flea$species, group_by = flea$species) +animate_groupxy(flea[, 1:6], col = flea$species, + pch = flea$species, group_by = flea$species, + plot_xgp = FALSE) } diff --git a/man/display_pca.Rd b/man/display_pca.Rd index 3c422f4c..d6a40958 100644 --- a/man/display_pca.Rd +++ b/man/display_pca.Rd @@ -44,7 +44,7 @@ principal components. This is required.} \item{edges.col}{colour of edges to be plotted, Defaults to "black.} -\item{palette}{name of color palette for point colour, used by \code{\link{grDevices::hcl.colors}}, default "Zissou 1"} +\item{palette}{name of color palette for point colour, used by \code{\link{hcl.colors}}, default "Zissou 1"} \item{...}{other arguments passed on to \code{\link{animate}} and \code{\link{display_slice}}} @@ -60,7 +60,7 @@ Animate a 2D tour path on data that has been transformed into principal components, and also show the original variable axes. } \examples{ -flea_std <- scale(flea[, 1:6]) +flea_std <- apply(flea[,1:6], 2, function(x) (x-mean(x))/sd(x)) flea_pca <- prcomp(flea_std, center = FALSE, ) flea_coefs <- flea_pca$rotation[, 1:3] flea_scores <- flea_pca$x[, 1:3] diff --git a/man/display_sage.Rd b/man/display_sage.Rd index 8dcb866c..66202f94 100644 --- a/man/display_sage.Rd +++ b/man/display_sage.Rd @@ -33,7 +33,7 @@ If not set, defaults to maximum distance from origin to each row of data.} \item{R}{scale for the radial transformation. If not set, defaults to maximum distance from origin to each row of data.} -\item{palette}{name of color palette for point colour, used by \code{\link{grDevices::hcl.colors}}, default "Zissou 1"} +\item{palette}{name of color palette for point colour, used by \code{\link{hcl.colors}}, default "Zissou 1"} \item{...}{other arguments passed on to \code{\link{animate}} and \code{\link{display_sage}}} diff --git a/man/display_slice.Rd b/man/display_slice.Rd index aae45011..b9574c94 100644 --- a/man/display_slice.Rd +++ b/man/display_slice.Rd @@ -59,7 +59,7 @@ If NULL (default) the slice will be anchored at the data center.} \item{edges.col}{colour of edges to be plotted, Defaults to "black.} -\item{palette}{name of color palette for point colour, used by \code{\link{grDevices::hcl.colors}}, default "Zissou 1"} +\item{palette}{name of color palette for point colour, used by \code{\link{hcl.colors}}, default "Zissou 1"} \item{...}{other arguments passed on to \code{\link{animate}} and \code{\link{display_slice}}} diff --git a/man/display_trails.Rd b/man/display_trails.Rd index b4ec5be2..2670b56d 100644 --- a/man/display_trails.Rd +++ b/man/display_trails.Rd @@ -47,3 +47,7 @@ steps ago} \description{ Animate a 2D tour path with a point trails } +\examples{ +animate_trails(flea[,1:6], col=flea$species) + +} diff --git a/man/display_xy.Rd b/man/display_xy.Rd index 4a0350cf..11490182 100644 --- a/man/display_xy.Rd +++ b/man/display_xy.Rd @@ -46,7 +46,7 @@ If not set, defaults to maximum distance from origin to each row of data.} \item{obs_labels}{vector of text labels to display} -\item{palette}{name of color palette for point colour, used by \code{\link{grDevices::hcl.colors}}, default "Zissou 1"} +\item{palette}{name of color palette for point colour, used by \code{\link{hcl.colors}}, default "Zissou 1"} \item{...}{other arguments passed on to \code{\link{animate}} and \code{\link{display_xy}}} @@ -63,7 +63,8 @@ animate_xy(flea[, 1:6]) animate(flea[, 1:6], tour_path = grand_tour(), display = display_xy()) animate(flea[, 1:6], tour_path = grand_tour(), - display = display_xy(axes = "bottomleft") + display = display_xy(), + scale = TRUE ) animate(flea[, 1:6], tour_path = grand_tour(), @@ -82,7 +83,7 @@ animate_xy(flea[, 1:6], dependence_tour(c(1, 2, 1, 2, 1, 2)), animate_xy(flea[, -7], col = flea$species) animate_xy(flea[, -7], col = flea$species, - pch = as.numeric(flea$species)) + pch = flea$species) animate_xy(flea[, -7], col = flea$species, obs_labels=as.character(1:nrow(flea)), axes="off") diff --git a/man/guided_tour.Rd b/man/guided_tour.Rd index aad934cb..43bff085 100644 --- a/man/guided_tour.Rd +++ b/man/guided_tour.Rd @@ -51,16 +51,17 @@ a method that works with tour paths like \code{\link{animate}}, \code{\link{save_history}} or \code{\link{render}}. } \examples{ -animate_xy(flea[, 1:6], guided_tour(holes()), sphere = TRUE) +flea_std <- apply(flea[,1:6], 2, function(x) (x-mean(x))/sd(x)) +animate_xy(flea_std, guided_tour(holes()), sphere = TRUE) \donttest{ -animate_xy(flea[, 1:6], guided_tour(holes(), search_f = search_better_random), sphere = TRUE) -animate_dist(flea[, 1:6], guided_tour(holes(), 1), sphere = TRUE) -animate_xy(flea[, 1:6], guided_tour(lda_pp(flea$species)), sphere = TRUE, col = flea$species) +animate_xy(flea_std, guided_tour(holes(), search_f = search_better_random), sphere = TRUE) +animate_dist(flea_std, guided_tour(holes(), 1), sphere = TRUE) +animate_xy(flea_std, guided_tour(lda_pp(flea$species)), sphere = TRUE, col = flea$species) # save_history is particularly useful in conjunction with the # guided tour as it allows us to look at the tour path in many different # ways -f <- flea[, 1:3] +f <- flea_std[, 1:3] tries <- replicate(5, save_history(f, guided_tour(holes())), simplify = FALSE) } } diff --git a/man/manual_slice.Rd b/man/manual_slice.Rd index 0c06d571..56138389 100644 --- a/man/manual_slice.Rd +++ b/man/manual_slice.Rd @@ -42,7 +42,7 @@ If not set, defaults to maximum distance from origin to each row of data.} \item{anchor_nav}{position of the anchor: center, topright or off} -\item{palette}{name of color palette for point colour, used by \code{\link{grDevices::hcl.colors}}, default "Zissou 1"} +\item{palette}{name of color palette for point colour, used by \code{\link{hcl.colors}}, default "Zissou 1"} \item{...}{other options passed to output device} } diff --git a/man/mapColors.Rd b/man/mapColors.Rd index 93f56e37..0f9a6604 100644 --- a/man/mapColors.Rd +++ b/man/mapColors.Rd @@ -9,7 +9,7 @@ mapColors(x, palette) \arguments{ \item{x}{vector} -\item{palette}{name of color palette for point colour, used by \code{\link{grDevices::hcl.colors}}, default "Zissou 1"} +\item{palette}{name of color palette for point colour, used by \code{\link{hcl.colors}}, default "Zissou 1"} } \description{ Map vector of factors to color diff --git a/man/path_dist.Rd b/man/path_dist.Rd index 6dd261b0..8f7b837e 100644 --- a/man/path_dist.Rd +++ b/man/path_dist.Rd @@ -15,7 +15,8 @@ Compute distance matrix from bases. \examples{ # This code is to be used as an example but you should increase # the max from 2 to 50, say, to check tour coverage. -grand <- interpolate(save_history(flea[, 1:6], max = 2), 0.2) +flea_std <- apply(flea[,1:6], 2, function(x) (x-mean(x))/sd(x)) +grand <- interpolate(save_history(flea_std, max = 2), 0.2) # The grand tour ----------------------------- # Look at the tour path in a tour, how well does it cover a sphere # Using MDS to summarise the high-d space of projections @@ -30,7 +31,7 @@ ggplot(data = ord, aes(x=V1, y=V2)) + # Compare five guided tours ----------------------------- holes1d <- guided_tour(holes(), 1) -tour_reps <- replicate(5, save_history(flea[, 1:6], holes1d, max = 2), +tour_reps <- replicate(5, save_history(flea_std, holes1d, max = 2), simplify = FALSE ) tour_reps2 <- lapply(tour_reps, interpolate, 0.2) @@ -43,13 +44,11 @@ d <- path_dist(bases) ord <- as.data.frame(cmdscale(d, 2)) info <- cbind(ord, index_values) -if (require("ggplot2")) { - ggplot(data = info, aes(x = step, y = value, group = try)) + - geom_line() - ##ggplot(data = info, aes(x = V1, y = V2, group = try)) + - ## geom_path() + - ## geom_point(aes(size = value)) + - ## coord_equal() - ##last_plot() + facet_wrap(~try) -} +ggplot(data = info, aes(x = step, y = value, group = try)) + + geom_line() +##ggplot(data = info, aes(x = V1, y = V2, group = try)) + +## geom_path() + +## geom_point(aes(size = value)) + +## coord_equal() +##last_plot() + facet_wrap(~try) } diff --git a/test/Flea-measurements.r b/test/Flea-measurements.r deleted file mode 100644 index 5bd74e5c..00000000 --- a/test/Flea-measurements.r +++ /dev/null @@ -1,14 +0,0 @@ -### Name: Flea measurements -### Title: Flea beatle measurements -### Aliases: 'Flea measurements' flea -### Keywords: datasets - -### ** Examples - - -head(flea) -animate_xy(flea[, -7]) -animate_xy(flea[, -7], col = flea[, 7]) - - - diff --git a/test/Laser-measurements.r b/test/Laser-measurements.r deleted file mode 100644 index a75d2a49..00000000 --- a/test/Laser-measurements.r +++ /dev/null @@ -1,13 +0,0 @@ -### Name: Laser measurements -### Title: Turnable laser measurements from Bellcore -### Aliases: 'Laser measurements' laser -### Keywords: datasets - -### ** Examples - - -head(laser) -animate_xy(laser[, -4]) - - - diff --git a/test/Olive-oil-measurements.r b/test/Olive-oil-measurements.r deleted file mode 100644 index 579694fd..00000000 --- a/test/Olive-oil-measurements.r +++ /dev/null @@ -1,14 +0,0 @@ -### Name: Olive oil measurements -### Title: Olive oil samples from Italy -### Aliases: 'Olive oil measurements' olive -### Keywords: datasets - -### ** Examples - - -head(olive) -animate_xy(olive[, c(7, 9, 10)]) -animate_xy(olive[, c(7, 9, 10)], col = olive[, 1]) - - - diff --git a/test/Ozone-measurements.r b/test/Ozone-measurements.r deleted file mode 100644 index 0ebe2fba..00000000 --- a/test/Ozone-measurements.r +++ /dev/null @@ -1,12 +0,0 @@ -### Name: Ozone measurements -### Title: Monthly ozone measurements over Central America -### Aliases: 'Ozone measurements' ozone -### Keywords: datasets - -### ** Examples - - -example(display_image) - - - diff --git a/test/Places-Ratings.r b/test/Places-Ratings.r deleted file mode 100644 index c82822b4..00000000 --- a/test/Places-Ratings.r +++ /dev/null @@ -1,13 +0,0 @@ -### Name: Places Ratings -### Title: Ratings of different locations across North America -### Aliases: 'Places Ratings' places -### Keywords: datasets - -### ** Examples - - -head(places) -animate_xy(places[, 1:9]) - - - diff --git a/test/Rat-CNS.r b/test/Rat-CNS.r deleted file mode 100644 index 4dca25dd..00000000 --- a/test/Rat-CNS.r +++ /dev/null @@ -1,13 +0,0 @@ -### Name: Rat CNS -### Title: Rat CNS Gene Expression -### Aliases: 'Rat CNS' ratcns -### Keywords: datasets - -### ** Examples - - -head(ratcns) -animate_xy(ratcns[, 1:8], col = ratcns[, 10]) - - - diff --git a/test/andrews.r b/test/andrews.r deleted file mode 100644 index 6348a713..00000000 --- a/test/andrews.r +++ /dev/null @@ -1,17 +0,0 @@ -### Name: andrews -### Title: Compute Andrews' curves -### Aliases: andrews - -### ** Examples - -a <- andrews(1:2) -a(0) -a(-pi) -grid <- seq(-pi, pi, length = 50) -a(grid) - -plot(grid, andrews(1:2)(grid), type = "l") -plot(grid, andrews(runif(5))(grid), type = "l") - - - diff --git a/test/animate.r b/test/animate.r deleted file mode 100644 index 7061a5c7..00000000 --- a/test/animate.r +++ /dev/null @@ -1,17 +0,0 @@ -### Name: animate -### Title: Animate a tour path. -### Aliases: animate - -### ** Examples - -f <- flea[, 1:6] -animate(f, grand_tour(), display_xy()) -# or in short -animate(f) -animate(f, max_frames = 30) -## Not run: -##D animate(f, max_frames = 10, fps = 1, aps = 0.1) -## End(Not run) - - - diff --git a/test/dependence_tour.r b/test/dependence_tour.r deleted file mode 100644 index b6cd4bf7..00000000 --- a/test/dependence_tour.r +++ /dev/null @@ -1,12 +0,0 @@ -### Name: dependence_tour -### Title: A dependence tour path. -### Aliases: dependence_tour - -### ** Examples - -animate_xy(flea[, 1:3], dependence_tour(c(1, 2, 2))) -animate_xy(flea[, 1:4], dependence_tour(c(1, 2, 1, 2))) -animate_pcp(flea[, 1:6], dependence_tour(c(1, 2, 3, 2, 1, 3))) - - - diff --git a/test/display_andrews.r b/test/display_andrews.r deleted file mode 100644 index 9fb6ec10..00000000 --- a/test/display_andrews.r +++ /dev/null @@ -1,16 +0,0 @@ -### Name: display_andrews -### Title: Andrews' curves tour path animation. -### Aliases: display_andrews animate_andrews -### Keywords: hplot - -### ** Examples - -animate_andrews(flea[, 1:6]) -animate_andrews(flea[, 1:6], grand_tour(d = 3)) -animate_andrews(flea[, 1:6], grand_tour(d = 6)) - -# It's easy to experiment with different tour paths: -animate_andrews(flea[, 1:6], guided_tour(cmass())) - - - diff --git a/test/display_density2d.r b/test/display_density2d.r deleted file mode 100644 index e5e9ef45..00000000 --- a/test/display_density2d.r +++ /dev/null @@ -1,39 +0,0 @@ -### Name: display_density2d -### Title: Display tour path with a density and scatterplot -### Aliases: display_density2d animate_density2d - -### ** Examples - -animate_density2d(flea[, 1:6]) -animate(flea[, 1:6], tour_path = grand_tour(), display = display_density2d()) -animate(flea[, 1:6], - tour_path = grand_tour(), - display = display_density2d(axes = "bottomleft") -) -animate(flea[, 1:6], - tour_path = grand_tour(), - display = display_density2d(half_range = 0.5) -) -animate_density2d(flea[, 1:6], tour_path = little_tour()) - -animate_density2d(flea[, 1:3], tour_path = guided_tour(holes()), sphere = TRUE) -animate_density2d(flea[, 1:6], center = FALSE) - -# The default axes are centered, like a biplot, but there are other options -animate_density2d(flea[, 1:6], axes = "bottomleft") -animate_density2d(flea[, 1:6], axes = "off") -animate_density2d(flea[, 1:6], dependence_tour(c(1, 2, 1, 2, 1, 2)), - axes = "bottomleft" -) - -animate_density2d(flea[, -7], col = flea$species) - -# You can also draw lines -edges <- matrix(c(1:5, 2:6), ncol = 2) -animate( - flea[, 1:6], grand_tour(), - display_density2d(axes = "bottomleft", edges = edges) -) - - - diff --git a/test/display_depth.r b/test/display_depth.r deleted file mode 100644 index a6425e54..00000000 --- a/test/display_depth.r +++ /dev/null @@ -1,11 +0,0 @@ -### Name: display_depth -### Title: Display 3d projection with depth cues -### Aliases: display_depth animate_depth -### Keywords: hplot - -### ** Examples - -animate_depth(flea[, 1:6]) - - - diff --git a/test/display_dist.r b/test/display_dist.r deleted file mode 100644 index b68cb8fb..00000000 --- a/test/display_dist.r +++ /dev/null @@ -1,18 +0,0 @@ -### Name: display_dist -### Title: 1d distribution tour path animation. -### Aliases: display_dist animate_dist -### Keywords: hplot - -### ** Examples - -animate_dist(flea[, 1:6]) - -# When the distribution is not centred, it tends to wander around in a -# distracting manner -animate_dist(flea[, 1:6], center = FALSE) - -# Alternatively, you can display the distribution with a histogram -animate_dist(flea[, 1:6], method = "hist") - - - diff --git a/test/display_faces.r b/test/display_faces.r deleted file mode 100644 index 33053528..00000000 --- a/test/display_faces.r +++ /dev/null @@ -1,16 +0,0 @@ -### Name: display_faces -### Title: Chernoff faces tour path animation. -### Aliases: display_faces animate_faces -### Keywords: hplot - -### ** Examples - -# The drawing code is fairly slow, so this animation works best with a -# limited number of cases -animate_faces(flea[1:2, 1:6]) -animate_faces(flea[1:4, 1:6]) - -animate_faces(flea[1:2, 1:6], grand_tour(5)) - - - diff --git a/test/display_groupxy.r b/test/display_groupxy.r deleted file mode 100644 index 92e2b0c8..00000000 --- a/test/display_groupxy.r +++ /dev/null @@ -1,15 +0,0 @@ -### Name: display_groupxy -### Title: Display 2D tour projections displayed separately by groups -### Aliases: display_groupxy animate_groupxy - -### ** Examples - -f <- flea[, 1:6] -col <- rainbow(length(unique(flea$species)))[as.numeric(as.factor(flea$species))] -pch <- as.numeric(flea$species) + 14 - -animate_groupxy(f, col = col, pch = pch, group_by = flea$species) -animate_groupxy(f, col = col, pch = pch, group_by = flea$species, plot_xgp = FALSE) - - - diff --git a/test/display_image.r b/test/display_image.r deleted file mode 100644 index 5637c8ed..00000000 --- a/test/display_image.r +++ /dev/null @@ -1,12 +0,0 @@ -### Name: display_image -### Title: Image tour path animation. -### Aliases: display_image animate_image -### Keywords: hplot - -### ** Examples - -str(ozone) -animate_image(ozone) - - - diff --git a/test/display_pca.r b/test/display_pca.r deleted file mode 100644 index 23d2af93..00000000 --- a/test/display_pca.r +++ /dev/null @@ -1,15 +0,0 @@ -### Name: display_pca -### Title: Display tour path with principal component scores with original -### axes -### Aliases: display_pca animate_pca - -### ** Examples - -flea_std <- scale(flea[, 1:6]) -flea_pca <- prcomp(flea_std, center = FALSE, ) -flea_coefs <- flea_pca$rotation[, 1:3] -flea_scores <- flea_pca$x[, 1:3] -animate_pca(flea_scores, pc_coefs = flea_coefs) - - - diff --git a/test/display_pcp.r b/test/display_pcp.r deleted file mode 100644 index c91cb62c..00000000 --- a/test/display_pcp.r +++ /dev/null @@ -1,12 +0,0 @@ -### Name: display_pcp -### Title: Parallel coordinates tour path animation. -### Aliases: display_pcp animate_pcp -### Keywords: hplot - -### ** Examples - -animate_pcp(flea[, 1:6], grand_tour(3)) -animate_pcp(flea[, 1:6], grand_tour(5)) - - - diff --git a/test/display_sage.r b/test/display_sage.r deleted file mode 100644 index e11f98cf..00000000 --- a/test/display_sage.r +++ /dev/null @@ -1,17 +0,0 @@ -### Name: display_sage -### Title: Display tour path with a sage scatterplot -### Aliases: display_sage animate_sage - -### ** Examples - -# Generate uniform samples in a 10d sphere using the geozoo package -sphere10 <- geozoo::sphere.solid.random(10)$points -# Columns need to be named before launching the tour -colnames(sphere10) <- paste0("x", 1:10) -# Standard grand tour display, points cluster near center -animate_xy(sphere10) -# Sage display, points are uniformly distributed across the disk -animate_sage(sphere10) - - - diff --git a/test/display_scatmat.r b/test/display_scatmat.r deleted file mode 100644 index dfec1292..00000000 --- a/test/display_scatmat.r +++ /dev/null @@ -1,12 +0,0 @@ -### Name: display_scatmat -### Title: Scatterplot matrix tour path animation. -### Aliases: display_scatmat animate_scatmat -### Keywords: hplot - -### ** Examples - -animate_scatmat(flea[, 1:6], grand_tour(2)) -animate_scatmat(flea[, 1:6], grand_tour(6)) - - - diff --git a/test/display_slice.r b/test/display_slice.r deleted file mode 100644 index 09bee7f4..00000000 --- a/test/display_slice.r +++ /dev/null @@ -1,27 +0,0 @@ -### Name: display_slice -### Title: Display tour path with a sliced scatterplot -### Aliases: display_slice animate_slice - -### ** Examples - -# Generate samples on a 3d and 5d hollow sphere using the geozoo package -sphere3 <- geozoo::sphere.hollow(3)$points -sphere5 <- geozoo::sphere.hollow(5)$points - -# Columns need to be named before launching the tour -colnames(sphere3) <- c("x1", "x2", "x3") -colnames(sphere5) <- c("x1", "x2", "x3", "x4", "x5") - -# Animate with the slice display using the default parameters -animate_slice(sphere3) -animate_slice(sphere5) - -# Animate with off-center anchoring -anchor3 <- rep(0.7, 3) -anchor5 <- rep(0.3, 5) -animate_slice(sphere3, anchor = anchor3) -# Animate with thicker slice to capture more points in each view -animate_slice(sphere5, anchor = anchor5, v_rel = 0.02) - - - diff --git a/test/display_stars.r b/test/display_stars.r deleted file mode 100644 index efde0342..00000000 --- a/test/display_stars.r +++ /dev/null @@ -1,16 +0,0 @@ -### Name: display_stars -### Title: Star glyph tour path animation. -### Aliases: display_stars animate_stars -### Keywords: hplot - -### ** Examples - -animate_stars(flea[1:10, 1:6]) -animate_stars(flea[1:10, 1:6], grand_tour(5)) -animate_stars(flea[, 1:6], grand_tour(5)) -animate_stars(flea[1:10, 1:6], grand_tour(5), - col.stars = rep("grey50", 10), radius = FALSE -) - - - diff --git a/test/display_stereo.r b/test/display_stereo.r deleted file mode 100644 index 990aed3f..00000000 --- a/test/display_stereo.r +++ /dev/null @@ -1,11 +0,0 @@ -### Name: display_stereo -### Title: Anaglpyh tour path animation. -### Aliases: display_stereo animate_stereo -### Keywords: hplot - -### ** Examples - -animate_stereo(flea[, 1:6]) - - - diff --git a/test/display_xy.r b/test/display_xy.r deleted file mode 100644 index 459e7dd6..00000000 --- a/test/display_xy.r +++ /dev/null @@ -1,38 +0,0 @@ -### Name: display_xy -### Title: Display tour path with a scatterplot -### Aliases: display_xy animate_xy - -### ** Examples - -animate_xy(flea[, 1:6]) -animate(flea[, 1:6], tour_path = grand_tour(), display = display_xy()) -animate(flea[, 1:6], - tour_path = grand_tour(), - display = display_xy(axes = "bottomleft") -) -animate(flea[, 1:6], - tour_path = grand_tour(), - display = display_xy(half_range = 0.5) -) -animate_xy(flea[, 1:6], tour_path = little_tour()) -animate_xy(flea[, 1:3], tour_path = guided_tour(holes()), sphere = TRUE) -animate_xy(flea[, 1:6], center = FALSE) - -# The default axes are centered, like a biplot, but there are other options -animate_xy(flea[, 1:6], axes = "bottomleft") -animate_xy(flea[, 1:6], axes = "off") -animate_xy(flea[, 1:6], dependence_tour(c(1, 2, 1, 2, 1, 2)), - axes = "bottomleft" -) - -animate_xy(flea[, -7], col = flea$species) - -# You can also draw lines -edges <- matrix(c(1:5, 2:6), ncol = 2) -animate( - flea[, 1:6], grand_tour(), - display_xy(axes = "bottomleft", edges = edges) -) - - - diff --git a/test/freeze.r b/test/freeze.r deleted file mode 100644 index a52df356..00000000 --- a/test/freeze.r +++ /dev/null @@ -1,17 +0,0 @@ -### Name: freeze -### Title: Freeze and thaw matrices -### Aliases: freeze thaw -### Keywords: internal - -### ** Examples - -frozen <- matrix(NA, nrow = 4, ncol = 2) -frozen[3, ] <- .5 - -input <- basis_random(4, 2) -freeze(input, frozen) -thaw(input, frozen) -freeze(basis_random(4, 2), frozen) - - - diff --git a/test/frozen_guided_tour.r b/test/frozen_guided_tour.r deleted file mode 100644 index e9508951..00000000 --- a/test/frozen_guided_tour.r +++ /dev/null @@ -1,12 +0,0 @@ -### Name: frozen_guided_tour -### Title: The frozen guided tour -### Aliases: frozen_guided_tour - -### ** Examples - -frozen <- matrix(NA, nrow = 4, ncol = 2) -frozen[3, ] <- .5 -animate_xy(flea[, 1:4], frozen_guided_tour(frozen, holes())) - - - diff --git a/test/frozen_tour.r b/test/frozen_tour.r deleted file mode 100644 index 579943c8..00000000 --- a/test/frozen_tour.r +++ /dev/null @@ -1,41 +0,0 @@ -### Name: frozen_tour -### Title: A frozen tour path. -### Aliases: frozen_tour - -### ** Examples - -frozen <- matrix(NA, nrow = 4, ncol = 2) -frozen[3, ] <- .5 -animate_xy(flea[, 1:4], frozen_tour(2, frozen)) -## Not run: -##D # Doesn't work - a bug? -##D frozen <- matrix(NA, nrow = 4, ncol = 2) -##D frozen[1, 1] <- 0.5 -##D animate_xy(flea[, 1:4], frozen_tour(2, frozen)) -##D -##D # Doesn't work - a bug? -##D frozen <- matrix(NA, nrow = 4, ncol = 2) -##D frozen[, 1] <- 1 / 2 -##D animate_xy(flea[, 1:4], frozen_tour(2, frozen)) -##D -##D # Doesn't work - a bug? -##D frozen[3, ] <- c(0, 1) -##D animate_xy(flea[, 1:4], frozen_tour(2, frozen)) -##D -##D # Doesn't move, which is correct - no free variables -##D frozen[4, ] <- .2 -##D animate_xy(flea[, 1:4], frozen_tour(2, frozen)) -##D -##D # Doesn't work - a bug? -##D frozen <- matrix(NA, nrow = 4, ncol = 2) -##D frozen[, 1] <- 1 / 2 -##D animate_xy(flea[, 1:4], frozen_tour(2, frozen)) -## End(Not run) -# Two frozen variables in five 5. -frozen <- matrix(NA, nrow = 5, ncol = 2) -frozen[3, ] <- .5 -frozen[4, ] <- c(-.2, .2) -animate_xy(flea[, 1:5], frozen_tour(2, frozen)) - - - diff --git a/test/geodesic_path.r b/test/geodesic_path.r deleted file mode 100644 index 320a8a28..00000000 --- a/test/geodesic_path.r +++ /dev/null @@ -1,18 +0,0 @@ -### Name: geodesic_path -### Title: Generate geodesic path. -### Aliases: geodesic_path -### Keywords: internal - -### ** Examples - -a <- basis_random(4, 2) -b <- basis_random(4, 2) -path <- geodesic_path(a, b) - -path$dist -all.equal(a, path$interpolate(0)) -# Not true generally - a rotated into plane of b -all.equal(b, path$interpolate(1)) - - - diff --git a/test/grand_tour.r b/test/grand_tour.r deleted file mode 100644 index ef1e96cc..00000000 --- a/test/grand_tour.r +++ /dev/null @@ -1,27 +0,0 @@ -### Name: grand_tour -### Title: A grand tour path. -### Aliases: grand_tour - -### ** Examples - -# All animation methods use the grand tour path by default -animate_dist(flea[, 1:6]) -animate_xy(flea[, 1:6]) -animate_pcp(flea[, 1:6]) -animate_pcp(flea[, 1:6], grand_tour(4)) - -# The grand tour is a function: -tour2d <- grand_tour(2) -is.function(tour2d) - -# with two parameters, the previous projection and the data set -args(tour2d) -# if the previous projection is null, it will generate a starting -# basis, otherwise the argument is ignored -tour2d(NULL, mtcars) -# the data argument is just used to determine the correct dimensionality -# of the output matrix -tour2d(NULL, mtcars[, 1:2]) - - - diff --git a/test/guided_section_tour.r b/test/guided_section_tour.r deleted file mode 100644 index 28bb11d9..00000000 --- a/test/guided_section_tour.r +++ /dev/null @@ -1,25 +0,0 @@ -### Name: guided_section_tour -### Title: A guided section tour path. -### Aliases: guided_section_tour - -### ** Examples - -# Generate samples on a 3d hollow sphere using the geozoo package -set.seed(12345) -sphere3 <- geozoo::sphere.hollow(3)$points -# Columns need to be named before launching the tour -colnames(sphere3) <- c("x1", "x2", "x3") -# Off-center anchoring -anchor3 <- rep(0.75, 3) -# Index setup -r_breaks <- linear_breaks(5, 0, 1) -a_breaks <- angular_breaks(10) -eps <- estimate_eps(nrow(sphere3), ncol(sphere3), 0.1 / 1, 5 * 10, 10, r_breaks) -idx <- slice_index(r_breaks, a_breaks, eps, bintype = "polar", power = 1, reweight = TRUE, p = 3) -# Running the guided section tour select sections showing a big hole in the center -animate_slice(sphere3, guided_section_tour(idx, v_rel = 0.1, anchor = anchor3, max.tries = 5), - v_rel = 0.1, anchor = anchor3 -) - - - diff --git a/test/guided_tour.r b/test/guided_tour.r deleted file mode 100644 index 473584c6..00000000 --- a/test/guided_tour.r +++ /dev/null @@ -1,19 +0,0 @@ -### Name: guided_tour -### Title: A guided tour path. -### Aliases: guided_tour - -### ** Examples - -animate_xy(flea[, 1:6], guided_tour(holes()), sphere = TRUE) -animate_xy(flea[, 1:6], guided_tour(holes(), search_f = search_better_random), sphere = TRUE) -animate_dist(flea[, 1:6], guided_tour(holes(), 1), sphere = TRUE) -animate_xy(flea[, 1:6], guided_tour(lda_pp(flea[, 7])), sphere = TRUE, col = flea$species) - -# save_history is particularly useful in conjunction with the -# guided tour as it allows us to look at the tour path in many different -# ways -f <- flea[, 1:3] -tries <- replicate(5, save_history(f, guided_tour(holes())), simplify = FALSE) - - - diff --git a/test/interpolate.r b/test/interpolate.r deleted file mode 100644 index 0d62d9e9..00000000 --- a/test/interpolate.r +++ /dev/null @@ -1,15 +0,0 @@ -### Name: interpolate -### Title: Interpolate geodesically between bases. -### Aliases: interpolate -### Keywords: hplot - -### ** Examples - -t1 <- save_history(flea[, 1:6], grand_tour(1), max = 10) -dim(t1) -dim(interpolate(t1, 0.01)) -dim(interpolate(t1, 0.05)) -dim(interpolate(t1, 0.1)) - - - diff --git a/test/little_tour.r b/test/little_tour.r deleted file mode 100644 index 9b5ef753..00000000 --- a/test/little_tour.r +++ /dev/null @@ -1,13 +0,0 @@ -### Name: little_tour -### Title: A little tour path. -### Aliases: little_tour - -### ** Examples - -animate_xy(flea[, 1:6], little_tour()) -animate_pcp(flea[, 1:6], little_tour(3)) -animate_scatmat(flea[, 1:6], little_tour(3)) -animate_pcp(flea[, 1:6], little_tour(4)) - - - diff --git a/test/local_tour.r b/test/local_tour.r deleted file mode 100644 index 8077361a..00000000 --- a/test/local_tour.r +++ /dev/null @@ -1,12 +0,0 @@ -### Name: local_tour -### Title: A local tour path. -### Aliases: local_tour - -### ** Examples - -animate_xy(flea[, 1:3], local_tour(basis_init(3, 2))) -animate_xy(flea[, 1:3], local_tour(basis_init(3, 2), 0.2)) -animate_xy(flea[, 1:3], local_tour(basis_random(3, 2), 0.2)) - - - diff --git a/test/norm_bin.r b/test/norm_bin.r deleted file mode 100644 index 5edf1571..00000000 --- a/test/norm_bin.r +++ /dev/null @@ -1,20 +0,0 @@ -### Name: norm_bin -### Title: Normality index. -### Aliases: norm_bin norm_kol -### Keywords: hplot - -### ** Examples - -# manually compute the norm_kol index -# create the index function -set.seed(123) -index <- norm_kol(nrow(flea[, 1:3])) -# create the projection -proj <- matrix(c(1, 0, 0), nrow = 3) -# pre-process the example data -flea_s <- sphere_data(flea[, 1:3]) -# produce the index value -index(flea_s %*% proj) - - - diff --git a/test/path_curves.r b/test/path_curves.r deleted file mode 100644 index ea9034ea..00000000 --- a/test/path_curves.r +++ /dev/null @@ -1,40 +0,0 @@ -### Name: path_curves -### Title: Draw the path that the geodesics took. -### Aliases: path_curves - -### ** Examples - -path1d <- save_history(flea[, 1:6], grand_tour(1), 10) -path2d <- save_history(flea[, 1:6], grand_tour(2), 10) - -if (require("ggplot2")) { - plot(path_curves(path1d)) - plot(path_curves(interpolate(path1d))) - - plot(path_curves(path2d)) - plot(path_curves(interpolate(path2d))) - - # Instead of relying on the built in plot method, you might want to - # generate your own. Here are few examples of alternative displays: - - df <- path_curves(path2d) - ggplot(data = df, aes(x = step, y = value, group = obs:var, colour = var)) + - geom_line() + - facet_wrap(~obs) - - library(tidyr) - ggplot( - data = pivot_wider(df, - id_cols = c(obs, step), - names_from = var, names_prefix = "Var", - values_from = value - ), - aes(x = Var1, y = Var2) - ) + - geom_point() + - facet_wrap(~step) + - coord_equal() -} - - - diff --git a/test/path_dist.r b/test/path_dist.r deleted file mode 100644 index e541b610..00000000 --- a/test/path_dist.r +++ /dev/null @@ -1,43 +0,0 @@ -### Name: path_dist -### Title: Compute distance matrix from bases. -### Aliases: path_dist - -### ** Examples - -## Not run: -##D grand <- interpolate(save_history(flea[, 1:6], max = 50), 0.2) -##D # The grand tour ----------------------------- -##D # Look at the tour path in a tour, how well does it cover a sphere -##D # Using MDS -##D d <- path_dist(grand) -##D ord <- as.data.frame(MASS::isoMDS(d)$points) -##D qplot(V1, V2, data = ord, geom = "path") + -##D coord_equal() + labs(x = NULL, y = NULL) -## End(Not run) - -# 5 guided tours ----------------------------- -holes1d <- guided_tour(holes(), 1) -tour_reps <- replicate(5, save_history(flea[, 1:6], holes1d, max = 10), - simplify = FALSE -) -tour_reps2 <- lapply(tour_reps, interpolate, 0.2) - -bases <- unlist(lapply(tour_reps2, as.list), recursive = FALSE) -class(bases) <- "history_list" -index_values <- paths_index(tour_reps2, holes()) -d <- path_dist(bases) -ord <- as.data.frame(cmdscale(d, 2)) - -info <- cbind(ord, index_values) -if (require("ggplot2")) { - ggplot(data = info, aes(x = step, y = value, group = try)) + - geom_line() - ggplot(data = info, aes(x = V1, y = V2, group = try)) + - geom_path() + - geom_point(aes(size = value)) + - coord_equal() - last_plot() + facet_wrap(~try) -} - - - diff --git a/test/path_index.r b/test/path_index.r deleted file mode 100644 index 8ef10036..00000000 --- a/test/path_index.r +++ /dev/null @@ -1,23 +0,0 @@ -### Name: path_index -### Title: Compute index values for a tour history. -### Aliases: path_index -### Keywords: hplot - -### ** Examples - -fl_holes <- save_history(flea[, 1:6], guided_tour(holes()), sphere = TRUE) -path_index(fl_holes, holes()) -path_index(fl_holes, cmass()) - -plot(path_index(fl_holes, holes()), type = "l") -plot(path_index(fl_holes, cmass()), type = "l") - -# Use interpolate to show all intermediate bases as well -## Not run: -##D hi <- path_index(interpolate(fl_holes), holes()) -##D hi -##D plot(hi) -## End(Not run) - - - diff --git a/test/paths_index.r b/test/paths_index.r deleted file mode 100644 index 905a0833..00000000 --- a/test/paths_index.r +++ /dev/null @@ -1,23 +0,0 @@ -### Name: paths_index -### Title: Compute index value for many histories. -### Aliases: paths_index -### Keywords: internal - -### ** Examples - -holes1d <- guided_tour(holes(), 1) -# Perform guided tour 5 times, saving results -tries <- replicate(5, save_history(flea[, 1:6], holes1d), simplify = FALSE) -# Interpolate between target bases -itries <- lapply(tries, interpolate) - -paths <- paths_index(itries, holes()) -head(paths) - -if (require(ggplot2)) { - qplot(step, value, data = paths, group = try, geom = "line") - qplot(step, improvement, data = paths, group = try, geom = "line") -} - - - diff --git a/test/planned_tour.r b/test/planned_tour.r deleted file mode 100644 index 324b1bb9..00000000 --- a/test/planned_tour.r +++ /dev/null @@ -1,17 +0,0 @@ -### Name: planned_tour -### Title: A planned tour path. -### Aliases: planned_tour -### Keywords: dynamic hplot - -### ** Examples - -twod <- save_history(flea[, 1:3], max = 5) -str(twod) -animate_xy(flea[, 1:3], planned_tour(twod)) -animate_xy(flea[, 1:3], planned_tour(twod, TRUE)) - -oned <- save_history(flea[, 1:6], grand_tour(1), max = 3) -animate_dist(flea[, 1:6], planned_tour(oned)) - - - diff --git a/test/render.r b/test/render.r deleted file mode 100644 index 16faab98..00000000 --- a/test/render.r +++ /dev/null @@ -1,19 +0,0 @@ -### Name: render -### Title: Render frames of animation to disk -### Aliases: render -### Keywords: hplot - -### ** Examples - -tmp_path <- tempdir() -render(flea[, 1:4], grand_tour(), display_xy(), "pdf", - frames = 10, - file.path(tmp_path, "test.pdf") -) -render(flea[, 1:4], grand_tour(), display_xy(), "png", - frames = 10, - file.path(tmp_path, "test-%03d.png") -) - - - diff --git a/test/render_gif.r b/test/render_gif.r deleted file mode 100644 index 5cef9f52..00000000 --- a/test/render_gif.r +++ /dev/null @@ -1,16 +0,0 @@ -### Name: render_gif -### Title: Render frames of animation to a gif file -### Aliases: render_gif - -### ** Examples - -# gifski needs to be installed to render a gif -if (requireNamespace("gifski", quietly = TRUE)) { - gif_file <- file.path(tempdir(), "test.gif") - render_gif(flea[, 1:4], grand_tour(), display_xy(), gif_file) - utils::browseURL(gif_file) - unlink(gif_file) -} - - - diff --git a/test/save_history.r b/test/save_history.r deleted file mode 100644 index 2a1b53a3..00000000 --- a/test/save_history.r +++ /dev/null @@ -1,34 +0,0 @@ -### Name: save_history -### Title: Save tour history. -### Aliases: save_history - -### ** Examples - -# You can use a saved history to replay tours with different visualisations - -t1 <- save_history(flea[, 1:6], max = 3) -animate_xy(flea[, 1:6], planned_tour(t1)) -## andrews_history(t1) -## andrews_history(interpolate(t1)) - -t1 <- save_history(flea[, 1:6], grand_tour(4), max = 3) -animate_pcp(flea[, 1:6], planned_tour(t1)) -animate_scatmat(flea[, 1:6], planned_tour(t1)) - -t1 <- save_history(flea[, 1:6], grand_tour(1), max = 3) -animate_dist(flea[, 1:6], planned_tour(t1)) - -testdata <- matrix(rnorm(100 * 3), ncol = 3) -testdata[1:50, 1] <- testdata[1:50, 1] + 10 -testdata <- sphere_data(testdata) -t2 <- save_history(testdata, guided_tour(holes(), max.tries = 100), - max = 5, rescale = FALSE -) -animate_xy(testdata, planned_tour(t2)) - -# Or you can use saved histories to visualise the path that the tour took. -plot(path_index(interpolate(t2), holes())) -plot(path_curves(interpolate(t2))) - - - diff --git a/test/search_better.r b/test/search_better.r deleted file mode 100644 index be8d3340..00000000 --- a/test/search_better.r +++ /dev/null @@ -1,11 +0,0 @@ -### Name: search_better -### Title: Search for a better projection near the current projection. -### Aliases: search_better -### Keywords: optimize - -### ** Examples - -animate_xy(flea[, 1:6], guided_tour(holes(), search_f = search_better)) - - - diff --git a/test/search_better_random.r b/test/search_better_random.r deleted file mode 100644 index 0e5c2a74..00000000 --- a/test/search_better_random.r +++ /dev/null @@ -1,11 +0,0 @@ -### Name: search_better_random -### Title: Search for a better projection using simulated annealing -### Aliases: search_better_random -### Keywords: optimize - -### ** Examples - -animate_xy(flea[, 1:6], guided_tour(holes(), search_f = search_better_random)) - - - diff --git a/test/search_geodesic.r b/test/search_geodesic.r deleted file mode 100644 index d7c152a9..00000000 --- a/test/search_geodesic.r +++ /dev/null @@ -1,11 +0,0 @@ -### Name: search_geodesic -### Title: A pseudo-derivative, line search algorithm. -### Aliases: search_geodesic -### Keywords: optimize - -### ** Examples - -animate_xy(flea[, 1:6], guided_tour(holes(), search_f = search_geodesic)) - - - diff --git a/test/search_polish.r b/test/search_polish.r deleted file mode 100644 index 0f133190..00000000 --- a/test/search_polish.r +++ /dev/null @@ -1,23 +0,0 @@ -### Name: search_polish -### Title: Search very locally to find slightly better projections to -### polish a broader search. -### Aliases: search_polish -### Keywords: optimize - -### ** Examples - -set.seed(2020) -t1 <- save_history(flea[, 1:6], guided_tour(holes()), max = 100) -attr(t1, "class") <- NULL -best_proj <- t1[, , dim(t1)[3]] -animate_xy( - flea[, 1:6], - guided_tour(holes(), - search_f = search_polish, - cur_index = 0 - ), - start = best_proj -) - - - diff --git a/vignettes/tourr.Rmd b/vignettes/tourr.Rmd index 0746b7eb..68dce5fa 100644 --- a/vignettes/tourr.Rmd +++ b/vignettes/tourr.Rmd @@ -32,7 +32,7 @@ library(tourr) To get started we can simply generate a tour animation for any numeric data matrix with default settings. Here we look at the flea data available in the package, drop the last column (the grouping variable), and call ```{r} -f <- flea[, 1:6] +f <- apply(flea[,1:6], 2, function(x) (x-mean(x))/sd(x)) animate(f) ```