Skip to content

Commit

Permalink
Merge pull request #141 from rwoldford/master
Browse files Browse the repository at this point in the history
Updating to 1.3.4
  • Loading branch information
rwoldford authored Mar 16, 2021
2 parents 9116e0d + 0551ddb commit c64ab3c
Show file tree
Hide file tree
Showing 344 changed files with 6,642 additions and 5,235 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ addons:

sudo: false

os:
- linux

apt_packages:
- r-cran-rjava

Expand Down
4 changes: 2 additions & 2 deletions R/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: loon
Type: Package
Title: Interactive Statistical Data Visualization
Version: 1.3.3
Date: 2021-02-24
Version: 1.3.4
Date: 2021-03-15
Authors@R: c(person(given = "Adrian", family = "Waddell",
email = "[email protected]",
role = c("aut")),
Expand Down
49 changes: 49 additions & 0 deletions R/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
# loon 1.3.4

* A new vignette

- "Logical queries in interactive graphics"

Explains how to use loon's interactive plots and inspector to construct logical
queries on the displayed data.

An *enriched* version of `mtcars` is used for illustration.

How a plot's `linkingKey` (from Loon's linking model) can be used to access the correct
elements of any logical operation is also described.

* minor bug fixes and improvements

- Three minor bug fixes on **facets**

- If the `by` is a formula with `loon` n-dimensional states, no need to provide additional data,
the formula should be able to be converted to a data frame given by the states info.

- When `by` has missing values, it is treated as other n-dimensional states:

drop NAs, leave warnings (which one are removed)

- Removed unnecessary warnings.

- `l_pairs()` has a progress bar for constructing, linking, and connecting the scales of the plots.

there is now a new argument `showProgressBar` that allows this to be suppressed (e.g. in RMarkdown files)

- for histograms of factors and character vectors: default setting of arg `showFactors`

- previously: `TRUE` whenever number of factor levels (or equivalent unique strings) < 10
- now: `TRUE` whenever < 25 to accomodate common factors like `month` or the 24 hours in a day.

- updated documentation on `l_layer()`


* testing

- As all examples are wrapped in `if(interactive)`, check all interactive examples to ensure they work well

- hexadecimal colours seem to get slightly (generally ignorable) different hexadecimal values for colours in `tcltk` on Solaris (see 1.3.3 comments). this caused problems in testing for exact colours on Solaris.

Until this is sorted out, the testing for colour hex values in the test suite were commented out to prevent loon from being unnecessarily archived on CRAN. (The colours are correct, but our previous solution generated warnings, which may cause problems for CRAN acceptance.) Likely, in the future, we suppress the warning from `l_hexcolor()` when testing.

- for iris dataset in tests, we drop an observation so that for each species, the number of observations are different.

# loon 1.3.3

