diff --git a/.Rbuildignore b/.Rbuildignore index cc63673..80d1c54 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,6 +1,7 @@ ^LICENSE\.md$ ^\.travis\.yml$ ^cran-comments\.md$ +^cran-output\.md$ ^.*\.Rproj$ ^\.Rproj\.user$ ^codecov\.yml$ diff --git a/.gitignore b/.gitignore index 5f977cb..57b431e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ *.swp inst/doc .Rproj.user -*.Rproj .DS_Store packrat/lib*/ packrat/src/ diff --git a/DESCRIPTION b/DESCRIPTION index 372e7bc..a01bf06 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,10 +1,10 @@ Package: tidyjson Title: Tidy Complex JSON -Version: 0.2.1.9001 +Version: 0.2.3.9000 Authors@R: c( - person("Jeremy", "Stanley", , "jeremy.stanley@gmail.com", c("aut")), - person("Cole", "Arendt", , "cole@rstudio.com", c("aut", "cre")) - ) + person("Jeremy","Stanley",,"jeremy.stanley@gmail.com",c("aut","cre")), + person("Cole","Arendt",, "cole.arendt@outlook.com",c("aut")) + ) Description: Turn complex JSON data into tidy data frames. Depends: R (>= 3.1.0) @@ -12,9 +12,9 @@ Imports: assertthat, jsonlite, purrr, - dplyr, + dplyr (>= 0.7.0), magrittr, - tidyr, + tidyr (>= 0.7.0), tibble License: MIT + file LICENSE LazyData: true diff --git a/NAMESPACE b/NAMESPACE index 6be89c3..973fea9 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -7,6 +7,7 @@ S3method(as.character,tbl_json) S3method(as.tbl_json,character) S3method(as.tbl_json,data.frame) S3method(as.tbl_json,tbl_json) +S3method(as_data_frame,tbl_json) S3method(as_tibble,tbl_json) S3method(filter,tbl_json) S3method(filter_,tbl_json) @@ -24,6 +25,7 @@ export(as_data_frame) export(as_tibble) export(bind_rows) export(enter_object) +export(filter) export(gather_array) export(gather_keys) export(gather_object) @@ -73,5 +75,6 @@ importFrom(purrr,map_if) importFrom(purrr,map_int) importFrom(purrr,map_lgl) importFrom(purrr,partial) +importFrom(tibble,as_tibble) importFrom(tibble,trunc_mat) importFrom(utils,capture.output) diff --git a/NEWS.md b/NEWS.md index c48b035..1fec592 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# tidyjson 0.2.1.9001 +# tidyjson dev ## New functions @@ -43,7 +43,11 @@ the missing `document.id`. (#86) * `gather_object()` replaces `gather_keys()`, with default `column.name` of `name` instead of `key` (#66). This more closely matches the [JSON standard](http://www.json.org/), which refers to objects as name-value pairs, and is now consistent with `gather_array()`. -## Documentation changes +## Documentation Changes + +* "Using Multiple APIs" vignette added to show support for using tidyjson with multiple APIs (#85) + +* Updated README.md to better explain `spread_all()` (#92) * "Visualizing JSON" vignette for visualizing the structure of complex JSON data, like the `companies` example (#4) diff --git a/R/tbl_json.R b/R/tbl_json.R index db5c1b4..e3481a8 100644 --- a/R/tbl_json.R +++ b/R/tbl_json.R @@ -291,6 +291,8 @@ as_tibble.tbl_json <- function(x, ...) { } #' @rdname as_tibble.tbl_json +#' +#' @export as_data_frame.tbl_json <- function(x, ...) { as_tibble.tbl_json(x,...) } diff --git a/R/utils.R b/R/utils.R index 4fa9c2f..c11dfe1 100644 --- a/R/utils.R +++ b/R/utils.R @@ -1,5 +1,3 @@ -#' Pipe operator -#' #' @name %>% #' @rdname pipe #' @keywords internal @@ -8,9 +6,7 @@ #' @export magrittr::`%>%` -#' Convert object to tbl_df -#' -#' Exported from dplyr package. Converts an object +#' @details Exported from dplyr package. Converts an object #' to a pure tibble (revert to tbl_df class and drops #' tbl_json class/attributes). #' @@ -19,10 +15,18 @@ magrittr::`%>%` #' @aliases as_data_frame #' @aliases tbl_df #' @seealso as_tibble.tbl_json +#' @importFrom tibble as_tibble #' @keywords internal #' @export -#' @usage as_tibble(data) -dplyr::as_tibble +tibble::as_tibble + +#' @name filter +#' @rdname filter +#' @seealso http://r.789695.n4.nabble.com/R-CMD-check-warning-with-S3-method-td4692255.html +#' @details This needs to be re-exported, since `dplyr` implements a generic that +#' is not a generic in the `stats` package, and `tidyjson` provides a method for that generic +#' @export +dplyr::filter #' @export #' @rdname as_tibble diff --git a/man/as_tibble.Rd b/man/as_tibble.Rd index 4463222..573d80a 100644 --- a/man/as_tibble.Rd +++ b/man/as_tibble.Rd @@ -1,10 +1,19 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \docType{import} -\name{reexports} -\alias{reexports} +\name{as_tibble} +\alias{as_tibble} \alias{as_data_frame} +\alias{reexports} \title{Objects exported from other packages} +\details{ +Exported from dplyr package. Converts an object +to a pure tibble (revert to tbl_df class and drops +tbl_json class/attributes). +} +\seealso{ +as_tibble.tbl_json +} \keyword{internal} \description{ These objects are imported from other packages. Follow the links @@ -12,5 +21,7 @@ below to see their documentation. \describe{ \item{dplyr}{\code{\link[dplyr]{as_data_frame}}} + + \item{tibble}{\code{\link[tibble]{as_tibble}}} }} diff --git a/man/filter.Rd b/man/filter.Rd new file mode 100644 index 0000000..c9d094e --- /dev/null +++ b/man/filter.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/utils.R +\docType{import} +\name{filter} +\alias{filter} +\title{Objects exported from other packages} +\details{ +This needs to be re-exported, since `dplyr` implements a generic that +is not a generic in the `stats` package, and `tidyjson` provides a method for that generic +} +\seealso{ +http://r.789695.n4.nabble.com/R-CMD-check-warning-with-S3-method-td4692255.html +} +\keyword{internal} +\description{ +These objects are imported from other packages. Follow the links +below to see their documentation. + +\describe{ + \item{dplyr}{\code{\link[dplyr]{filter}}} +}} + diff --git a/man/pipe.Rd b/man/pipe.Rd index 92e28ff..f794f2f 100644 --- a/man/pipe.Rd +++ b/man/pipe.Rd @@ -3,7 +3,7 @@ \docType{import} \name{\%>\%} \alias{\%>\%} -\title{Pipe operator} +\title{Objects exported from other packages} \usage{ lhs \%>\% rhs } diff --git a/packrat/packrat.lock b/packrat/packrat.lock index 36c8a95..97eca8e 100644 --- a/packrat/packrat.lock +++ b/packrat/packrat.lock @@ -1,17 +1,17 @@ PackratFormat: 1.4 PackratVersion: 0.4.8.1 -RVersion: 3.4.0 +RVersion: 3.3.3 Repos: CRAN=https://mirrors.nics.utk.edu/cran/ Package: BH Source: CRAN -Version: 1.62.0-1 -Hash: 14dfb3e8ffe20996118306ff4de1fab2 +Version: 1.65.0-1 +Hash: 95f62be4d6916aae14a310a8b56a6475 Package: DBI Source: CRAN -Version: 0.6-1 -Hash: 4aef5bda70897c1663d5b8bae2f4419a +Version: 0.7 +Hash: 1ab72df487f06ad5f0de05446cdd4bd6 Package: MASS Source: CRAN @@ -20,8 +20,8 @@ Hash: cef924b1619219cfc32edbb8a340e652 Package: Matrix Source: CRAN -Version: 1.2-10 -Hash: 7db92f569e4b8d50a6c86ed54cf481d0 +Version: 1.2-12 +Hash: c134ceb3a533b93c266a93fd7e1b652c Requires: lattice Package: NMF @@ -34,18 +34,24 @@ Requires: RColorBrewer, cluster, colorspace, digest, doParallel, Package: R6 Source: CRAN -Version: 2.2.1 -Hash: 530f0b839551f96ec991ce4f93156ee1 +Version: 2.2.2 +Hash: b2366cd9d2f3851a5704b4e192b985c2 Package: RColorBrewer Source: CRAN Version: 1.1-2 Hash: c0d56cd15034f395874c870141870c25 +Package: RSQLite +Source: CRAN +Version: 2.0 +Hash: aa34cc0830f6223f6b1c419c31650000 +Requires: BH, DBI, Rcpp, bit64, blob, memoise, pkgconfig, plogr + Package: Rcpp Source: CRAN -Version: 0.12.11 -Hash: 2ee22f3b5e75dec80b1d8eca61cd96d8 +Version: 0.12.13 +Hash: b9d8d89ff10ca2d8bfdaccdf83045ba1 Package: assertthat Source: CRAN @@ -54,8 +60,8 @@ Hash: e8805df54c65ac96d50235c44a82615c Package: backports Source: CRAN -Version: 1.0.5 -Hash: 8b835bdc5447f2c76fda198e17d6bda4 +Version: 1.1.1 +Hash: add136c9d4540b96290e9cc438763da7 Package: base64enc Source: CRAN @@ -69,15 +75,42 @@ Hash: e3a02070cf705d3ad1c5af1635a515a3 Package: bindrcpp Source: CRAN -Version: 0.1 -Hash: 11b0937a09c0eae22da142702c7cf1e9 +Version: 0.2 +Hash: e011aef1e6b2f8ff15d833f56abcf0ba Requires: Rcpp, bindr, plogr +Package: bit +Source: CRAN +Version: 1.1-12 +Hash: a4cdb11cf9fd6dd38f9f40c413b81e93 + +Package: bit64 +Source: CRAN +Version: 0.9-7 +Hash: 4b195615d19ba49c114eb04e09e30a96 +Requires: bit + Package: bitops Source: CRAN Version: 1.0-6 Hash: 67d0775189fd0041d95abca618c5c07e +Package: blob +Source: CRAN +Version: 1.1.0 +Hash: e29764e47f2faf0cd5b74cbcddc3fa9c +Requires: tibble + +Package: boxes +Source: github +Version: 0.0.0.9000 +Hash: d8a8117f6d18854c0d18136b1e49bee7 +Requires: assertthat, clisymbols, crayon +GithubRepo: boxes +GithubUsername: r-lib +GithubRef: master +GithubSha1: 03098dc521b28a46abe91eb46bb5fd8ed9bae671 + Package: brew Source: CRAN Version: 1.0-6 @@ -90,14 +123,24 @@ Hash: 97cb6f6293cd18d17df77a6383cc6763 Requires: bitops Package: callr -Source: CRAN -Version: 1.0.0 -Hash: f4152aceab8fa4f45b5bbde0dc118559 +Source: github +Version: 1.0.0.9000 +Hash: ba4ecc05514ac7f44406c6166d9c3ee0 +Requires: R6, processx +GithubRepo: callr +GithubUsername: r-lib +GithubRef: master +GithubSha1: 2dffbbe502c7aba84fc0785add4a1e588f88b03c Package: clipr Source: CRAN -Version: 0.3.2 -Hash: cab1335d98f5d12219e4b27562cd4cd7 +Version: 0.4.0 +Hash: 0d4860516c7e3120f8116a639b1ff553 + +Package: clisymbols +Source: CRAN +Version: 1.2.0 +Hash: a76a309884277a4fd8a5d741965fbef5 Package: cluster Source: CRAN @@ -111,35 +154,58 @@ Hash: 0bf8618b585fa98eb23414cd3ab95118 Package: commonmark Source: CRAN -Version: 1.2 -Hash: 1290583b9d16fb60322126a8698fb729 +Version: 1.4 +Hash: 91d7807331a4a37ef8376fb073960ee4 Package: covr Source: CRAN -Version: 2.2.2 -Hash: 4b7aa8c6847719b64201de2562353c3f +Version: 3.0.1 +Hash: aab7a1873ad3d943dd4a0ce4edbc2691 Requires: crayon, httr, jsonlite, rex, withr +Package: crancache +Source: github +Version: 0.0.0.9000 +Hash: 9bbcc82d8a0a89125cc91a3757c416a7 +Requires: callr, cranlike, curl, desc, digest, parsedate, rappdirs, + withr +GithubRepo: crancache +GithubUsername: r-lib +GithubRef: master +GithubSha1: 11e6bde59e05b76b8dcabb194f693592e31d93f3 + +Package: cranlike +Source: CRAN +Version: 1.0.1 +Hash: e73826f4af846034f100c01a62069b72 +Requires: DBI, RSQLite, debugme, desc + Package: crayon Source: CRAN -Version: 1.3.2 -Hash: 576a9d297a567d6a5ebd164ca5221590 +Version: 1.3.4 +Hash: ff2840dd9b0d563fc80377a5a45510cd Package: curl Source: CRAN -Version: 2.6 -Hash: 8162b82ca4809c0d63c30aedbd7348e0 +Version: 3.0 +Hash: fb0029f1c84bf9b510c4f55cda7103f1 -Package: desc +Package: debugme Source: CRAN Version: 1.1.0 -Hash: 346d3477f87b89692dd1379eaed1a1be +Hash: c233690edd9fa17a63f7c8d83c1ca153 +Requires: crayon + +Package: desc +Source: CRAN +Version: 1.1.1 +Hash: 2f99e95211c4ba6efcf5538d096587fc Requires: R6, assertthat, crayon, rprojroot Package: devtools Source: CRAN -Version: 1.13.1 -Hash: 8dadb6c6a916c8312dddc7b4d394c9f3 +Version: 1.13.4 +Hash: 80a77b22f641002c7ce0343baeaee300 Requires: digest, git2r, httr, jsonlite, memoise, rstudioapi, whisker, withr @@ -155,25 +221,21 @@ Hash: e53fb8c58673df868183697e39a6a4d6 Package: doParallel Source: CRAN -Version: 1.0.10 -Hash: df91a7abfa938c06ad87b9a2b9269adb +Version: 1.0.11 +Hash: cb602c6ef64eced7c8f32b206d4d74b4 Requires: foreach, iterators Package: dplyr -Source: github -Version: 0.6.0 -Hash: 26e5049e2234c96439aa569fbe46ef91 +Source: CRAN +Version: 0.7.4 +Hash: 8f4e0074ac488385f084e27bf6f54d41 Requires: BH, R6, Rcpp, assertthat, bindrcpp, glue, magrittr, pkgconfig, plogr, rlang, tibble -GithubRepo: dplyr -GithubUsername: tidyverse -GithubRef: master -GithubSha1: 02df8071498f3aa8ba8335cf7bc0e3eb0a2d9ca0 Package: evaluate Source: CRAN -Version: 0.10 -Hash: c3601a10c987d439e0c63ec635234a76 +Version: 0.10.1 +Hash: 54d95f4ec6d0300100413ed0127d89ae Requires: stringr Package: forcats @@ -202,13 +264,19 @@ Requires: MASS, digest, gtable, lazyeval, plyr, reshape2, scales, Package: git2r Source: CRAN -Version: 0.18.0 -Hash: 9dfaafbcca68be29b89ef7783dc1dac0 +Version: 0.19.0 +Hash: f4f7966fc357f60dc62dbffcea917eef Package: glue Source: CRAN -Version: 1.0.0 -Hash: 01c203c66517dfdca4bd50b812b109d1 +Version: 1.2.0 +Hash: 381e42baedecc633c0e547a0c7ca9de7 + +Package: gmailr +Source: CRAN +Version: 0.7.1 +Hash: 69302be7fe9b4dbb2d1e971e63e4703c +Requires: base64enc, crayon, httr, jsonlite, magrittr, mime Package: gridBase Source: CRAN @@ -217,8 +285,8 @@ Hash: d4b7f73c0fdf11d18d1e1ae1643ac4ec Package: gridExtra Source: CRAN -Version: 2.2.1 -Hash: 8f54b57d4b0598ed5b27e0eafe86a670 +Version: 2.3 +Hash: fa977bc1aab5588a08123b10ceb1ad3d Requires: gtable Package: gtable @@ -231,40 +299,45 @@ Source: CRAN Version: 0.6 Hash: aa3d5b7912b5fed4b546ed5cd2a1760b +Package: hms +Source: CRAN +Version: 0.3 +Hash: 3fca8a1c97e6cfb297fe3f4690f82c58 + Package: htmltools Source: CRAN Version: 0.3.6 -Hash: eeba9fb36d4cb6cc66f060187102be41 +Hash: 34e5c725d3ae30a76516792edcc16f24 Requires: Rcpp, digest Package: htmlwidgets Source: CRAN -Version: 0.8 -Hash: e7a3c80acddc2412f96d616949e40bb8 +Version: 0.9 +Hash: 7514f6ea9f3bef6d9b6c945095275302 Requires: htmltools, jsonlite, yaml Package: httpuv Source: CRAN -Version: 1.3.3 -Hash: 81cab0e82a62025f180863eb4ddeeb20 +Version: 1.3.5 +Hash: 6fb95f48d0fbf453ad18ace1606b6192 Requires: Rcpp Package: httr Source: CRAN -Version: 1.2.1 -Hash: 7de1f8f760441881804af7c1ff324340 +Version: 1.3.1 +Hash: 2d32e01e53d532c812052e27a1021441 Requires: R6, curl, jsonlite, mime, openssl Package: igraph Source: CRAN -Version: 1.0.1 -Hash: 26ac36402e881905359daabfd9ba4057 -Requires: Matrix, NMF, irlba, magrittr +Version: 1.1.2 +Hash: 07d33f151f94269a4573d354104e81aa +Requires: Matrix, irlba, magrittr, pkgconfig Package: irlba Source: CRAN -Version: 2.2.1 -Hash: 55fe0e84cd75f28f34804f8b75902aff +Version: 2.3.1 +Hash: d13f2ae16f48b5c92443f1fba02eb64b Requires: Matrix Package: iterators @@ -279,8 +352,8 @@ Hash: 9c51936d8dd00b2f1d4fe9d10499694c Package: knitr Source: CRAN -Version: 1.16 -Hash: 3b8dc00d51027c6d041d56bc92136452 +Version: 1.17 +Hash: f6b2bf543ee3e25f5b92bb46f9958c5f Requires: digest, evaluate, highr, markdown, stringr, yaml Package: labeling @@ -295,8 +368,18 @@ Hash: 26b9d7f0d0cb4e1d1bbb97f867c82d89 Package: lazyeval Source: CRAN -Version: 0.2.0 -Hash: 3d6e7608e65bbf5cb170dab1e3c9ed8b +Version: 0.2.1 +Hash: 88926ad9c43581fd0822a37c8ed09f05 + +Package: lineprof +Source: github +Version: 0.1.9001 +Hash: 11cd188aacffd1403285333c192f6dfd +Requires: Rcpp, shiny, stringr +GithubRepo: lineprof +GithubUsername: hadley +GithubRef: master +GithubSha1: 972e71dca0087ed8452e21f914fd612376075d5b Package: listviewer Source: CRAN @@ -306,9 +389,9 @@ Requires: htmltools, htmlwidgets, shiny Package: lubridate Source: CRAN -Version: 1.6.0 -Hash: b90f4cbefe0b3c545dd68b22c66a8a12 -Requires: stringr +Version: 1.7.1 +Hash: 4393610161ddb7066e9ca3f7aa2188bd +Requires: Rcpp, stringr Package: magrittr Source: CRAN @@ -345,14 +428,19 @@ Hash: 0ac67536eedf946d041860e02d7246c8 Package: openssl Source: CRAN -Version: 0.9.6 -Hash: 5f4711e142a44655dfea4d64fcf2f641 +Version: 0.9.9 +Hash: 3858537ac10388a5db1687450908f257 Package: packrat Source: CRAN Version: 0.4.8-1 Hash: 6ad605ba7b4b476d84be6632393f5765 +Package: parsedate +Source: CRAN +Version: 1.1.3 +Hash: 85902ad85833c2e722af340d486ef256 + Package: pkgconfig Source: CRAN Version: 2.0.1 @@ -372,7 +460,7 @@ Hash: fb19215402e2d9f1c7f803dcaa806fc2 Package: plyr Source: CRAN Version: 1.8.4 -Hash: ec0683cf0ab5494db2eff1f31591624e +Hash: 9598fbff0cce13bee89ae3a50230d93f Requires: Rcpp Package: praise @@ -380,23 +468,82 @@ Source: CRAN Version: 1.0.0 Hash: 77da8f1df873a4b91e5c4a68fe2fb1b6 +Package: prettyunits +Source: CRAN +Version: 1.0.2 +Hash: 49286102a855640daaa38eafe8b1ec30 +Requires: assertthat, magrittr + +Package: processx +Source: CRAN +Version: 2.0.0.1 +Hash: cfb7e4911fb7451f16f812580571652f +Requires: R6, assertthat, crayon, debugme + +Package: profvis +Source: CRAN +Version: 0.3.3 +Hash: 41076859eb76a7514acc5ef9ca73949c +Requires: htmlwidgets, stringr + +Package: progress +Source: github +Version: 1.1.2.9000 +Hash: fc1f6d517640480eb0e9743b782634a3 +Requires: R6, hms, prettyunits +GithubRepo: progress +GithubUsername: gaborcsardi +GithubRef: master +GithubSha1: 5e753313acf2acc151413adf39dea8c2f4857b6d + Package: pryr Source: CRAN -Version: 0.1.2 -Hash: 4dc466ed529764016b3f2c30f3e99180 +Version: 0.1.3 +Hash: 8ccad58aff7acbc034c5e181def92c99 Requires: Rcpp, stringr Package: purrr Source: CRAN -Version: 0.2.2.2 -Hash: faada139260184912fea03f3fea13842 -Requires: Rcpp, lazyeval, magrittr, tibble +Version: 0.2.4 +Hash: a80b244ccd3fdb33a0ff2be3c50dd648 +Requires: magrittr, rlang, tibble + +Package: rappdirs +Source: CRAN +Version: 0.3.1 +Hash: 7340cfebc77ad7b107a549a8635e64dd + +Package: rcmdcheck +Source: github +Version: 1.2.1.9002 +Hash: a671d203819fba1b7d425a4ba528656c +Requires: R6, callr, clisymbols, crayon, desc, digest, prettyunits, + rprojroot, withr +GithubRepo: rcmdcheck +GithubUsername: r-lib +GithubRef: master +GithubSha1: f224da0a71860602567240819df4165a62942e2c + +Package: readr +Source: CRAN +Version: 1.1.1 +Hash: ea0a469092f234fed40b574695ce7c0b +Requires: BH, R6, Rcpp, hms, tibble Package: registry Source: CRAN Version: 0.3 Hash: f9447c26b51b8c96f53720c5ff862c93 +Package: remotes +Source: github +Version: 1.1.0 +Hash: d242da7e26bb7908e45829c78b07694c +GithubRepo: remotes +GithubUsername: r-lib +GithubRef: master +GithubSha1: fbca078d801d0ecf33e26851a249589a7810c7b0 + Package: reprex Source: CRAN Version: 0.1.1 @@ -406,26 +553,39 @@ Requires: callr, clipr, knitr, rmarkdown, whisker Package: reshape2 Source: CRAN Version: 1.4.2 -Hash: 01fa9a6b3ead377e4fac84af9f982df9 +Hash: cca35d2c477d99d8bc53908939eb659e Requires: Rcpp, plyr, stringr +Package: revdepcheck +Source: github +Version: 1.0.0.9000 +Hash: 89f2de9c56eca052d6db389fa8c50d81 +Requires: DBI, RSQLite, assertthat, boxes, callr, clisymbols, + crancache, crayon, desc, glue, gmailr, jsonlite, knitr, + prettyunits, processx, progress, rcmdcheck, remotes, sessioninfo, + whoami, withr, yaml +GithubRepo: revdepcheck +GithubUsername: r-lib +GithubRef: master +GithubSha1: 20811610e8d673537f591042ac97a9024044c4e8 + Package: rex Source: CRAN -Version: 1.1.1 -Hash: 69e208c6283398d235e507a658ba8079 +Version: 1.1.2 +Hash: 57541aaae58f1a284a398f5c62c95097 Requires: lazyeval, magrittr Package: rlang Source: CRAN -Version: 0.1.1 -Hash: 86c53487ce7f82f0a7cc11c816060910 +Version: 0.1.4 +Hash: fef2abdadbb8db061b9d37e7ca5cb0b4 Package: rmarkdown Source: CRAN -Version: 1.5 -Hash: b37fc27c2604de97b4981eeae7a00879 +Version: 1.7 +Hash: e1ab8bf66146723cc2a6a67e169b5bbf Requires: base64enc, caTools, evaluate, htmltools, jsonlite, knitr, - rprojroot, yaml + rprojroot, stringr, yaml Package: rngtools Source: CRAN @@ -436,7 +596,7 @@ Requires: digest, pkgmaker, stringr Package: roxygen2 Source: CRAN Version: 6.0.1 -Hash: 5ec390c33d6b969ceea50bf7456456f8 +Hash: 2e062ab5f013e29ea37c1702b3fd226e Requires: R6, Rcpp, brew, commonmark, desc, digest, stringi, stringr, xml2 @@ -448,19 +608,26 @@ Requires: backports Package: rstudioapi Source: CRAN -Version: 0.6 -Hash: fd256f8bfb9a64cc35f98b0decb1a79f +Version: 0.7 +Hash: e2ebaff8160aff3e6b32e6e78a693c2d Package: scales Source: CRAN -Version: 0.4.1 -Hash: 6368a3249d52d20b366191e9349690b6 -Requires: RColorBrewer, Rcpp, dichromat, labeling, munsell, plyr +Version: 0.5.0 +Hash: 1e70c4e1dcc1c51847edc9f4bc11a81e +Requires: R6, RColorBrewer, Rcpp, dichromat, labeling, munsell, plyr, + viridisLite + +Package: sessioninfo +Source: CRAN +Version: 1.0.0 +Hash: 476aebe8359d1cbd68169a2f28f2fb7d +Requires: clisymbols, withr Package: shiny Source: CRAN -Version: 1.0.3 -Hash: f133585c72ea31592f663e68c6ff0b3e +Version: 1.0.5 +Hash: 4d47532a807122bfd6bc3818310f9d2e Requires: R6, digest, htmltools, httpuv, jsonlite, mime, sourcetools, xtable @@ -492,20 +659,32 @@ Hash: 88d5291104227f9dc2e7c7c1d0eb6c74 Requires: R6, crayon, digest, magrittr, praise Package: tibble -Source: github -Version: 1.3.3 -Hash: 07babb29e8d1a37fbf14f860101ee312 +Source: CRAN +Version: 1.3.4 +Hash: 3b72bdedb6c27fb216574ab9b15f2d43 Requires: Rcpp, rlang -GithubRepo: tibble -GithubUsername: tidyverse -GithubRef: master -GithubSha1: b2275d51116684d184a81c1f34f001a2215d751b Package: tidyr Source: CRAN -Version: 0.6.3 -Hash: 6fbf7116f2a9604db53b9c11a44d3cfc -Requires: Rcpp, dplyr, lazyeval, magrittr, stringi, tibble +Version: 0.7.2 +Hash: be0c92fa0a2b71ae11596e4166891314 +Requires: Rcpp, dplyr, glue, magrittr, purrr, rlang, stringi, tibble, + tidyselect + +Package: tidyselect +Source: CRAN +Version: 0.2.3 +Hash: d6505593309872018404925991bff808 +Requires: Rcpp, glue, purrr, rlang + +Package: ulimit +Source: github +Version: 0.0-3 +Hash: 96243b172b2a205dc2a037294dfbbe73 +GithubRepo: ulimit +GithubUsername: krlmlr +GithubRef: master +GithubSha1: dfed47f89bdc6adaceb0fd0e3bc68443448a2530 Package: viridis Source: CRAN @@ -523,21 +702,28 @@ Source: CRAN Version: 0.3-2 Hash: 803d662762e532705c2c066a82d066e7 +Package: whoami +Source: CRAN +Version: 1.1.2 +Hash: 2133dd074905c45657fc95925e1d9d07 +Requires: httr, jsonlite + Package: withr Source: CRAN -Version: 1.0.2 -Hash: 774eb7be9087cdc24b53b74e5359cfac +Version: 2.1.0 +Hash: 097f730987c2dc13d421b65bf01ddf08 +Requires: lattice Package: wordcloud Source: CRAN Version: 2.5 -Hash: ea1f721cdfee3799c61e8486878db2c0 +Hash: 9bb0ea525dee6993ae5f26c946f2179a Requires: RColorBrewer, Rcpp, slam Package: xml2 Source: CRAN Version: 1.1.1 -Hash: 35dbee121bb8d76347677290ba1c6a06 +Hash: bb72c0247ccf079bec2c838e54df64da Requires: BH, Rcpp Package: xtable diff --git a/revdep/README.md b/revdep/README.md index 0484c5b..afed937 100644 --- a/revdep/README.md +++ b/revdep/README.md @@ -1,53 +1,45 @@ -# Setup +# Platform -## Platform - -|setting |value | +|field |value | |:--------|:----------------------------| -|version |R version 3.4.0 (2017-04-21) | +|version |R version 3.4.1 (2017-06-30) | +|os |Ubuntu 14.04.5 LTS | |system |x86_64, linux-gnu | -|ui |RStudio (1.0.143) | +|ui |X11 | |language |en_US | |collate |en_US.UTF-8 | |tz |America/New_York | -|date |2017-05-22 | - -## Packages - -|package |* |version |date |source | -|:------------|:--|:----------|:----------|:------------------------------| -|assertthat | |0.2.0 |2017-04-11 |cran (@0.2.0) | -|covr | |2.2.2 |2017-01-05 |cran (@2.2.2) | -|dplyr | |0.5.0 |2016-06-24 |cran (@0.5.0) | -|forcats | |0.2.0 |2017-01-23 |cran (@0.2.0) | -|ggplot2 | |2.2.1 |2016-12-30 |cran (@2.2.1) | -|igraph | |1.0.1 |2015-06-26 |cran (@1.0.1) | -|jsonlite | |1.4 |2017-04-08 |cran (@1.4) | -|knitr | |1.16 |2017-05-18 |cran (@1.16) | -|listviewer | |1.4.0 |2016-11-03 |cran (@1.4.0) | -|magrittr | |1.5 |2014-11-22 |cran (@1.5) | -|needs | |0.0.3 |2016-03-28 |cran (@0.0.3) | -|purrr | |0.2.2.2 |2017-05-11 |cran (@0.2.2.2) | -|RColorBrewer | |1.1-2 |2014-12-07 |cran (@1.1-2) | -|rmarkdown | |1.5 |2017-04-26 |cran (@1.5) | -|testthat |* |1.0.2 |2016-04-23 |cran (@1.0.2) | -|tibble | |1.3.1 |2017-05-17 |cran (@1.3.1) | -|tidyjson |* |0.2.1.9000 |2017-05-22 |local (colearendt/tidyjson@NA) | -|tidyr | |0.6.3 |2017-05-15 |cran (@0.6.3) | -|viridis | |0.4.0 |2017-03-27 |cran (@0.4.0) | -|wordcloud | |2.5 |2014-06-13 |cran (@2.5) | - -# Check results - -1 packages - -|package |version | errors| warnings| notes| -|:----------------|:-------|------:|--------:|-----:| -|googleAnalyticsR |0.4.0 | 0| 0| 0| - -## googleAnalyticsR (0.4.0) -Maintainer: Mark Edmondson -Bug reports: https://github.com/MarkEdmondson1234/googleAnalyticsR/issues - -0 errors | 0 warnings | 0 notes +|date |2017-09-02 | + +# Dependencies + +|package |old |new |Δ | +|:----------|:--------|:----------|:--| +|tidyjson |0.2.2 |0.2.1.9001 |* | +|assertthat |0.2.0 |0.2.0 | | +|BH |1.65.0-1 |1.65.0-1 | | +|bindr |0.1 |0.1 | | +|bindrcpp |0.2 |0.2 | | +|dplyr |0.7.2 |0.7.2 | | +|glue |1.1.1 |1.1.1 | | +|jsonlite |1.5 |1.5 | | +|magrittr |1.5 |1.5 | | +|pkgconfig |2.0.1 |2.0.1 | | +|plogr |0.1-1 |0.1-1 | | +|purrr |NA |0.2.3 |* | +|R6 |2.2.2 |2.2.2 | | +|Rcpp |0.12.12 |0.12.12 | | +|rlang |0.1.2 |0.1.2 | | +|stringi |NA |1.1.5 |* | +|tibble |1.3.4 |1.3.4 | | +|tidyr |NA |0.7.0 |* | +|tidyselect |NA |0.2.0 |* | + +# Revdeps + +## All (1) + +|package |version |error |warning |note | +|:--------------------------------------|:-------|:-----|:-------|:----| +|[fingertipsR](problems.md#fingertipsr) |0.1.0 |1 |2 | | diff --git a/revdep/checks.rds b/revdep/checks.rds index 22d2bc3..6b8cbb3 100644 Binary files a/revdep/checks.rds and b/revdep/checks.rds differ diff --git a/revdep/problems.md b/revdep/problems.md index f4cc415..231eafa 100644 --- a/revdep/problems.md +++ b/revdep/problems.md @@ -1,46 +1,45 @@ -# Setup - -## Platform - -|setting |value | -|:--------|:----------------------------| -|version |R version 3.4.0 (2017-04-21) | -|system |x86_64, linux-gnu | -|ui |RStudio (1.0.143) | -|language |en_US | -|collate |en_US.UTF-8 | -|tz |America/New_York | -|date |2017-05-22 | - -## Packages - -|package |* |version |date |source | -|:------------|:--|:----------|:----------|:------------------------------| -|assertthat | |0.2.0 |2017-04-11 |cran (@0.2.0) | -|covr | |2.2.2 |2017-01-05 |cran (@2.2.2) | -|dplyr | |0.5.0 |2016-06-24 |cran (@0.5.0) | -|forcats | |0.2.0 |2017-01-23 |cran (@0.2.0) | -|ggplot2 | |2.2.1 |2016-12-30 |cran (@2.2.1) | -|igraph | |1.0.1 |2015-06-26 |cran (@1.0.1) | -|jsonlite | |1.4 |2017-04-08 |cran (@1.4) | -|knitr | |1.16 |2017-05-18 |cran (@1.16) | -|listviewer | |1.4.0 |2016-11-03 |cran (@1.4.0) | -|magrittr | |1.5 |2014-11-22 |cran (@1.5) | -|needs | |0.0.3 |2016-03-28 |cran (@0.0.3) | -|purrr | |0.2.2.2 |2017-05-11 |cran (@0.2.2.2) | -|RColorBrewer | |1.1-2 |2014-12-07 |cran (@1.1-2) | -|rmarkdown | |1.5 |2017-04-26 |cran (@1.5) | -|testthat |* |1.0.2 |2016-04-23 |cran (@1.0.2) | -|tibble | |1.3.1 |2017-05-17 |cran (@1.3.1) | -|tidyjson |* |0.2.1.9000 |2017-05-22 |local (colearendt/tidyjson@NA) | -|tidyr | |0.6.3 |2017-05-15 |cran (@0.6.3) | -|viridis | |0.4.0 |2017-03-27 |cran (@0.4.0) | -|wordcloud | |2.5 |2014-06-13 |cran (@2.5) | - -# Check results - -0 packages with problems - - - +# fingertipsR + +Version: 0.1.0 + +## In both + +* checking tests ... + ``` + ERROR + Running the tests in ‘tests/testthat.R’ failed. + Last 13 lines of output: + 4: In gather_array(.) : + array.index column name already exists, changing to array.index.2 + 5: In gather_array(.) : + array.index column name already exists, changing to array.index.2 + 6: In gather_array(.) : + array.index column name already exists, changing to array.index.2 + 7: In gather_array(.) : + array.index column name already exists, changing to array.index.2 + 8: In gather_array(.) : + array.index column name already exists, changing to array.index.2 + 9: In gather_array(.) : + array.index column name already exists, changing to array.index.2 + 10: In gather_array(.) : + array.index column name already exists, changing to array.index.2 + Execution halted + ``` + +* checking whether package ‘fingertipsR’ can be installed ... WARNING + ``` + Found the following significant warnings: + Warning: Installed Rcpp (0.12.12) different from Rcpp used to build dplyr (0.12.11). + See ‘/home/carendt/r/tidyjson/revdep/checks/fingertipsR/new/fingertipsR.Rcheck/00install.out’ for details. + ``` + +* checking re-building of vignette outputs ... WARNING + ``` + Error in re-building vignettes: + ... + Quitting from lines 135-150 (lifeExpectancy.Rmd) + Error: processing vignette 'lifeExpectancy.Rmd' failed with diagnostics: + Faceting variables must have at least one value + Execution halted + ``` diff --git a/revdep/timing.md b/revdep/timing.md index 58bc7cb..eb5bdfb 100644 --- a/revdep/timing.md +++ b/revdep/timing.md @@ -1,7 +1,7 @@ # Check times -|package |version | check_time| -|:----------------|:-------|----------:| -|googleAnalyticsR |0.4.0 | 66.4| +|package |version | check_time| +|:-----------|:-------|----------:| +|fingertipsR |0.1.0 | 426| diff --git a/tidyjson.Rproj b/tidyjson.Rproj new file mode 100644 index 0000000..8de5cfd --- /dev/null +++ b/tidyjson.Rproj @@ -0,0 +1,19 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX + +AutoAppendNewline: Yes + +BuildType: Package +PackageUseDevtools: Yes +PackageInstallArgs: --no-multiarch --with-keep.source diff --git a/vignettes/visualizing-json.Rmd b/vignettes/visualizing-json.Rmd index ca86058..eaa5ebe 100644 --- a/vignettes/visualizing-json.Rmd +++ b/vignettes/visualizing-json.Rmd @@ -12,7 +12,6 @@ vignette: > knitr::opts_chunk$set(collapse = T, comment = "#>") knitr::opts_chunk$set(fig.width = 7, fig.height = 5) options(tibble.print_min = 4L, tibble.print_max = 4L) -library(tidyjson) ``` JSON is a very simple data standard that, through nested data structures, can @@ -73,6 +72,7 @@ library(RColorBrewer) library(wordcloud) library(viridis) library(listviewer) + set.seed(1) ``` @@ -133,9 +133,9 @@ function in tidyjson which gives us a `data.frame` where each row corresponds to an object, array or scalar in the JSON document. ```{r} -co_struct <- companies %>% json_structure() +co_struct <- companies %>% sample(5) %>% json_structure -co_struct %>% sample_n(5) +print(co_struct) ``` We can then aggregate all of the object names across the entire collection, @@ -296,7 +296,7 @@ plot_json_graph_panel <- function(json, nrow, ncol, ...) { And let's look at several simultaneously: ```{r, fig.height = 8} -plot_json_graph_panel(companies, 7, 6, legend = FALSE, show.labels = FALSE, +plot_json_graph_panel(companies %>% sample(5), 7, 6, legend = FALSE, show.labels = FALSE, vertex.size = 4) ``` @@ -397,26 +397,27 @@ rounds_by_geo <- inner_join(rounds_usd, hqs, by = "document.id") %>% as_tibble() Now we can visualize the results ```{r} -rounds_by_geo %>% - filter(!is.na(state)) %>% +round_prep <- rounds_by_geo %>% + dplyr::filter(!is.na(state)) %>% mutate( - round = round %>% fct_collapse( + round = round %>% forcats::fct_collapse( "angel" = c("seed", "angel"), "d-f" = c("d", "e", "f"), "other" = c("grant", "partial", "post_ipo_equity", "private_equity", "debt_round", "unattributed") - ) %>% fct_relevel("angel", "a", "b", "c", "d-f", "other") + ) %>% forcats::fct_relevel("angel", "a", "b", "c", "d-f", "other") ) %>% mutate( - state = state %>% fct_lump(2) - ) %>% - ggplot(aes(state, raised, fill = state)) + - geom_violin() + - scale_y_log10() + - annotation_logticks(side = 'l') + - facet_grid(. ~ round) + - theme(legend.position = "bottom") + - labs(x = "", y = "Amount Raised (USD)") + state = state %>% forcats::fct_lump(2) + ) + +g <- ggplot(round_prep, aes(state, raised, fill = state)) + + geom_violin() + + scale_y_log10() + + annotation_logticks(side = 'l') + + facet_grid(. ~ round) + + theme(legend.position = "bottom") + + labs(x = "", y = "Amount Raised (USD)") ``` Which shows a few interesting things: