diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 34e5c6e4e2..8bd354730d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ ## Opening issues -See the [opening issues template](https://github.com/ropensci/plotly/blob/master/.github/ISSUE_TEMPLATE.md) +See the [opening issues template](https://github.com/plotly/plotly.R/blob/master/.github/ISSUE_TEMPLATE.md) ## Development guidelines @@ -15,7 +15,7 @@ If your pull request fixes a bug and/or implements a new feature, please [write To ensure a consistent and reproducible environment, visual tests should be run against the [cpsievert/plotly-orca](https://hub.docker.com/r/cpsievert/plotly-orca/) docker image. If you add a new visual test and/or expect any differences, run a container like so: ```shell -git clone https://github.com/ropensci/plotly.git +git clone https://github.com/plotly/plotly.R.git cd plotly docker run -v $(pwd):/home/plotly --privileged -p 3838:3838 cpsievert/plotly-orca ``` @@ -28,4 +28,4 @@ docker run -e VMODE="ci" -v $(pwd):/home/plotly --privileged cpsievert/plotly-or ## Code of Conduct -We want to encourage a warm, welcoming, and safe environment for contributing to this project. See the [code of conduct](https://github.com/ropensci/plotly/blob/master/CONDUCT.md) for more information. +We want to encourage a warm, welcoming, and safe environment for contributing to this project. See the [code of conduct](https://github.com/plotly/plotly.R/blob/master/CONDUCT.md) for more information. diff --git a/DESCRIPTION b/DESCRIPTION index a5a21ffe0f..5f561db6d4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -41,7 +41,6 @@ Imports: dplyr, vctrs, tibble, - lazyeval (>= 0.2.0), rlang (>= 0.4.10), crosstalk, purrr, diff --git a/NAMESPACE b/NAMESPACE index 9fe5f8e0d5..addcb3f66f 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -250,16 +250,12 @@ importFrom(httr,write_disk) importFrom(jsonlite,parse_json) importFrom(jsonlite,read_json) importFrom(jsonlite,toJSON) -importFrom(lazyeval,all_dots) -importFrom(lazyeval,f_eval) -importFrom(lazyeval,f_new) -importFrom(lazyeval,is_formula) -importFrom(lazyeval,is_lang) importFrom(magrittr,"%>%") importFrom(purrr,transpose) importFrom(rlang,"!!!") importFrom(rlang,"!!") importFrom(rlang,eval_tidy) +importFrom(rlang,is_formula) importFrom(rlang,is_na) importFrom(stats,complete.cases) importFrom(stats,is.leaf) diff --git a/NEWS.md b/NEWS.md index 2cd1a650ea..7e782db9a1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,8 @@ ## Improvements * `ggplotly()` now works better with the development version of ggplot2 (> v3.4.4). (#2315) +* plotly no longer imports lazyeval (@olivroy, #2319) + # 4.10.3 @@ -677,37 +679,37 @@ sorted alphabetically before scales are applied. Also, when mapping a factor to * Upgraded to plotly.js v1.14.1 -- https://github.com/plotly/plotly.js/releases/tag/v1.14.1 -3.6.5 -- 10 June 2016 +# 3.6.5 -- 10 June 2016 IMPROVEMENT: Multiple rows of facet strips will now be separated by
(i.e., line breaks) instead of ,. See #593. -3.6.4 -- 31 May 2016 +# 3.6.4 -- 31 May 2016 BUG FIX: embed_notebook() will no longer use a '.embed' extension in the iframe src attribute. See #613. -3.6.3 -- 24 May 2016 +# 3.6.3 -- 24 May 2016 CHANGES: Provided a better way of reexporting magrittr::`%>%`. See #597. -3.6.2 -- 24 May 2016 +# 3.6.2 -- 24 May 2016 CHANGES: Removed unnecessary plyr dependency. -3.6.1 -- 23 May 2016 +# 3.6.1 -- 23 May 2016 BUG FIX: Add a default method for plotly_build. Fixes #592. -3.6.0 -- 16 May 2016 +# 3.6.0 -- 16 May 2016 NEW FEATURES & CHANGES: @@ -724,7 +726,7 @@ BUG FIX: Column facet strips will no longer be drawn when there is only one column. -3.5.7 -- 13 May 2016 +# 3.5.7 -- 13 May 2016 CHANGES: @@ -734,13 +736,13 @@ BUG FIX: Pass knitr options to the named argument options. Fixes #582. -3.5.6 -- 12 May 2016 +# 3.5.6 -- 12 May 2016 BUG FIX: Use .embed suffix in iframe src attribute. Fixes #581. -3.5.5 -- 5 May 2016 +# 3.5.5 -- 5 May 2016 CHANGES: @@ -752,26 +754,26 @@ BUG FIX: Space for interior facet_wrap() strips are now accounted for. -3.5.4 -- 5 May 2016 +# 3.5.4 -- 5 May 2016 BUG FIX: gg2list() now returns an object of class "plotly_built" instead of "plotly" to ensure a sensible print method is invoked. -3.5.3 -- 3 May 2016 +# 3.5.3 -- 3 May 2016 CHANGES: Upgrade to plotlyjs v1.10.1 -- https://github.com/plotly/plotly.js/releases/tag/v1.10.1 -3.5.2 -- 2 May 2016 +# 3.5.2 -- 2 May 2016 BUG FIX: Added missing key properties in ggplotly() converter so selections can be accessible via event_data(). -3.5.1 -- 26 Apr 2016 +# 3.5.1 -- 26 Apr 2016 CHANGES: @@ -780,7 +782,7 @@ Upgrade to plotlyjs v1.10.0 -- https://github.com/plotly/plotly.js/releases/tag/ Distinguish between "built" (plotly_built) and "non-built" (plotly_hash) plotly objects. See #562 -3.5.0 -- 19 Apr 2016 +# 3.5.0 -- 19 Apr 2016 NEW FEATURES: @@ -790,62 +792,62 @@ CHANGES: The toRGB() function will always output color codes with an alpha channel (e.g. toRGB('black') is now 'rgba(0,0,0,1)' instead of 'rgb(0,0,0)') -3.4.15 -- 18 Apr 2016 +# 3.4.15 -- 18 Apr 2016 BUGFIX: The alpha in geom_smooth was incorrectly inheriting from other layers. See #551. -3.4.14 -- 15 Apr 2016 +# 3.4.14 -- 15 Apr 2016 CHANGES: Upgrade to plotlyjs v1.9.0 -- https://github.com/plotly/plotly.js/releases/tag/v1.9.0 -3.4.13 -- 6 Apr 2016 +# 3.4.13 -- 6 Apr 2016 BUGFIX: In some cases, marker color was inheriting from the marker line color when it shouldn't have. See ##537. -3.4.12 -- 5 Apr 2016 +# 3.4.12 -- 5 Apr 2016 CHANGES: Upgrade to plotlyjs v1.8.0 -- https://github.com/plotly/plotly.js/releases/tag/v1.8.0 -3.4.11 -- 2 Apr 2016 +# 3.4.11 -- 2 Apr 2016 BUGFIX: Fix bug when altering modebar button defaults -3.4.10 -- 1 Apr 2016 +# 3.4.10 -- 1 Apr 2016 BUGFIX: Fix a geom_errorbar bug introduced in 3.4.9. See #513. -3.4.9 -- 25 Mar 2016 +# 3.4.9 -- 25 Mar 2016 BUGFIX: Upgrade to plotlyjs 1.7.0. Fixes #513 -3.4.8 -- 23 Mar 2016 +# 3.4.8 -- 23 Mar 2016 BUGFIX: * Safeguard against null fields in selections. See #530. -3.4.7 -- 19 Mar 2016 +# 3.4.7 -- 19 Mar 2016 BUGFIX: * Added custom CSS which allows plotly to work nicely in ioslides. -3.4.6 -- 17 Mar 2016 +# 3.4.6 -- 17 Mar 2016 NEW FEATURES: @@ -853,37 +855,37 @@ The 'plotly_relayout' event is now accessible via the event_data() function. Fixed #514. -3.4.5 -- 17 Mar 2016 +# 3.4.5 -- 17 Mar 2016 BUGFIX: Fixed #514. -3.4.4 -- 17 Mar 2016 +# 3.4.4 -- 17 Mar 2016 BUGFIX: Show discrete positional values in tooltip (see #515); better GeomTile conversion; pass plot object into layers2traces. -3.4.3 -- 14 Mar 2016 +# 3.4.3 -- 14 Mar 2016 BUGFIX: Custom facet labeller functions will now translate correctly. See #507. -3.4.2 -- 14 Mar 2016 +# 3.4.2 -- 14 Mar 2016 BUGFIX: Automatic resizing will now occur only when layout.autosize is true (the default). See #403. -3.4.1 -- 13 Mar 2016 +# 3.4.1 -- 13 Mar 2016 BUGFIX: Legend titles are now supported. -3.4.0 -- 12 Mar 2016 +# 3.4.0 -- 12 Mar 2016 NEW FEATURES: @@ -897,7 +899,7 @@ BUGFIX: * Made a number of bugfixes/improvements to hoverinfo & conversion of geom_tile()/geom_point(). -3.3.1 -- 10 Mar 2016 +# 3.3.1 -- 10 Mar 2016 CHANGES: @@ -907,13 +909,13 @@ BUGFIX: * Redundant legend entries are no longer shown. -3.2.1 -- 10 Mar 2016 +# 3.2.1 -- 10 Mar 2016 BUGFIX: * Proper formatting for date tooltips. -3.2.0 -- 10 Mar 2016 +# 3.2.0 -- 10 Mar 2016 CHANGES: @@ -926,14 +928,14 @@ NEW FEATURES: * geom_violin() is now supported. * ggplotly() gains a mapping argument to control the set of aesthetics to appears in the tooltip as well as their order. -3.1.0 -- 8 Mar 2016 +# 3.1.0 -- 8 Mar 2016 CHANGES: * The "hidden" sharing option in plotly_POST() was renamed to "secret". * The default value in the scale argument in plotly_IMAGE() is now 1. -3.0.0 -- 8 Mar 2016 +# 3.0.0 -- 8 Mar 2016 NEW FEATURES: @@ -947,12 +949,12 @@ BUG FIXES: * ggplotly() now supports most of scale_*()/theme()/guides(). As a result, this fixes a lot of issues (#482, #481, #479, #476, #473, #460, #456, #454, #453, #447, #443, #434, #422, #421, #399, #379, #378, #357, #318, #316, #242, #232, #211, #203, #185, #184, #161). In order to support all of scale_x_*() an scale_y_*(), we always use linear axis types, and supply ticktext/tickvals to plotly.js. This has some unfortunate consequences on hoverformatting, which may be addressed in future releases of plotly.js -- https://github.com/plotly/plotly.js/issues/320 -2.5.0 -- 1 Mar 2016 +# 2.5.0 -- 1 Mar 2016 NEW FEATURES * New event_data() function provides easy access to plotly events in shiny. -For an example, see https://github.com/ropensci/plotly/tree/master/inst/examples/plotlyEvents +For an example, see https://github.com/plotly/plotly.R/tree/master/inst/examples/plotlyEvents * plot_ly() and ggplotly() gain a source argument to differentiate between plotly events in shiny apps with multiple plots. ggplotly() also gains width @@ -963,209 +965,209 @@ CHANGES The arguments filename, fileopt, world_readable in ggplotly() were removed as they should be provided to plotly_POST() instead. -2.4.4 -- 13 Feb 2016 +# 2.4.4 -- 13 Feb 2016 as.widget() now returns htmlwidget objects untouched. See #449. -2.4.3 -- 11 Feb 2016 +# 2.4.3 -- 11 Feb 2016 Ensure that we always return HTTPS links. Fixes #455 -2.4.2 -- 9 Feb 2016 +# 2.4.2 -- 9 Feb 2016 Fix for on-premise domain configuration. -2.4.1 -- 2 Feb 2016 +# 2.4.1 -- 2 Feb 2016 Attach base_url in as.widget() so it works in multiple contexts -2.4.0 -- 1 Feb 2016 +# 2.4.0 -- 1 Feb 2016 * Pass plot configuration using ... to avoid conflicts in defaults/documentation * Upgrade to plotly.js 1.5.1 -2.3.4 -- 1 Feb 2016 +# 2.3.4 -- 1 Feb 2016 Added a plotly_api_domain environment variable for configuring the API domain. Fixes #441 -2.3.3 -- 27 Jan 2016 +# 2.3.3 -- 27 Jan 2016 Bump axis number for each trace matching a panel number. fixes #318 -2.3.2 -- 25 Jan 2016 +# 2.3.2 -- 25 Jan 2016 More accurate list of data_array properties. Fixes #415 -2.3.1 -- 25 Jan 2016 +# 2.3.1 -- 25 Jan 2016 More accurate conversion of path width. Fixes #373. -2.3.0 -- 19 Jan 2016 +# 2.3.0 -- 19 Jan 2016 Add sharing argument and deprecate world_readable. Fixes #332 -2.2.4 -- 18 Jan 2016 +# 2.2.4 -- 18 Jan 2016 Fix for error in embed_notebook(). See #409. -2.2.3 -- 18 Jan 2016 +# 2.2.3 -- 18 Jan 2016 Fix for geom_vline(). See #402. -2.2.2 -- 18 Jan 2016 +# 2.2.2 -- 18 Jan 2016 Fix bar orientation when we detect geom_bar() + coord_flip() in ggplotly(). Fixes #390. -2.2.1 -- 18 Jan 2016 +# 2.2.1 -- 18 Jan 2016 Search for axis title in scene object. fixes #393. -2.2.0 -- 13 Jan 2016 +# 2.2.0 -- 13 Jan 2016 The default for layout.hovermode is now 'closest' for non-line scatter traces -2.1.3 -- 12 Jan 2016 +# 2.1.3 -- 12 Jan 2016 Fix size and alpha translation for geom_point. Fixes #386 -2.1.2 -- 11 Jan 2016 +# 2.1.2 -- 11 Jan 2016 Upgraded to plotlyjs 1.4.1. For a list of changes, see https://github.com/plotly/plotly.js/releases/tag/v1.4.1 -2.1.1 -- 11 Jan 2016 +# 2.1.1 -- 11 Jan 2016 Upgraded to plotlyjs 1.4. For a list of changes, see https://github.com/plotly/plotly.js/releases/tag/v1.4.0 -2.1.0 -- 29 Dec 2015 +# 2.1.0 -- 29 Dec 2015 plot_ly() now defaults to inherit=FALSE and plotly_build() is now idempotent. Fixes #280 and #277. See #368 for details. -2.0.19 -- 23 Dec 2015 +# 2.0.19 -- 23 Dec 2015 Added as.widget() function for conveniency in converting plotly object to htmlwidget objects. See #294. -2.0.18 -- 22 Dec 2015 +# 2.0.18 -- 22 Dec 2015 Fix #365 -2.0.17 -- 22 Dec 2015 +# 2.0.17 -- 22 Dec 2015 Fix #358 -2.0.16 -- 18 Dec 2015 +# 2.0.16 -- 18 Dec 2015 Require ggplot2 2.0.0 or higher. For details, see #269. -2.0.15 -- 13 Dec 2015 +# 2.0.15 -- 13 Dec 2015 Fix #346 -2.0.14 -- 13 Dec 2015 +# 2.0.14 -- 13 Dec 2015 Fix #212 -2.0.13 -- 12 Dec 2015 +# 2.0.13 -- 12 Dec 2015 Fix #286 -2.0.12 -- 11 Dec 2015 +# 2.0.12 -- 11 Dec 2015 Fix #221 -2.0.11 -- 11 Dec 2015 +# 2.0.11 -- 11 Dec 2015 Fix #250 -2.0.10 -- 10 Dec 2015 +# 2.0.10 -- 10 Dec 2015 Fix #225 -2.0.9 -- 10 Dec 2015 +# 2.0.9 -- 10 Dec 2015 Fix #333 -2.0.8 -- 10 Dec 2015 +# 2.0.8 -- 10 Dec 2015 Fix a bug with geom_segment (see #321 & #228) -2.0.7 -- 10 Dec 2015 +# 2.0.7 -- 10 Dec 2015 Fix #233 -2.0.6 -- 2 Dec 2015 +# 2.0.6 -- 2 Dec 2015 Upgrade to plotlyjs 1.1.1. Fixes #319. -2.0.5 -- 1 Dec 2015 +# 2.0.5 -- 1 Dec 2015 Fix for legend names. See #236. -2.0.4 -- 28 Nov 2015 +# 2.0.4 -- 28 Nov 2015 Fix #313. -2.0.3 -- 18 Nov 2015 +# 2.0.3 -- 18 Nov 2015 Fixed bug causing knitr options to be ignored. Also added VignetteBuilder to DESCRIPTION to vignette is available. -2.0.2 -- 17 Nov 2015 +# 2.0.2 -- 17 Nov 2015 Using plotly_build() on a ggplot object should always return a plotly object -2.0.1 -- 17 Nov 2015 +# 2.0.1 -- 17 Nov 2015 Better printing of server figures. Documentation and other fixes for initial CRAN release! -2.0.0 -- 2 Nov 2015 +# 2.0.0 -- 2 Nov 2015 Added a dependency on htmlwidgets and 'offline' plots are now the default. If you want to create a figure on a plotly server, you need to use `plotly_POST()`. Also added a `config()` function to control the default appearance of the interactive plot -1.0.10 -- 3 Nov 2015 +# 1.0.10 -- 3 Nov 2015 Fixed #292. -1.0.9 -- 28 Sep 2015 +# 1.0.9 -- 28 Sep 2015 Fixed filename, fileopt arguments in plot_ly. Specifying the same filename will now overwrite the plot if it exists. -1.0.8 -- 14 Sep 2015 +# 1.0.8 -- 14 Sep 2015 Added the plotly_IMAGES() function which interfaces to the images endpoint https://api.plot.ly/v2/#images -Details -> https://github.com/ropensci/plotly/pull/279 +Details -> https://github.com/plotly/plotly.R/pull/279 -1.0.7 -- 26 Aug 2015 +# 1.0.7 -- 26 Aug 2015 -See https://github.com/ropensci/plotly/pull/275 +See https://github.com/plotly/plotly.R/pull/275 -1.0.6 -- 25 Aug 2015 +# 1.0.6 -- 25 Aug 2015 -Fix a bug with subplot domain calculations (see https://github.com/ropensci/plotly/pull/274) +Fix a bug with subplot domain calculations (see https://github.com/plotly/plotly.R/pull/274) -1.0.5 -- 20 Aug 2015 +# 1.0.5 -- 20 Aug 2015 Fix issue converting plotly offline markdown documents to HTML when using `markdown::markdownToHTML` -1.0.4 -- 14 Aug 2015 +# 1.0.4 -- 14 Aug 2015 Bug fix for subplot. See #265 -1.0.3 -- 7 Aug 2015 +# 1.0.3 -- 7 Aug 2015 Improved legend positioning. See #241 -1.0.2 -- 2 Aug 2015 +# 1.0.2 -- 2 Aug 2015 * last_plot() will now look for the last plotly object; if not found, it will try to find the last ggplot object. * Officially added the filename, fileopt, and world_readable arguments to plot_ly() and ggplotly(). * If plotly offline is not available, the shiny.launch.browser option is changed to open a web brower. See #245. * Various namespace/documentation improvements for R CMD check. -1.0.1 -- 2 Aug 2015 +# 1.0.1 -- 2 Aug 2015 Removed the stream() function as it wasn't ready to be included. -1.0.0 -- 31 July 2015 +# 1.0.0 -- 31 July 2015 A major reworking of package internals which includes a few backwards incompatible changes. @@ -1177,152 +1179,152 @@ Major changes include: (4) Added the `renderPlotly()` and `plotlyOutput()` functions for embedding plotly graphs in shiny applications. (5) Added `offline()` function for creating standalone HTML pages via Plotly Offline (see http://purchasing.plot.ly/) -For more details, see the new vignettes with `browseVignettes(package = "plotly")` and/or the pull request -> https://github.com/ropensci/plotly/pull/226 +For more details, see the new vignettes with `browseVignettes(package = "plotly")` and/or the pull request -> https://github.com/plotly/plotly.R/pull/226 -0.6.3 -- 2 June 2015 +# 0.6.3 -- 2 June 2015 Add new tests inspired by the R Cookbook distributions #214 -0.6.2 -- 19 May 2015 +# 0.6.2 -- 19 May 2015 In geom_bar(stat = "identity"), sum y values if multiple for a given x. -0.6.1 -- 5 May 2015 +# 0.6.1 -- 5 May 2015 Add test-cookbook-lines.R and fix bugs that showed up in those tests. -0.6 -- 4 May 2015 +# 0.6 -- 4 May 2015 Let gg2list() return a figure object (backwards incompatible change). -0.5.29 -- 16 April 2015 +# 0.5.29 -- 16 April 2015 geom_density() as filled area chart #202 -0.5.28 -- 15 April 2015 +# 0.5.28 -- 15 April 2015 Let ggplot handle histogram binning. Fix #198 -0.5.27 -- 19 Mar 2015 +# 0.5.27 -- 19 Mar 2015 Reimplement geom_ribbon as a basic polygon. Fix #191. Fix #192. -0.5.26 -- 18 Mar 2015 +# 0.5.26 -- 18 Mar 2015 Implemented geom_rect #178 -0.5.25 -- 10 March 2015 +# 0.5.25 -- 10 March 2015 Implemented geom_smooth() #183 -0.5.24 -- 10 March 2015 +# 0.5.24 -- 10 March 2015 Implemented facet_wrap(scales="free") #167 -0.5.23 -- 10 March 2015. +# 0.5.23 -- 10 March 2015. geom_ribbon() now respects alpha transparency -0.5.22 -- 2 March 2015. +# 0.5.22 -- 2 March 2015. Fixes for ylim() #171. -0.5.21 -- 23 February 2015. +# 0.5.21 -- 23 February 2015. Fixes for error bars and tick marks. -0.5.20 -- 9 February 2015. +# 0.5.20 -- 9 February 2015. Add alpha transparency to fill conversion. Let geom_area support colour and fill aesthetics. -0.5.19 -- 23 January 2015. +# 0.5.19 -- 23 January 2015. Support class conversion such as as.Date() within ggplot code. -0.5.18 -- 22 January 2015. +# 0.5.18 -- 22 January 2015. Return proper filepath when filename contains directories. -0.5.17 -- 30 December 2014. +# 0.5.17 -- 30 December 2014. Support date-time binning in histograms. -0.5.16 -- 29 December 2014. +# 0.5.16 -- 29 December 2014. Support colour aesthetic in geom_text(). -0.5.15 -- 19 December 2014. +# 0.5.15 -- 19 December 2014. Use proper RCurlOptions in get_figure() method. -0.5.14 -- 1 December 2014. +# 0.5.14 -- 1 December 2014. Make layers geom_line + geom_point only one trace in Plotly. -0.5.13 -- 27 November 2014. +# 0.5.13 -- 27 November 2014. Rename translation file and server endpoint parameter to be hip. -0.5.12 -- 12 November 2014. +# 0.5.12 -- 12 November 2014. Improve legend title position. -0.5.11 -- 11 November 2014. +# 0.5.11 -- 11 November 2014. Show legend title. -0.5.10 -- 7 November 2014. +#0.5.10 -- 7 November 2014. Improve showlegend and fix legend’s `x` position. -0.5.9 -- 3 November 2014. +# 0.5.9 -- 3 November 2014. Default colours for geom_polygon(). -0.5.8 -- 30 October 2014. +# 0.5.8 -- 30 October 2014. Support hline over a factor x range. Default colours for geom_boxplot(). -0.5.7 -- 29 October 2014. +# 0.5.7 -- 29 October 2014. Default colours for geom_area() and geom_ribbon(). -0.5.6 -- 28 October 2014. +# 0.5.6 -- 28 October 2014. Convert line size faithfully. -0.5.5 -- 24 October 2014. +# 0.5.5 -- 24 October 2014. Support category histograms (with factors). -0.5.4 -- 22 October 2014. +# 0.5.4 -- 22 October 2014. Support conversion of geom_vline(). -0.5.3 -- 21 October 2014. +# 0.5.3 -- 21 October 2014. Support conversion of geom_bar() with position_dodge(). -0.5.2 -- 18 October 2014. +# 0.5.2 -- 18 October 2014. Support aesthetic shape in geom_path() and, hence, geom_line() (conversion). -0.5.1 -- 15 October 2014. +# 0.5.1 -- 15 October 2014. Do not show zero lines by default (as in ggplot2 plots). -0.5.0 -- 15 October 2014. +# 0.5.0 -- 15 October 2014. From now on, version numbers are meaningful again... Many changes meanwhile, especially support for more geoms. -0.4 -- 7 April 2014. +# 0.4 -- 7 April 2014. Re-write geom to trace conversion code. -0.3.8 -- 21 March 2014. +# 0.3.8 -- 21 March 2014. ggplotly takes the last_plot() by default. @@ -1330,7 +1332,7 @@ Support for ggplotly layout elements title, tickcolor, gridcolor, showlegend, plot_bgcolor, paper_bgcolor, tickangle, axis titles, plot border colors. -0.3.7 -- 14 March 2014. +# 0.3.7 -- 14 March 2014. For ggplotly: @@ -1338,8 +1340,8 @@ For ggplotly: - if in knitr/Rmd in a chunk with plotly=TRUE, embed the plot. -0.3.6 -- 10 March 2014. +# 0.3.6 -- 10 March 2014. Merge ggplotly code. -0.3.5 +# 0.3.5 diff --git a/R/add.R b/R/add.R index 7f8542ca9f..598cc81131 100644 --- a/R/add.R +++ b/R/add.R @@ -305,7 +305,7 @@ add_polygons <- function(p, x = NULL, y = NULL, ..., #' @rdname add_trace #' @export add_sf <- function(p, ..., x = ~x, y = ~y, data = NULL, inherit = TRUE) { - try_library("sf", "add_sf") + rlang::check_installed("sf", "to use `add_sf()`.") dat <- plotly_data(add_data(p, data)) if (!is_sf(dat)) { stop( diff --git a/R/animate.R b/R/animate.R index 25ffa28433..27c920907a 100644 --- a/R/animate.R +++ b/R/animate.R @@ -25,8 +25,7 @@ #' all existing frames are animated to completion before the new animation #' is started. #' @export -#' @rdname animation -#' @aliases animation +#' @name animation #' @author Carson Sievert #' @examplesIf interactive() || !identical(.Platform$OS.type, "windows") #' @@ -122,7 +121,6 @@ animation_opts_defaults <- function() { } -#' @inheritParams animation_opts #' @param hide remove the animation slider? #' @param ... for `animation_slider`, attributes are passed to a special #' layout.sliders object tied to the animation frames. diff --git a/R/api_exports.R b/R/api_exports.R index c7123f5590..4fbee0cd4e 100644 --- a/R/api_exports.R +++ b/R/api_exports.R @@ -42,7 +42,7 @@ #' included in the body of the HTTP request. #' #' @export -#' @rdname api +#' @name api #' @author Carson Sievert #' @references \url{https://api.plot.ly/v2} #' @seealso [signup()] @@ -108,7 +108,7 @@ #' #' } #' - +NULL #' @rdname api #' @export diff --git a/R/dev.R b/R/dev.R index 9c1d28f0a8..4125e820ec 100644 --- a/R/dev.R +++ b/R/dev.R @@ -17,7 +17,7 @@ plotly_json <- function(p = last_plot(), jsonedit = interactive(), pretty = TRUE, ...) { plotlyJSON <- to_JSON(plotly_build(p)$x, pretty = pretty) if (jsonedit) { - try_library("listviewer", "plotly_json") + rlang::check_installed("listviewer", "to use `plotly_json()`.") listviewer::jsonedit(plotlyJSON, mode = "form", ...) } else { plotlyJSON @@ -50,7 +50,7 @@ plotly_json <- function(p = last_plot(), jsonedit = interactive(), pretty = TRUE schema <- function(jsonedit = interactive(), ...) { if (jsonedit) { - try_library("listviewer", "schema") + rlang::check_installed("listviewer", "for `schema()`.") print(listviewer::jsonedit(Schema, mode = "form")) } diff --git a/R/embed.R b/R/embed.R index 5dfb12648f..866a98ddcc 100644 --- a/R/embed.R +++ b/R/embed.R @@ -8,7 +8,7 @@ #' @author Carson Sievert #' @export embed_notebook <- function(x, width = NULL, height = NULL, file = NULL) { - try_library("IRdisplay", "embed_notebook") + rlang::check_installed("IRdisplay", "for `embed_notebook()`.") if (!is.null(file)) { warning("The file argument is no longer used", call. = FALSE) } diff --git a/R/export.R b/R/export.R index 91f18d0bbf..fe3fdf1967 100644 --- a/R/export.R +++ b/R/export.R @@ -59,7 +59,7 @@ export <- function(p = last_plot(), file = "plotly.png", selenium = NULL, ...) { # phantomjs doesn't support webgl or svg/webp output if (use_webshot) { - try_library("webshot", "export") + rlang::check_installed("webshot", "for `export()`.") return(webshot::webshot(f, file, ...)) } diff --git a/R/ggplotly.R b/R/ggplotly.R index 2759ef27ba..b632c46b9f 100644 --- a/R/ggplotly.R +++ b/R/ggplotly.R @@ -1120,10 +1120,10 @@ gg2list <- function(p, width = NULL, height = NULL, mappingFormulas <- lapply(layers, function(x) { mappings <- getAesMap(plot, x) if (originalData) { - lapply(mappings, lazyeval::f_new) + lapply(mappings, function(x) rlang::new_formula(lhs = NULL, rhs = x)) } else { nms <- names(mappings) - setNames(lapply(nms, function(x) lazyeval::f_new(as.name(x))), nms) + setNames(lapply(nms, function(x) rlang::new_formula(lhs = NULL, rhs = as.name(x))), nms) } }) @@ -1214,7 +1214,7 @@ verifyUnit <- function(u) { } # Use public API for getting the unit's type, if available -# https://github.com/ropensci/plotly/pull/1646#issue-331268260 +# https://github.com/plotly/plotly.R/pull/1646#issue-331268260 getUnitType <- function(u) { tryNULL(get("unitType", envir = asNamespace("grid"))(u)) %||% attr(u, "unit") diff --git a/R/helpers.R b/R/helpers.R index 8018ce0db9..4b70a3b1c3 100644 --- a/R/helpers.R +++ b/R/helpers.R @@ -217,7 +217,7 @@ plotly_empty <- function(...) { #' ) raster2uri <- function(r, ...) { - try_library("png", "raster2uri") + rlang::check_installed("png", "for `raster2uri()`.") # should be 4 x n matrix if (inherits(r, "nativeRaster")) { # png::writePNG directly supports nativeRaster objects diff --git a/R/imports.R b/R/imports.R index 548d4e4c70..746beb6ade 100644 --- a/R/imports.R +++ b/R/imports.R @@ -8,13 +8,12 @@ #' @importFrom jsonlite toJSON parse_json read_json #' @importFrom httr RETRY content config add_headers authenticate stop_for_status warn_for_status write_disk #' @importFrom htmlwidgets createWidget sizingPolicy saveWidget onRender prependContent -#' @importFrom lazyeval f_eval is_formula all_dots is_lang f_new #' @importFrom tibble as_tibble #' @importFrom htmltools browsable tagList tags div #' @importFrom purrr transpose #' @importFrom tools file_ext file_path_sans_ext #' @importFrom data.table as.data.table setorderv -#' @importFrom rlang eval_tidy !! !!! +#' @importFrom rlang eval_tidy !! !!! is_formula NULL diff --git a/R/layers2traces.R b/R/layers2traces.R index 240087563f..0934cece9e 100644 --- a/R/layers2traces.R +++ b/R/layers2traces.R @@ -981,7 +981,7 @@ geom2trace.default <- function(data, params, p) { "geom_", class(data)[1], "() has yet to be implemented in plotly.\n", " If you'd like to see this geom implemented,\n", " Please open an issue with your example code at\n", - " https://github.com/ropensci/plotly/issues" + " https://github.com/plotly/plotly.R/issues" ) list() } @@ -1106,7 +1106,7 @@ aes2plotly <- function(data, params, aes = "size") { # If the first class of `data` is a data.frame, # ggfun() returns a function because ggplot2 now # defines data.frame in it's namespace - # https://github.com/ropensci/plotly/pull/1481 + # https://github.com/plotly/plotly.R/pull/1481 if ("default_aes" %in% names(geom_obj)) geom_obj$default_aes else NULL } @@ -1127,7 +1127,7 @@ aes2plotly <- function(data, params, aes = "size") { if (is.null(converter)) { warning("A converter for ", aes, " wasn't found. \n", "Please report this issue to: \n", - "https://github.com/ropensci/plotly/issues/new", call. = FALSE) + "https://github.com/plotly/plotly.R/issues/new", call. = FALSE) converter <- identity } converter(vals) diff --git a/R/layout.R b/R/layout.R index c1c225aadc..438d817795 100644 --- a/R/layout.R +++ b/R/layout.R @@ -14,7 +14,7 @@ layout <- function(p, ..., data = NULL) { #' @export layout.matrix <- function(p, ..., data = NULL) { # workaround for the popular graphics::layout() function - # https://github.com/ropensci/plotly/issues/464 + # https://github.com/plotly/plotly.R/issues/464 graphics::layout(p, ...) } diff --git a/R/orca.R b/R/orca.R index dfa7d9716a..85fbeb8500 100644 --- a/R/orca.R +++ b/R/orca.R @@ -25,8 +25,7 @@ #' `orca_serve()`, additional arguments passed along to `processx::process`. #' @export #' @author Carson Sievert -#' @md -#' @rdname orca +#' @name orca #' @examplesIf interactive() || !identical(.Platform$OS.type, "windows") #' #' \dontrun{ @@ -91,7 +90,7 @@ orca <- function(p, file = "plot.png", format = tools::file_ext(file), if (isTRUE(mathjax)) args <- c(args, "--mathjax", file.path(mathjax_path(), "MathJax.js")) # TODO: point to local topojson? Should this only work if plot_geo(standalone = TRUE)? - try_library("processx", "orca") + rlang::check_installed("processx", "for `orca()`.") invisible(processx::run("orca", args, echo = TRUE, spinner = TRUE, ...)) } @@ -135,7 +134,7 @@ orca_serve <- function(port = 5151, mathjax = FALSE, safe = FALSE, request_limit # make sure we have the required infrastructure orca_available() - try_library("processx", "orca_serve") + rlang::check_installed("processx", "for `orca_serve()`.") # use main bundle since any plot can be thrown at the server plotlyjs_path <- plotlyMainBundlePath() diff --git a/R/partial_bundles.R b/R/partial_bundles.R index fc7a66795e..b21ae655f9 100644 --- a/R/partial_bundles.R +++ b/R/partial_bundles.R @@ -134,7 +134,7 @@ verify_partial_bundle <- function(p) { # download the relevant bundle if (isTRUE(p$dependencies[[idx]]$local)) { # TODO: implement a caching mechanism? - try_library("curl", "partial_bundle") + rlang::check_installed("curl", "for `partial_bundle()`.") tmpfile <- file.path(tempdir(), bundle_script) p$dependencies[[idx]]$src$file <- dirname(tmpfile) if (!file.exists(tmpfile)) { diff --git a/R/plotly_build.R b/R/plotly_build.R index ad9f62c704..ce13c890b9 100644 --- a/R/plotly_build.R +++ b/R/plotly_build.R @@ -622,7 +622,7 @@ map_size <- function(traces, stroke = FALSE) { attrs <- Schema$traces[[type]]$attributes # `size` controls marker.size (note 'bar' traces have marker but not marker.size) - # TODO: always ensure an array? https://github.com/ropensci/plotly/pull/1176 + # TODO: always ensure an array? https://github.com/plotly/plotly.R/pull/1176 if (has_attr(type, "marker") && "size" %in% names(attrs$marker)) { s <- if (isSingular) size_ else if (array_ok(attrs$marker$size)) sizes trace$marker <- modify_list(list(size = default(s), sizemode = default("area")), trace$marker) @@ -988,7 +988,7 @@ traceify <- function(dat, x = NULL) { lvls <- lvls[lvls %in% x] # the order of lvls determines the order in which traces are drawn # for ordered factors at least, it makes sense to draw the highest level first - # since that _should_ be the darkest color in a sequential pallette + # since that _should_ be the darkest color in a sequential palette if (is.ordered(x)) lvls <- rev(lvls) n <- length(x) # recursively search for a non-list of appropriate length (if it is, subset it) @@ -1003,9 +1003,9 @@ traceify <- function(dat, x = NULL) { return(new_dat) } - +# Previously used lazyeval #2319 eval_attr <- function(x, data = NULL) { - if (lazyeval::is_formula(x)) lazyeval::f_eval(x, data) else x + if (rlang::is_formula(x)) rlang::eval_tidy(rlang::f_rhs(x), data = data) else x } # overwrite defaults with the user defined palette diff --git a/R/plotly_example.R b/R/plotly_example.R index 325c0a0a18..284a938837 100644 --- a/R/plotly_example.R +++ b/R/plotly_example.R @@ -44,12 +44,12 @@ plotly_example <- function(type = c("demo", "shiny", "rmd"), name, edit = TRUE, } if (type == "shiny") { - try_library("shiny", "plotly_example") + rlang::check_installed("shiny", "for `plotly_example()`.") getFromNamespace("runApp", asNamespace("shiny"))(finalDir, ...) } if (type == "rmd") { - try_library("rmarkdown", "plotly_example") + rlang::check_installed("rmarkdown", "for `plotly_example()`.") input <- file.path(finalDir, "index.Rmd") output <- tempfile(fileext = ".html") getFromNamespace("render", asNamespace("rmarkdown"))(input, output_file = output, ...) diff --git a/R/sf.R b/R/sf.R index a92c919bca..64038aec8b 100644 --- a/R/sf.R +++ b/R/sf.R @@ -92,7 +92,7 @@ sf_default_attrs <- function(d) { if (inherits(d, "GeomPolygon")) return(list(mode = "lines", fill = "toself")) if (inherits(d, "GeomPath")) return(list(mode = "lines")) if (inherits(d, "GeomPoint")) return(list(mode = "markers")) - stop("Unexpected case. Please report an issue here https://github.com/ropensci/plotly/issues/new", call. = FALSE) + stop("Unexpected case. Please report an issue here https://github.com/plotly/plotly.R/issues/new", call. = FALSE) } diff --git a/R/utils.R b/R/utils.R index da79d43cf2..fdb54bd712 100644 --- a/R/utils.R +++ b/R/utils.R @@ -338,7 +338,7 @@ supply_defaults <- function(p) { } tr }) - # hack to avoid https://github.com/ropensci/plotly/issues/945 + # hack to avoid https://github.com/plotly/plotly.R/issues/945 if (is_type(p, "parcoords")) p$x$layout$margin$t <- NULL # supply domain defaults @@ -521,7 +521,7 @@ verify_attr <- function(proposed, schema, layoutAttr = FALSE) { # tag 'src-able' attributes (needed for api_create()) # note that layout has 'src-able' attributes that shouldn't - # be turned into grids https://github.com/ropensci/plotly/pull/1489 + # be turned into grids https://github.com/plotly/plotly.R/pull/1489 isSrcAble <- !is.null(schema[[paste0(attr, "src")]]) && length(proposed[[attr]]) > 1 if ((isDataArray || isSrcAble) && !isTRUE(layoutAttr)) { proposed[[attr]] <- structure(proposed[[attr]], apiSrc = TRUE) @@ -575,7 +575,7 @@ attrs_name_check <- function(proposedAttrs, validAttrs, type = "scatter") { } # make sure trace type is valid -# TODO: add an argument to verify trace properties are valid (https://github.com/ropensci/plotly/issues/540) +# TODO: add an argument to verify trace properties are valid (https://github.com/plotly/plotly.R/issues/540) verify_type <- function(trace) { if (is.null(trace$type)) { attrs <- names(trace) @@ -837,7 +837,7 @@ verify_key_type <- function(p) { p$x$data[[i]]$`_isSimpleKey` <- TRUE p$x$data[[i]]$`_isNestedKey` <- FALSE } - p$x$data[[i]]$`_isNestedKey` <- p$x$data[[i]]$`_isNestedKey` %||% !lazyeval::is_atomic(k) + p$x$data[[i]]$`_isNestedKey` <- p$x$data[[i]]$`_isNestedKey` %||% !rlang::is_atomic(k) # key values should always be strings if (p$x$data[[i]]$`_isNestedKey`) { p$x$data[[i]]$key <- lapply(p$x$data[[i]]$key, function(x) I(as.character(x))) @@ -1139,16 +1139,6 @@ cat_profile <- function(key, value, path = "~") { cat(snippet, file = r_profile, append = TRUE) } - -# check that suggested packages are installed -try_library <- function(pkg, fun = NULL) { - if (is_installed(pkg)) { - return(invisible()) - } - stop("Package `", pkg, "` required", if (!is.null(fun)) paste0(" for `", fun, "`"), ".\n", - "Please install and try again.", call. = FALSE) -} - # similar logic to rstudioapi::isAvailable() is_rstudio <- function() { identical(.Platform$GUI, "RStudio") diff --git a/README.md b/README.md index 8621efb816..6b41e9fef8 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ -[![R-CMD-check](https://github.com/ropensci/plotly/workflows/R-CMD-check/badge.svg)](https://github.com/plotly/plotly.R/actions) +[![R-CMD-check](https://github.com/plotly/plotly.R/workflows/R-CMD-check/badge.svg)](https://github.com/plotly/plotly.R/actions) [![CRAN Status](https://www.r-pkg.org/badges/version/plotly)](https://cran.r-project.org/package=plotly) [![CRAN Downloads](https://cranlogs.r-pkg.org/badges/grand-total/plotly)](https://cranlogs.r-pkg.org/badges/grand-total/plotly) [![monthly](https://cranlogs.r-pkg.org/badges/plotly)](https://cranlogs.r-pkg.org/badges/plotly) diff --git a/inst/docs.R b/inst/docs.R index 41f7bea577..15353f2685 100644 --- a/inst/docs.R +++ b/inst/docs.R @@ -1,5 +1,5 @@ # install the new/experimental plotly R package -# devtools::install_github("ropensci/plotly@carson-dsl") +# devtools::install_github("plotly/plotly.R@carson-dsl") ################################################################################ # Basic Charts (https://plotly.com/r/#basic-charts) @@ -1123,7 +1123,7 @@ plot_ly(x = c(1, 2), y = c(1, 2), filename = "myPlot", fileopt = "overwrite") # ---------------------------------------------------------------------------- # Maybe copy/paste relevant bits from this vignette? -> -# https://github.com/ropensci/plotly/blob/carson-dsl/vignettes/intro.Rmd +# https://github.com/plotly/plotly.R/blob/carson-dsl/vignettes/intro.Rmd # ---------------------------------------------------------------------------- # https://plotly.com/r/shiny-tutorial/ @@ -1133,7 +1133,7 @@ plot_ly(x = c(1, 2), y = c(1, 2), filename = "myPlot", fileopt = "overwrite") # http://moderndata.plot.ly/dashboards-in-r-with-shiny-plotly/ # If we want, we could copy/paste source from this folder -> -# https://github.com/ropensci/plotly/tree/carson-dsl/inst/examples +# https://github.com/plotly/plotly.R/tree/carson-dsl/inst/examples # ---------------------------------------------------------------------------- # https://plotly.com/r/get-requests/ diff --git a/inst/examples/shiny/event_data/tests/shinytest/mytest-expected/001.json b/inst/examples/shiny/event_data/tests/shinytest/mytest-expected/001.json index 0a80458075..aafb5d9688 100644 --- a/inst/examples/shiny/event_data/tests/shinytest/mytest-expected/001.json +++ b/inst/examples/shiny/event_data/tests/shinytest/mytest-expected/001.json @@ -430,9 +430,9 @@ }, { "name": "crosstalk", - "version": "1.2.0", + "version": "1.2.1", "src": { - "href": "crosstalk-1.2.0" + "href": "crosstalk-1.2.1" }, "meta": null, "script": "js/crosstalk.min.js", diff --git a/inst/examples/shiny/event_data/tests/shinytest/mytest-expected/002.json b/inst/examples/shiny/event_data/tests/shinytest/mytest-expected/002.json index 52807af51f..b089eae1e3 100644 --- a/inst/examples/shiny/event_data/tests/shinytest/mytest-expected/002.json +++ b/inst/examples/shiny/event_data/tests/shinytest/mytest-expected/002.json @@ -448,9 +448,9 @@ }, { "name": "crosstalk", - "version": "1.2.0", + "version": "1.2.1", "src": { - "href": "crosstalk-1.2.0" + "href": "crosstalk-1.2.1" }, "meta": null, "script": "js/crosstalk.min.js", diff --git a/inst/examples/shiny/event_data/tests/shinytest/mytest-expected/003.json b/inst/examples/shiny/event_data/tests/shinytest/mytest-expected/003.json index 069ced6f20..264b18e0a8 100644 --- a/inst/examples/shiny/event_data/tests/shinytest/mytest-expected/003.json +++ b/inst/examples/shiny/event_data/tests/shinytest/mytest-expected/003.json @@ -452,9 +452,9 @@ }, { "name": "crosstalk", - "version": "1.2.0", + "version": "1.2.1", "src": { - "href": "crosstalk-1.2.0" + "href": "crosstalk-1.2.1" }, "meta": null, "script": "js/crosstalk.min.js", diff --git a/inst/examples/shiny/event_data/tests/shinytest/mytest-expected/004.json b/inst/examples/shiny/event_data/tests/shinytest/mytest-expected/004.json index 2b72add64b..5552f3edd5 100644 --- a/inst/examples/shiny/event_data/tests/shinytest/mytest-expected/004.json +++ b/inst/examples/shiny/event_data/tests/shinytest/mytest-expected/004.json @@ -453,9 +453,9 @@ }, { "name": "crosstalk", - "version": "1.2.0", + "version": "1.2.1", "src": { - "href": "crosstalk-1.2.0" + "href": "crosstalk-1.2.1" }, "meta": null, "script": "js/crosstalk.min.js", diff --git a/inst/htmlwidgets/plotly.js b/inst/htmlwidgets/plotly.js index 7a2a143b6d..e14aadc19c 100644 --- a/inst/htmlwidgets/plotly.js +++ b/inst/htmlwidgets/plotly.js @@ -65,7 +65,7 @@ HTMLWidgets.widget({ // lower the z-index of the modebar to prevent it from highjacking hover // (TODO: do this via CSS?) - // https://github.com/ropensci/plotly/issues/956 + // https://github.com/plotly/plotly.R/issues/956 // https://www.w3schools.com/jsref/prop_style_zindex.asp var modebars = document.querySelectorAll(".js-plotly-plot .plotly .modebar"); for (var i = 0; i < modebars.length; i++) { diff --git a/man/animation.Rd b/man/animation.Rd index b0b9c9abf7..29621ce042 100644 --- a/man/animation.Rd +++ b/man/animation.Rd @@ -1,8 +1,8 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/animate.R -\name{animation_opts} -\alias{animation_opts} +\name{animation} \alias{animation} +\alias{animation_opts} \alias{animation_slider} \alias{animation_button} \title{Animation configuration options} diff --git a/man/api.Rd b/man/api.Rd index 6cd01dfb4a..f01e7e21b5 100644 --- a/man/api.Rd +++ b/man/api.Rd @@ -1,13 +1,13 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/api_exports.R -\name{api_create} +\name{api} +\alias{api} \alias{api_create} \alias{api_create.plotly} \alias{api_create.ggplot} \alias{api_create.data.frame} \alias{api_download_plot} \alias{api_download_grid} -\alias{api} \title{Tools for working with plotly's REST API (v2)} \usage{ api_create( diff --git a/tests/testthat/test-ggplot-point.R b/tests/testthat/test-ggplot-point.R index ad50cf10fd..d9a92f9739 100644 --- a/tests/testthat/test-ggplot-point.R +++ b/tests/testthat/test-ggplot-point.R @@ -70,7 +70,7 @@ test_that("can plot on sub-second time scale", { test_that("can flip axes", { - # https://github.com/ropensci/plotly/issues/1074 + # https://github.com/plotly/plotly.R/issues/1074 p <- ggplot(diamonds[sample(nrow(diamonds), 1000),]) + geom_point(aes(carat, price)) + expand_limits(y = 0) + diff --git a/tests/testthat/test-ggplot-sf.R b/tests/testthat/test-ggplot-sf.R index 6450c23689..edd1751e2e 100644 --- a/tests/testthat/test-ggplot-sf.R +++ b/tests/testthat/test-ggplot-sf.R @@ -40,7 +40,10 @@ test_that("geom_sf() polygons with fill/text.", { skip_if_not_installed("s2") nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE) - p <- ggplot(nc) + geom_sf(aes(fill = AREA, text = NAME)) + expect_warning( + p <- ggplot(nc) + geom_sf(aes(fill = AREA, text = NAME)), + "Ignoring unknown" + ) l <- expect_doppelganger_built(p, "sf-fill-text") # one trace for every fillcolor, one for graticule, one for colorbar diff --git a/tests/testthat/test-ggplot-ticks.R b/tests/testthat/test-ggplot-ticks.R index 2038aaeb9a..fdf8fcc50e 100644 --- a/tests/testthat/test-ggplot-ticks.R +++ b/tests/testthat/test-ggplot-ticks.R @@ -191,7 +191,7 @@ test_that("R line breaks are translated to HTML line breaks", { }) test_that("Missing axis ticks are treated correctly", { - # https://github.com/ropensci/plotly/issues/1721 + # https://github.com/plotly/plotly.R/issues/1721 p <- ggplot(data = mtcars, aes(x = qsec, y = disp)) + geom_point() + scale_x_continuous( diff --git a/tests/testthat/test-mean-error-bars.R b/tests/testthat/test-mean-error-bars.R index 466b4e13ef..7378146490 100644 --- a/tests/testthat/test-mean-error-bars.R +++ b/tests/testthat/test-mean-error-bars.R @@ -36,7 +36,7 @@ test_that("different colors for error bars, points, and lines", { L <- expect_doppelganger_built(one.line.gg, "error-simple-line-point-crazy") }) -# example from https://github.com/ropensci/plotly/issues/513 +# example from https://github.com/plotly/plotly.R/issues/513 d <- data.frame( x = 1:5, diff --git a/tests/testthat/test-plotly-colorbar.R b/tests/testthat/test-plotly-colorbar.R index bdca9037b4..956e036737 100644 --- a/tests/testthat/test-plotly-colorbar.R +++ b/tests/testthat/test-plotly-colorbar.R @@ -59,7 +59,7 @@ test_that("Can restrict z limits", { test_that("colorbar does not affect mode of other traces", { - # https://github.com/ropensci/plotly/issues/1196 + # https://github.com/plotly/plotly.R/issues/1196 p <- plot_ly() %>% add_markers(data = mtcars, x= ~ hp, y= ~mpg, color = ~wt) %>% add_lines(x = seq(100, 300, length.out = 20), y = seq(10, 30, length.out = 20), @@ -140,7 +140,7 @@ test_that("positioning with multiple colorbars and legends", { test_that("Colorbar limits controls marker.color and line.color", { - # https://github.com/ropensci/plotly/issues/1236 + # https://github.com/plotly/plotly.R/issues/1236 p <- plot_ly( mtcars, x = ~hp, y = ~cyl, z = ~mpg, color = ~mpg, type = "scatter3d", mode = "lines+markers" diff --git a/tests/testthat/test-plotly-group.R b/tests/testthat/test-plotly-group.R index 6ffe097705..3790e760a4 100644 --- a/tests/testthat/test-plotly-group.R +++ b/tests/testthat/test-plotly-group.R @@ -69,7 +69,7 @@ test_that("Groups are ignored if grouping is irrelevant for the geom", { test_that("Ordering of marker.color should not change in a simple scatterplot", { - # https://github.com/ropensci/plotly/issues/1351 + # https://github.com/plotly/plotly.R/issues/1351 l <- mtcars %>% mutate(id = seq_len(nrow(.))) %>% group_by(cyl) %>% diff --git a/tests/testthat/test-plotly-name.R b/tests/testthat/test-plotly-name.R index 0a2b4b3bcb..a3fb304112 100644 --- a/tests/testthat/test-plotly-name.R +++ b/tests/testthat/test-plotly-name.R @@ -81,7 +81,7 @@ test_that("adding trace name with frame does not throw frameOrder warning", { test_that("adding trace name does not throw error", { - #From ropensci/plotly/issues/1618 + #From plotly/plotly.R/issues/1618 df <- data.frame(category=c('a', 'b', 'c', 'd', 'a', 'b', 'c', 'd'), year=c(2000, 2000, 2000, 2000, 2001, 2001, 2001, 2001), val_a=c(1,2,2,1,2,5,6,8), @@ -106,7 +106,7 @@ test_that("adding trace name does not throw error", { expect_equal(l$x$data[[2]]$name, "Val_B") - #From ropensci/plotly/issues/1903 + #From plotly/plotly.R/issues/1903 df1 <- data.frame(frame = 1:10, x = 1:10, y = 0) df2 <- data.frame(frame = rep(1:10, 1:10), x = unlist(lapply(1:10, function(x) 1:x)), diff --git a/tests/testthat/test-plotly-sf.R b/tests/testthat/test-plotly-sf.R index 8819432eee..b0c271640f 100644 --- a/tests/testthat/test-plotly-sf.R +++ b/tests/testthat/test-plotly-sf.R @@ -96,7 +96,7 @@ test_that("Can plot sfc with a missing crs", { test_that("plot_ly() defaults to blank axes", { skip_if_not_installed("sf") - + skip_if_not_installed("maps") m <- sf::st_as_sf(maps::map("world", plot = FALSE, fill = TRUE)) p <- plot_ly() %>% diff --git a/tests/testthat/test-plotly-size.R b/tests/testthat/test-plotly-size.R index f3b61344a6..8de135e63d 100644 --- a/tests/testthat/test-plotly-size.R +++ b/tests/testthat/test-plotly-size.R @@ -1,7 +1,7 @@ test_that("sizemode is always respected", { - # https://github.com/ropensci/plotly/issues/1133 + # https://github.com/plotly/plotly.R/issues/1133 p <- plot_ly(mtcars, x = ~wt, y = ~wt, size = ~wt, color = ~as.factor(carb)) d <- expect_doppelganger_built(p, "sizemode")$data expect_length(d, length(unique(mtcars$carb))) diff --git a/tests/testthat/test-plotly-subplot.R b/tests/testthat/test-plotly-subplot.R index 34bb6f0856..71b1365fe6 100644 --- a/tests/testthat/test-plotly-subplot.R +++ b/tests/testthat/test-plotly-subplot.R @@ -70,7 +70,7 @@ test_that("share both axes", { expect_true(sum(grepl("^xaxis", names(l$layout))) == 2) }) -# https://github.com/ropensci/plotly/issues/376 +# https://github.com/plotly/plotly.R/issues/376 d <- data.frame( x = rnorm(100), y = rnorm(100) @@ -355,7 +355,7 @@ test_that("annotation xref/yref bumping", { expect_equal(yref2, rep(c("y", "y"), each = 32)) # now, with more traces than annotations - # https://github.com/ropensci/plotly/issues/1444 + # https://github.com/plotly/plotly.R/issues/1444 p1 <- plot_ly() %>% add_markers(x = 1, y = 1) %>% add_markers(x = 2, y = 2) %>% @@ -506,7 +506,7 @@ test_that("geo+cartesian behaves", { test_that("May specify legendgroup with through a vector of values", { - # example adapted from https://github.com/ropensci/plotly/issues/817 + # example adapted from https://github.com/plotly/plotly.R/issues/817 df <- dplyr::bind_rows( data.frame(x = rnorm(100,2), Name = "x1"), data.frame(x = rnorm(100,6), Name = "x2"), diff --git a/tests/testthat/test-plotly.R b/tests/testthat/test-plotly.R index 7b10220293..a38e8965b3 100644 --- a/tests/testthat/test-plotly.R +++ b/tests/testthat/test-plotly.R @@ -219,7 +219,7 @@ test_that("span/size controls errorbar thickness/width", { test_that("Vector of redundant text is reduced to string when hoveron=fills", { - # see https://github.com/ropensci/plotly/issues/1233 + # see https://github.com/plotly/plotly.R/issues/1233 d <- data.frame( AA = c(2,3,3,2, NA, 6,7,7,6, NA), BB = c(2,2,3,2, NA, 6,6,7,6, NA),