Skip to content

Commit 3dd2f86

Browse files
committed
Adapted for changes in svMisc, svBase and data.io
1 parent e03f692 commit 3dd2f86

10 files changed

Lines changed: 24 additions & 19 deletions

File tree

DESCRIPTION

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: chart
22
Type: Package
3-
Version: 1.5.3
3+
Version: 1.5.4
44
Title: 'SciViews::R' - Unified Interface (with Formula) for R Plots
55
Description: Chart generalizes plot generation in R, being with base R plot
66
function, lattice or ggplot2. A formula interface is available for both
@@ -17,7 +17,6 @@ Depends:
1717
lattice (>= 0.21.0)
1818
Imports:
1919
cowplot (>= 1.1.1),
20-
data.io (>= 1.5.0),
2120
ggplotify (>= 0.1.0),
2221
ggpubr (>= 0.6.0),
2322
graphics (>= 4.2.0),
@@ -27,10 +26,11 @@ Imports:
2726
rlang (>= 1.1.1),
2827
scales (>= 1.2.1),
2928
stats (>= 4.2.0),
30-
svMisc (>= 1.4.0),
29+
svBase (>= 1.7.0),
3130
utils (>= 4.2.0),
3231
viridis (>= 0.6.2)
3332
Suggests:
33+
data.io (>= 1.7.0),
3434
MASS (>= 7.3.58.3),
3535
covr (>= 3.5.0),
3636
knitr (>= 1.42),
@@ -39,7 +39,7 @@ Suggests:
3939
testthat (>= 3.0.0)
4040
Remotes:
4141
SciViews/data.io,
42-
SciViews/svMisc
42+
SciViews/svBase
4343
License: MIT + file LICENSE
4444
URL: https://github.com/SciViews/chart, https://www.sciviews.org/chart/, https://sciviews.r-universe.dev/chart
4545
BugReports: https://github.com/SciViews/chart/issues

NAMESPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import(grDevices)
2424
import(graphics)
2525
import(lattice)
2626
importFrom(cowplot,theme_cowplot)
27-
importFrom(data.io,label)
2827
importFrom(ggplotify,as.ggplot)
2928
importFrom(ggpubr,ggarrange)
3029
importFrom(latticeExtra,custom.theme)
@@ -43,8 +42,9 @@ importFrom(scales,gradient_n_pal)
4342
importFrom(scales,hue_pal)
4443
importFrom(stats,as.formula)
4544
importFrom(stats,asOneSidedFormula)
46-
importFrom(svMisc,aka)
47-
importFrom(svMisc,section)
45+
importFrom(svBase,aka)
46+
importFrom(svBase,label)
47+
importFrom(svBase,section)
4848
importFrom(utils,.DollarNames)
4949
importFrom(utils,apropos)
5050
importFrom(utils,modifyList)

NEWS.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
# chart 1.5.4
2+
3+
- Uses `aka()`, `section()` and `label()` from {svBase} (>= 1.7.0). No more dependencies to {data.io} and {svMisc}.
4+
15
# chart 1.5.3
26

3-
- Now using `$.subsettable_type()` method from {svMisc}.
7+
- Now using `$.subsettable_type()` method from {svBase}.
48

59
# chart 1.5.2
610

R/chart-package.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,9 @@
2828
#' @importFrom stats as.formula asOneSidedFormula
2929
#' @importFrom utils .DollarNames apropos modifyList
3030
#' @importFrom pryr modify_lang
31-
#' @importFrom data.io label
3231
#' @importFrom ggplotify as.ggplot
3332
#' @importFrom ggpubr ggarrange
34-
#' @importFrom svMisc aka section
33+
#' @importFrom svBase aka section label
3534
## usethis namespace: end
3635
"_PACKAGE"
3736

