Skip to content

Commit c64ab3c

Browse files
authored
Merge pull request #141 from rwoldford/master
Updating to 1.3.4
2 parents 9116e0d + 0551ddb commit c64ab3c

File tree

344 files changed

+6642
-5235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

344 files changed

+6642
-5235
lines changed

.travis.yml

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ addons:
1212

1313
sudo: false
1414

15+
os:
16+
- linux
17+
1518
apt_packages:
1619
- r-cran-rjava
1720

R/DESCRIPTION

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: loon
22
Type: Package
33
Title: Interactive Statistical Data Visualization
4-
Version: 1.3.3
5-
Date: 2021-02-24
4+
Version: 1.3.4
5+
Date: 2021-03-15
66
Authors@R: c(person(given = "Adrian", family = "Waddell",
77
email = "adrian@waddell.ch",
88
role = c("aut")),

R/NEWS.md

+49
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,52 @@
1+
# loon 1.3.4
2+
3+
* A new vignette
4+
5+
- "Logical queries in interactive graphics"
6+
7+
Explains how to use loon's interactive plots and inspector to construct logical
8+
queries on the displayed data.
9+
10+
An *enriched* version of `mtcars` is used for illustration.
11+
12+
How a plot's `linkingKey` (from Loon's linking model) can be used to access the correct
13+
elements of any logical operation is also described.
14+
15+
* minor bug fixes and improvements
16+
17+
- Three minor bug fixes on **facets**
18+
19+
- If the `by` is a formula with `loon` n-dimensional states, no need to provide additional data,
20+
the formula should be able to be converted to a data frame given by the states info.
21+
22+
- When `by` has missing values, it is treated as other n-dimensional states:
23+
24+
drop NAs, leave warnings (which one are removed)
25+
26+
- Removed unnecessary warnings.
27+
28+
- `l_pairs()` has a progress bar for constructing, linking, and connecting the scales of the plots.
29+
30+
there is now a new argument `showProgressBar` that allows this to be suppressed (e.g. in RMarkdown files)
31+
32+
- for histograms of factors and character vectors: default setting of arg `showFactors`
33+
34+
- previously: `TRUE` whenever number of factor levels (or equivalent unique strings) < 10
35+
- now: `TRUE` whenever < 25 to accomodate common factors like `month` or the 24 hours in a day.
36+
37+
- updated documentation on `l_layer()`
38+
39+
40+
* testing
41+
42+
- As all examples are wrapped in `if(interactive)`, check all interactive examples to ensure they work well
43+
44+
- 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.
45+
46+
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.
47+
48+
- for iris dataset in tests, we drop an observation so that for each species, the number of observations are different.
49+
150
# loon 1.3.3
251

352
* an extremely minor update

R/R/datasets.R

-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
#' Research and Data Analysis (Martens, H., Russwurm, H., eds.), p. 189,
6565
#' Applied Science Publ., Barking.
6666
#'
67-
#' Wikipedia \url{https://en.wikipedia.org/}
6867
#'
6968
#'
7069
"olive"

R/R/graphutils.R