* an extremely minor update
Expand Down
1 change: 0 additions & 1 deletion R/R/datasets.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
#' Research and Data Analysis (Martens, H., Russwurm, H., eds.), p. 189,
#' Applied Science Publ., Barking.
#'
#' Wikipedia \url{https://en.wikipedia.org/}
#'
#'
"olive"
Expand Down
9 changes: 2 additions & 7 deletions R/R/graphutils.R
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,8 @@ as.graph <- function(loongraph) {
#' @export
#'
#' @examples
#' if (requireNamespace("Rgraphviz", quietly = TRUE)) {
#' g <- loongraph(letters[1:4], letters[1:3], letters[2:4], FALSE)
#' plot(g)
#' }
#'
plot.loongraph <- function(x, ...) {

requireNamespace("Rgraphviz", quietly = TRUE) || stop("Rgraphviz library required")
Expand Down Expand Up @@ -443,11 +441,8 @@ graphproduct <- function(U,V, type=c("product", "tensor", "strong"), separator='
#'
#' LLG <- linegraph(LG)
#'
#' graphreduce(LLG)
#' R_LLG <- graphreduce(LLG)
#'
#' if (requireNamespace("Rgraphviz", quietly = TRUE)) {
#' plot(graphreduce(LLG))
#' }
#'
graphreduce <- function(graph, separator) {

Expand Down
3 changes: 2 additions & 1 deletion R/R/l_layer.R
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ l_layer <- function(widget, x, ...) {
#' @seealso \code{\link[stats]{density}}
#' @export
#' @export l_layer.density
#' @examples {
#' @examples
#' if(interactive()){
#' d <- density(faithful$eruptions, bw = "sj")
#' h <- l_hist(x = faithful$eruptions, yshows="density")
#' l <- l_layer.density(h, d, color="steelblue", linewidth=3)
Expand Down
4 changes: 3 additions & 1 deletion R/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

## loon <img src="man/figures/logo.png" align="right" width="120" />

[![Build Status](https://travis-ci.org/great-northern-diver/loon.svg?branch=master)](https://travis-ci.org/great-northern-diver/loon) [![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/loon)](https://cran.r-project.org/package=loon)
[![Build Status](https://travis-ci.org/great-northern-diver/loon.svg?branch=master)](https://travis-ci.org/great-northern-diver/loon)
[![Total downloads](https://cranlogs.r-pkg.org/badges/grand-total/loon?color=blue)](https://cran.r-project.org/package=loon)
[![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/loon)](https://cran.r-project.org/package=loon)

loon is an extendible interactive data visualization system designed for exploratory visualization.

Expand Down
6 changes: 4 additions & 2 deletions R/_pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ navbar:
menu:
- text: Introduction
href: articles/introduction.html
- text: Saving loon plots
href: articles/savingLoonPlots.html
- text: Logical queries in interactive graphics
href: articles/logicalQueries.html
- text: Analysis example
href: articles/minorities.html
- text: Teaching example
href: articles/teaching-example-smoothing.html
- text: Saving loon plots
href: articles/savingLoonPlots.html
- text: Videos
menu:
- text: the (not so) humble (interactive) histogram
Expand Down
72 changes: 63 additions & 9 deletions R/cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,72 @@
## Test evironments

* local OS X, R 3.5.1
* local Ubuntu 18.04 R 3.5.1 and R-devel (2018-09-29 r75381)
* local Windows 10 R 3.5.1
* Ubuntu 14.04.5 (on travis-ci) R 3.5.1 and R-devel (2018-09-29 r75381)
* local OSX, Big Sur 11.2.1, R 4.0.2
* Ubuntu Xenial 16.04 (on travis-ci)
* check_win_devel
- using R Under development (unstable) (2021-03-14 r80087)
- using platform: x86_64-w64-mingw32 (64-bit)
- using session charset: ISO8859-1

* Windows Server 2008 R2 SP1, R-devel, 32/64 bit
* Ubuntu Linux 20.04.1 LTS, R-release, GCC
* Fedora Linux, R-devel, clang, gfortran

## R CMD check results

There were no ERRORs or WARNINGs.
0 errors
0 warnings
1 NOTE about maintainer

## Downstream dependencies
... NOTE
Maintainer: 'R. Wayne Oldford <[email protected]>'

### Solaris and bioconductor package RgraphViz

**rhub::check_on_solaris()**:

1 Error (cannot find/install suggested package `Rgraphviz)`

- Unable to determine a solution. (have tried adding BiocViews: to DESCRIPTION with no luck)

- Preparing build, see status at

Sometimes R CMD check fails with the ERROR:
https://builder.r-hub.io/status/loon_1.3.4.tar.gz-a8636ac65fcf46899d204dc1c39bafce

Error in MASS::isoMDS(d = D, k = 5) : object 'VR_mds_init_data' not found
...

This error seems to disappear when I re-install MASS with `install.packages('MASS')`.
E checking package dependencies (3.5s)
Package suggested but not available: ‘Rgraphviz’

The suggested packages are required for a complete check.
Checking can be attempted without them by setting the environment
variable _R_CHECK_FORCE_SUGGESTS_ to a false value.

See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
manual.


**Relevant Snippet from Rhub**:

- Installing package dependencies\

- Running R CMD check

setting _R_CHECK_FORCE_SUGGESTS_ to false

setting R_COMPILE_AND_INSTALL_PACKAGES to never

setting _R_CHECK_THINGS_IN_CHECK_DIR_ to false

setting R_REMOTES_STANDALONE to true

setting R_REMOTES_NO_ERRORS_FROM_WARNINGS to true

setting _R_CHECK_FORCE_SUGGESTS_ to true

setting _R_CHECK_CRAN_INCOMING_USE_ASPELL_ to true

- using log directory 'C:/Users/USERzVBgqDuhyS/loon.Rcheck'
- using R Under development (unstable) (2021-02-15 r80013)
- using platform: x86_64-w64-mingw32 (64-bit)

## Downstream dependencies
Binary file removed R/inst/images/Apulia.png
Binary file not shown.
Binary file removed R/inst/images/Calabria.png
Binary file not shown.
Binary file removed R/inst/images/Liguria.png
Binary file not shown.
Binary file removed R/inst/images/Sardinia.png
Binary file not shown.
Binary file removed R/inst/images/Sicily.png
Binary file not shown.
Binary file removed R/inst/images/Umbria.png
Binary file not shown.
Binary file modified R/man/figures/gestures_move.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified R/man/figures/gestures_rotate.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified R/man/figures/gestures_select.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified R/man/figures/gestures_zoom_pan.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 1 addition & 4 deletions R/man/graphreduce.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion R/man/l_layer.density.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified R/man/l_plot.Rd
100755 → 100644
Empty file.
Empty file modified R/man/l_plot3D.Rd
100755 → 100644
Empty file.
Empty file modified R/man/l_plot_ts.Rd
100755 → 100644
Empty file.
2 changes: 0 additions & 2 deletions R/man/olive.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions R/man/plot.loongraph.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 7 additions & 14 deletions R/vignettes/SavingLoonPlots.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,8 @@ library(loon.data)
library(loon)
library(gridExtra)
imageDirectory <- "./images/savingLoonPlots"
dataDirectory <- "./data/savingLoonPlots"
path_concat <- function(path1, ..., sep="/") {
# The "/" is standard unix directory separator and so will
# work on Macs and Linux.
# In windows the separator might have to be sep = "\" or
# even sep = "\\" or possibly something else.
paste(path1, ..., sep = sep)
}
imageDirectory <- file.path(".", "images", "savingLoonPlots")
dataDirectory <- file.path(".", "data", "savingLoonPlots")
```

---
Expand Down Expand Up @@ -201,12 +194,12 @@ knitr::include_graphics("myplot_via_R.png")

```{r load the saved plots, echo = FALSE, eval=FALSE}
# The one exported from RStudio
knitr::include_graphics(path_concat(imageDirectory, "myplot_via_RStudio.png"))
knitr::include_graphics(file.path(imageDirectory, "myplot_via_RStudio.png"))
# Followed by the one saved using l_export
# (note that background grid is missing)
knitr::include_graphics(path_concat(imageDirectory, "myplot_via_l_export.pdf"))
knitr::include_graphics(file.path(imageDirectory, "myplot_via_l_export.pdf"))
# And finally, the one saved using R's png device
knitr::include_graphics(path_concat(imageDirectory, "myplot_via_R.png"))
knitr::include_graphics(file.path(imageDirectory, "myplot_via_R.png"))
```

Alternatively, you could use **LaTeX** if you want more control. For example, the following
Expand Down Expand Up @@ -274,7 +267,7 @@ p_savedStates <- l_getSavedStates(file = "p_savedStates")
```

```{r get p states back, echo = FALSE}
p_savedStates <- l_getSavedStates(file = path_concat(dataDirectory, "p_savedStates"))
p_savedStates <- l_getSavedStates(file = file.path(dataDirectory, "p_savedStates"))
```

A new plot is constructed and the saved states transferred to it.
Expand Down Expand Up @@ -330,7 +323,7 @@ Now all of the states are available when this file is read back in.
p_focusOnVersicolor <- l_getSavedStates(file = "p_focusOnVersicolor")
```
```{r, echo = FALSE}
p_focusOnVersicolor <- l_getSavedStates(file = path_concat(dataDirectory, "p_focusOnVersicolor"))
p_focusOnVersicolor <- l_getSavedStates(file = file.path(dataDirectory, "p_focusOnVersicolor"))
```

When it comes to transferring the states to a new plot there are many choices. We could go with a large collection of display states (more than the default states but still excluding more "basic" states about panning and zooming for example). To see which states, we add the argument `returnNames = TRUE`:
Expand Down
Binary file modified R/vignettes/images/intro/panning.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified R/vignettes/images/intro/selecting.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified R/vignettes/images/intro/zooming.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c64ab3c

Please sign in to comment.