R/chart.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ chart.default <- function(data, specif = NULL, formula = NULL, mapping = NULL,
209209
names(labels) <- dnames
210210
if (!is.null(dnames)) {
211211
for (dname in dnames)
212-
labels[[dname]] <- data.io::label(data[[dname]], units = TRUE)
212+
labels[[dname]] <- svBase::label(data[[dname]], units = TRUE)
213213
labels <- labels[labels != ""]
214214
if (length(labels)) {
215215
dnames <- names(labels)

README.Rmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ The {chart} package provides an alternate formula interface to {ggplot2}, and i
3131

3232
## Installation
3333

34-
{chart} is not available from CRAN yet. You should install it from the [SciViews R-Universe](https://sciviews.r-universe.dev). The {data.io} package is useful too because it manages labels and units that {chart} uses. To install those two packages and their dependencies, run the following command in R:
34+
{chart} is not available from CRAN yet. You should install it from the [SciViews R-Universe](https://sciviews.r-universe.dev). The {svBase} package is useful too because it manages labels and units that {chart} uses. To install those two packages and their dependencies, run the following command in R:
3535

3636
```{r, eval=FALSE}
37-
install.packages(c('chart', 'data.io'),
37+
install.packages(c('chart', 'svBase'),
3838
repos = c('https://sciviews.r-universe.dev', 'https://cloud.r-project.org'))
3939
```
4040

@@ -58,7 +58,7 @@ Starting from the `airquality` from {datasets}, we can annotate our dataset with
5858

5959
```{r}
6060
data(airquality, package = "datasets")
61-
airquality <- data.io::labelise(airquality, label = list(
61+
airquality <- svBase::labelise(airquality, label = list(
6262
Ozone = "Ozone", Temp = "Temperature", Solar.R = "Solar radiation",
6363
Wind = "Wind speed"
6464
), units = list(

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ for more details.
2727
## Installation
2828

2929
{chart} is not available from CRAN yet. You should install it from the
30-
[SciViews R-Universe](https://sciviews.r-universe.dev). The {data.io}
30+
[SciViews R-Universe](https://sciviews.r-universe.dev). The {svBase}
3131
package is useful too because it manages labels and units that {chart}
3232
uses. To install those two packages and their dependencies, run the
3333
following command in R:
3434

3535
``` r
36-
install.packages(c('chart', 'data.io'),
36+
install.packages(c('chart', 'svBase'),
3737
repos = c('https://sciviews.r-universe.dev', 'https://cloud.r-project.org'))
3838
```
3939

@@ -61,7 +61,7 @@ dataset with labels and units for its variable like this:
6161

6262
``` r
6363
data(airquality, package = "datasets")
64-
airquality <- data.io::labelise(airquality, label = list(
64+
airquality <- svBase::labelise(airquality, label = list(
6565
Ozone = "Ozone", Temp = "Temperature", Solar.R = "Solar radiation",
6666
Wind = "Wind speed"
6767
), units = list(

inst/WORDLIST

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ devtools
55
exploreit
66
ggplot
77
GitHub
8+
io
89
modelit
910
ORCID
1011
OSX
@@ -13,6 +14,7 @@ README
1314
reusability
1415
SciViews
1516
subsettable
17+
svBase
1618
svMisc
1719
thetics
1820
viridis

vignettes/chart_rationate.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ chart(function() {
3131
})
3232

3333
## -----------------------------------------------------------------------------
34-
trees <- data.io::labelise(trees, label = list(
34+
trees <- svBase::labelise(trees, label = list(
3535
Volume = "Volume of timber",
3636
Girth = "Diameter at 1.4m",
3737
Height = "Height"

vignettes/chart_rationate.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ See packages like [{modelit}](https://www.sciviews.org/modelit/) or [{exploreit}
7878
Another aspect of `chart()` is that it is tailored to produce plots that are as close as possible to be publication-ready (but they. remain fully editable with {ggplot2} functions, of course). Hence, the default theme, and the labels of axes or legends are set up accordingly. If the data frame has **label** and **units** attributes defined for the variables, they are used to construct the labels of the axes and legends. Here is an example with the `trees` dataset:
7979

8080
```{r}
81-
trees <- data.io::labelise(trees, label = list(
81+
trees <- svBase::labelise(trees, label = list(
8282
Volume = "Volume of timber",
8383
Girth = "Diameter at 1.4m",
8484
Height = "Height"

0 commit comments

Comments
 (0)