From 4912eb30a5a292d6f308e921e0f6ca13ad3aebe9 Mon Sep 17 00:00:00 2001 From: Ian Lyttle Date: Wed, 22 Jan 2020 21:08:33 -0600 Subject: [PATCH] use CRAN release of vegawidget (#124) * bump version * update to Vega 4.0.0 * update S3 methods to use altair v4 (vs v3) patch gallery so examples work using v4 * Point remote to vegawidget master-branch * update to new CRAN release of vegawidget * roxygenize * remove empty line --- DESCRIPTION | 8 +++----- README.md | 9 ++++----- man/altair.Rd | 1 - man/figures/README-example-1.svg | 2 +- man/install_altair.Rd | 10 +++++++--- man/knit_print.vegaspec.Rd | 3 +-- 6 files changed, 16 insertions(+), 17 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index faeb47ed..2c8ef7ba 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: altair -Version: 4.0.0.9000 +Version: 4.0.0.9001 Title: Interface to 'Altair' Description: Interface to 'Altair' , which itself is a 'Python' interface to 'Vega-Lite' . @@ -41,7 +41,7 @@ Imports: magrittr, jsonlite, utils, - vegawidget (>= 0.2.2.9000), + vegawidget (>= 0.3.1), repr Suggests: httr, @@ -63,6 +63,4 @@ Suggests: png, fs Roxygen: list(markdown = TRUE) -RoxygenNote: 6.1.1 -Remotes: - vegawidget/vegawidget +RoxygenNote: 7.0.2 diff --git a/README.md b/README.md index 8152e3bd..d56a2bb4 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ to convert Altair charts into SVG strings or write SVG files. With the **[png](https://CRAN.R-project.org/package=png)** packages installed, you can get a bitmap array, or write PNG files. -When knitting to a non-HTML format, e.g. `github_document`, this package +When knitting to a non-HTML format, e.g. `github_document`, this package provides a `knit_print()` function that will intercept the normal renderer, using instead its own renderer, allowing you to specify `"png"` , `"svg"` or `"pdf"`. Like the image functions, this requires @@ -122,9 +122,9 @@ Some things to keep in mind: - Where you see a `.` in the Python examples, use a `$` instead. - In your data, columns that contain dots can be wrapped in square - brackets in Altair specifications, e.g. `[Sepal.Width]`, to keep + brackets in Altair specifications, e.g. `[Sepal.Width]`, to keep Altair from throwing an error. Alternatively, you can use a - double-backslash, e.g. `Sepal\\.Width`. + double-backslash, e.g. `Sepal\\.Width`. These and other “gotchas” are compiled, along with workarounds, in an article: [Field Guide to Python @@ -137,8 +137,7 @@ The documentation for this package includes some - [Getting Started](https://vegawidget.github.io/altair/articles/altair.html): - a walkthrough to get a first chart to - work + a walkthrough to get a first chart to work - [Installation](https://vegawidget.github.io/altair/articles/installation.html): some more-detailed instructions diff --git a/man/altair.Rd b/man/altair.Rd index bf76a1d3..3c159f6c 100644 --- a/man/altair.Rd +++ b/man/altair.Rd @@ -3,7 +3,6 @@ \docType{package} \name{altair} \alias{altair} -\alias{altair-package} \title{altair: Create and embed Vega-Lite charts using the Altair Python package} \description{ The goal of altair is to help you build diff --git a/man/figures/README-example-1.svg b/man/figures/README-example-1.svg index 0886f1f2..d754dc68 100644 --- a/man/figures/README-example-1.svg +++ b/man/figures/README-example-1.svg @@ -1,3 +1,3 @@ -EuropeJapanUSAOrigin020406080100120140160180200220240Horsepower05101520253035404550Miles_per_Gallon +020406080100120140160180200220240Horsepower05101520253035404550Miles_per_GallonEuropeJapanUSAOrigin diff --git a/man/install_altair.Rd b/man/install_altair.Rd index 96100843..63a33317 100644 --- a/man/install_altair.Rd +++ b/man/install_altair.Rd @@ -4,9 +4,13 @@ \alias{install_altair} \title{Install Altair Python package} \usage{ -install_altair(method = c("conda", "virtualenv"), - envname = "r-reticulate", pip = FALSE, - version = getOption("altair.python.version"), ...) +install_altair( + method = c("conda", "virtualenv"), + envname = "r-reticulate", + pip = FALSE, + version = getOption("altair.python.version"), + ... +) } \arguments{ \item{method}{\code{character}, indicates to use \code{"conda"} or \code{"virtualenv"}} diff --git a/man/knit_print.vegaspec.Rd b/man/knit_print.vegaspec.Rd index 40fdc39b..fb179dc4 100644 --- a/man/knit_print.vegaspec.Rd +++ b/man/knit_print.vegaspec.Rd @@ -5,8 +5,7 @@ \alias{knit_print.vegaspec} \title{Knit-print method} \usage{ -knit_print.altair.vegalite.v4.api.TopLevelMixin(spec, ..., - options = NULL) +knit_print.altair.vegalite.v4.api.TopLevelMixin(spec, ..., options = NULL) } \arguments{ \item{spec}{An object to be coerced to \code{vegaspec}, a Vega/Vega-Lite specification}