Permalink
Browse files

fixed problem in vignette

  • Loading branch information...
heike committed Apr 27, 2017
1 parent b3e87ee commit c97a2878fbf020bab58586e0a6aae0a1b2d87d1c
Showing with 109 additions and 81 deletions.
  1. +2 −0 NAMESPACE
  2. +2 −1 R/divide.R
  3. +13 −2 R/scale-product.R
  4. +1 −1 inst/flying-concordance.tex
  5. +1 −0 inst/flying.Rnw
  6. +8 −7 visual_test/vtest/commits.csv
  7. +82 −70 visual_test/vtest/resultsets.csv
View
@@ -20,9 +20,11 @@ export(scale_y_productlist)
export(spine)
export(stat_mosaic)
export(vspine)
importFrom(ggplot2,scale_type)
importFrom(ggplot2,waiver)
importFrom(grid,grobTree)
importFrom(plotly,to_basic)
importFrom(productplots,parse_product_formula)
importFrom(tibble,as_tibble)
importFrom(tidyr,unite_)
importFrom(utils,getFromNamespace)
View
@@ -29,7 +29,8 @@ divide <- function(data, bounds = productplots:::bound(), divider = list(product
# browser()
# pieces <- split(data, data[,seq_len(d)]) # this one doesn't deal well with NAs
pieces <- as.list(plyr::dlply(data, seq_len(d))) #
pieces <- as.list(getFromNamespace("dlply", asNamespace("plyr"))(data, seq_len(d))) #
children <- purrr::map_df(seq_along(pieces), function(i) {
View
@@ -25,6 +25,7 @@ is.waive <- getFromNamespace("is.waive", "ggplot2")
#'
#' @param x variable under consideration
#' @return character string "product"
#' @importFrom ggplot2 scale_type
#' @export
scale_type.product <- function(x) {
cat("checking for type product\n")
@@ -77,14 +78,17 @@ as_tibble.productlist <- function(x, ...) {
}
#' @importFrom tibble as_tibble
#' @export
as_tibble.list <- function(x, ...) {
cat("as.tibble.list \n")
# still need to check that we are not accidentally hijacking a real list vector
# browser()
# this is why we got called:
idx <- which(sapply(x, function(xx) "tbl_df" %in% class(xx)))
if (! any(sapply(x[idx], function(xx) "productlist" %in% class(xx[[1]])))) return(tibble:::as_tibble.list(x))
if (! any(sapply(x[idx], function(xx) "productlist" %in% class(xx[[1]])))) {
getFromNamespace("as_tibble.list", asNamespace("tibble"))(x)
}
# browser()
remove <- NULL
@@ -121,7 +125,14 @@ as_tibble.list <- function(x, ...) {
else newframe <- data.frame(newframe, cframe)
}
}
tibble::as_tibble(data.frame(newframe, x[-remove]))
# making sure that we don't try to remove anything that's not there
dx <- x
if (!is.null(remove)) dx <- x[-remove]
if (!is.null(newframe)) dx <- data.frame(newframe, dx)
# tibble::as_tibble(dx)
getFromNamespace("as_tibble.list", asNamespace("tibble"))(dx)
}
@@ -1,4 +1,4 @@
\Sconcordance{concordance:flying.tex:flying.Rnw:%
1 91 1 1 0 78 1 1 5 2 1 1 38 17 0 1 3 2 1 1 6 17 0 1 2 2 1 1 6 24 0 1 2 %
1 91 1 1 0 78 1 1 5 2 1 1 39 17 0 1 3 2 1 1 6 17 0 1 2 2 1 1 6 24 0 1 2 %
5 1 1 13 30 0 1 3 1 9 17 0 1 4 2 1 1 5 17 0 1 2 1 5 17 0 1 2 4 1 1 5 17 %
0 1 2 1 1 1 3 17 0 1 3 1 1 1 3 17 0 1 2 1 3 17 0 1 2 17 1}
View
@@ -179,6 +179,7 @@ datadir=".."
library(curl)
library(ggplot2)
library(tibble)
library(ggmosaic)
library(forcats)
library(RColorBrewer)
@@ -1,7 +1,8 @@
commit,resultset_hash
e1dec3fcf325a54c7e781b6e8e80ed999ea843b1,548ab978efdca8adf3c8ea150bb548d9
1cc9e2d86512d970895dab06461c8120f90f83e1,eee5031a537a884251d43be7b27ac4cb
b739efbe582b84446fad3919531fda5ff2c35533,d34e3793ab0b0c7afdc9fea4bc8ef62c
742d1d05207bcfa81f3f05449af62fa7eb6c837d,a56813fe52547be2077b4bd1edf21de1
52e383bcab0db2a2b51bf0c0e5b7e6f2070dea6b,98f2d3627af3ebefcd835db8b2e9e0cd
b599e3ee53dc17e94cad0be1d34f7ab3d05408aa,e670347961929b8a9652d310cd1764ee
"commit","resultset_hash"
"e1dec3fcf325a54c7e781b6e8e80ed999ea843b1","548ab978efdca8adf3c8ea150bb548d9"
"1cc9e2d86512d970895dab06461c8120f90f83e1","eee5031a537a884251d43be7b27ac4cb"
"b739efbe582b84446fad3919531fda5ff2c35533","d34e3793ab0b0c7afdc9fea4bc8ef62c"
"742d1d05207bcfa81f3f05449af62fa7eb6c837d","a56813fe52547be2077b4bd1edf21de1"
"52e383bcab0db2a2b51bf0c0e5b7e6f2070dea6b","98f2d3627af3ebefcd835db8b2e9e0cd"
"b599e3ee53dc17e94cad0be1d34f7ab3d05408aa","e670347961929b8a9652d310cd1764ee"
"b3e87eeb316f6af247c4b4f7ce90857f2e6b5a45","c6677d3eb7307832a2c08263e9b0a3fd"
Oops, something went wrong.

0 comments on commit c97a287

Please sign in to comment.