+2-7
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,8 @@ as.graph <- function(loongraph) {
178178
#' @export
179179
#'
180180
#' @examples
181-
#' if (requireNamespace("Rgraphviz", quietly = TRUE)) {
182181
#' g <- loongraph(letters[1:4], letters[1:3], letters[2:4], FALSE)
183-
#' plot(g)
184-
#' }
182+
#'
185183
plot.loongraph <- function(x, ...) {
186184

187185
requireNamespace("Rgraphviz", quietly = TRUE) || stop("Rgraphviz library required")
@@ -443,11 +441,8 @@ graphproduct <- function(U,V, type=c("product", "tensor", "strong"), separator='
443441
#'
444442
#' LLG <- linegraph(LG)
445443
#'
446-
#' graphreduce(LLG)
444+
#' R_LLG <- graphreduce(LLG)
447445
#'
448-
#' if (requireNamespace("Rgraphviz", quietly = TRUE)) {
449-
#' plot(graphreduce(LLG))
450-
#' }
451446
#'
452447
graphreduce <- function(graph, separator) {
453448

R/R/l_layer.R

+2-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ l_layer <- function(widget, x, ...) {
143143
#' @seealso \code{\link[stats]{density}}
144144
#' @export
145145
#' @export l_layer.density
146-
#' @examples {
146+
#' @examples
147+
#' if(interactive()){
147148
#' d <- density(faithful$eruptions, bw = "sj")
148149
#' h <- l_hist(x = faithful$eruptions, yshows="density")
149150
#' l <- l_layer.density(h, d, color="steelblue", linewidth=3)

R/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11

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

4-
[![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)
4+
[![Build Status](https://travis-ci.org/great-northern-diver/loon.svg?branch=master)](https://travis-ci.org/great-northern-diver/loon)
5+
[![Total downloads](https://cranlogs.r-pkg.org/badges/grand-total/loon?color=blue)](https://cran.r-project.org/package=loon)
6+
[![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/loon)](https://cran.r-project.org/package=loon)
57

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

R/_pkgdown.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ navbar:
1313
menu:
1414
- text: Introduction
1515
href: articles/introduction.html
16+
- text: Saving loon plots
17+
href: articles/savingLoonPlots.html
18+
- text: Logical queries in interactive graphics
19+
href: articles/logicalQueries.html
1620
- text: Analysis example
1721
href: articles/minorities.html
1822
- text: Teaching example
1923
href: articles/teaching-example-smoothing.html
20-
- text: Saving loon plots
21-
href: articles/savingLoonPlots.html
2224
- text: Videos
2325
menu:
2426
- text: the (not so) humble (interactive) histogram

R/cran-comments.md

+63-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,72 @@
11
## Test evironments
22

3-
* local OS X, R 3.5.1
4-
* local Ubuntu 18.04 R 3.5.1 and R-devel (2018-09-29 r75381)
5-
* local Windows 10 R 3.5.1
6-
* Ubuntu 14.04.5 (on travis-ci) R 3.5.1 and R-devel (2018-09-29 r75381)
3+
* local OSX, Big Sur 11.2.1, R 4.0.2
4+
* Ubuntu Xenial 16.04 (on travis-ci)
5+
* check_win_devel
6+
- using R Under development (unstable) (2021-03-14 r80087)
7+
- using platform: x86_64-w64-mingw32 (64-bit)
8+
- using session charset: ISO8859-1
9+
10+
* Windows Server 2008 R2 SP1, R-devel, 32/64 bit
11+
* Ubuntu Linux 20.04.1 LTS, R-release, GCC
12+
* Fedora Linux, R-devel, clang, gfortran
713

814
## R CMD check results
915

10-
There were no ERRORs or WARNINGs.
16+
0 errors
17+
0 warnings
18+
1 NOTE about maintainer
1119

12-
## Downstream dependencies
20+
... NOTE
21+
Maintainer: 'R. Wayne Oldford <rwoldford@uwaterloo.ca>'
22+
23+
### Solaris and bioconductor package RgraphViz
24+
25+
**rhub::check_on_solaris()**:
26+
27+
1 Error (cannot find/install suggested package `Rgraphviz)`
28+
29+
- Unable to determine a solution. (have tried adding BiocViews: to DESCRIPTION with no luck)
30+
31+
- Preparing build, see status at
1332

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

16-
Error in MASS::isoMDS(d = D, k = 5) : object 'VR_mds_init_data' not found
35+
...
1736

18-
This error seems to disappear when I re-install MASS with `install.packages('MASS')`.
37+
E checking package dependencies (3.5s)
38+
Package suggested but not available: ‘Rgraphviz’
39+
40+
The suggested packages are required for a complete check.
41+
Checking can be attempted without them by setting the environment
42+
variable _R_CHECK_FORCE_SUGGESTS_ to a false value.
43+
44+
See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
45+
manual.
46+
47+
48+
**Relevant Snippet from Rhub**:
49+
50+
- Installing package dependencies\
51+
52+
- Running R CMD check
53+
54+
setting _R_CHECK_FORCE_SUGGESTS_ to false
55+
56+
setting R_COMPILE_AND_INSTALL_PACKAGES to never
57+
58+
setting _R_CHECK_THINGS_IN_CHECK_DIR_ to false
59+
60+
setting R_REMOTES_STANDALONE to true
61+
62+
setting R_REMOTES_NO_ERRORS_FROM_WARNINGS to true
63+
64+
setting _R_CHECK_FORCE_SUGGESTS_ to true
65+
66+
setting _R_CHECK_CRAN_INCOMING_USE_ASPELL_ to true
67+
68+
- using log directory 'C:/Users/USERzVBgqDuhyS/loon.Rcheck'
69+
- using R Under development (unstable) (2021-02-15 r80013)
70+
- using platform: x86_64-w64-mingw32 (64-bit)
71+
72+
## Downstream dependencies

R/inst/images/Apulia.png

-6.7 KB
Binary file not shown.

R/inst/images/Calabria.png

-8.28 KB
Binary file not shown.

R/inst/images/Liguria.png

-7.98 KB
Binary file not shown.

R/inst/images/Sardinia.png

-17.4 KB
Binary file not shown.

R/inst/images/Sicily.png

-10.7 KB
Binary file not shown.

R/inst/images/Umbria.png

-3.67 KB
Binary file not shown.

R/man/figures/gestures_move.png

100755100644
24.7 KB
Loading

R/man/figures/gestures_rotate.png

100755100644
21 KB
Loading

R/man/figures/gestures_select.png

100755100644
42.8 KB
Loading

R/man/figures/gestures_zoom_pan.png

100755100644
43.6 KB
Loading

R/man/graphreduce.Rd

+1-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

R/man/l_layer.density.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

R/man/l_plot.Rd

100755100644
File mode changed.

R/man/l_plot3D.Rd

100755100644
File mode changed.

R/man/l_plot_ts.Rd

100755100644
File mode changed.

R/man/olive.Rd

-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

R/man/plot.loongraph.Rd

+1-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

R/vignettes/SavingLoonPlots.Rmd

+7-14
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,8 @@ library(loon.data)
2929
library(loon)
3030
library(gridExtra)
3131
32-
imageDirectory <- "./images/savingLoonPlots"
33-
dataDirectory <- "./data/savingLoonPlots"
34-
path_concat <- function(path1, ..., sep="/") {
35-
# The "/" is standard unix directory separator and so will
36-
# work on Macs and Linux.
37-
# In windows the separator might have to be sep = "\" or
38-
# even sep = "\\" or possibly something else.
39-
paste(path1, ..., sep = sep)
40-
}
32+
imageDirectory <- file.path(".", "images", "savingLoonPlots")
33+
dataDirectory <- file.path(".", "data", "savingLoonPlots")
4134
```
4235

4336
---
@@ -201,12 +194,12 @@ knitr::include_graphics("myplot_via_R.png")
201194

202195
```{r load the saved plots, echo = FALSE, eval=FALSE}
203196
# The one exported from RStudio
204-
knitr::include_graphics(path_concat(imageDirectory, "myplot_via_RStudio.png"))
197+
knitr::include_graphics(file.path(imageDirectory, "myplot_via_RStudio.png"))
205198
# Followed by the one saved using l_export
206199
# (note that background grid is missing)
207-
knitr::include_graphics(path_concat(imageDirectory, "myplot_via_l_export.pdf"))
200+
knitr::include_graphics(file.path(imageDirectory, "myplot_via_l_export.pdf"))
208201
# And finally, the one saved using R's png device
209-
knitr::include_graphics(path_concat(imageDirectory, "myplot_via_R.png"))
202+
knitr::include_graphics(file.path(imageDirectory, "myplot_via_R.png"))
210203
```
211204

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

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

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

336329
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`:

R/vignettes/images/intro/panning.png

100755100644
2.69 KB
Loading

R/vignettes/images/intro/selecting.png

100755100644
-48.5 KB
Loading

R/vignettes/images/intro/zooming.png

100755100644
3.16 KB
Loading

0 commit comments

Comments
 (0)