Skip to content

Commit 7c51441

Browse files
committed
data.io_lang -> SciViews_lang option + change to match svBase/svMisc refactoring
1 parent 6b3513f commit 7c51441

23 files changed

+32
-788
lines changed

DESCRIPTION

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: data.io
22
Type: Package
3-
Version: 1.6.1
3+
Version: 1.7.0
44
Title: 'SciViews::R' - Read and Write Data in Different Formats
55
Description: Read or write data from many different formats (tabular datasets,
66
from statistic software ...) into R objects. Add labels and units in
@@ -15,14 +15,12 @@ Depends:
1515
Imports:
1616
data.table (>= 1.15.4),
1717
data.trame (>= 0.9.0),
18-
Hmisc (>= 5.0.1),
1918
lifecycle (>= 1.0.0),
2019
utils (>= 4.2.0),
2120
R.utils (>= 2.13.0),
22-
svMisc (>= 1.5.0),
2321
readr (>= 2.1.4),
2422
rlang (>= 1.1.1),
25-
svBase (>= 1.4.0),
23+
svBase (>= 1.7.0),
2624
tibble (>= 3.2.1),
2725
tsibble (>= 1.1.3)
2826
Suggests:

NAMESPACE

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,16 @@
22

33
S3method(.DollarNames,read_function_subset)
44
S3method(.DollarNames,write_function_subset)
5-
S3method(as_dataframe,data.frame)
6-
S3method(as_dataframe,dataframe)
7-
S3method(as_dataframe,default)
8-
S3method(as_dataframe,list)
9-
S3method(as_dataframe,matrix)
10-
S3method(as_dataframe,table)
11-
S3method(labelise,data.frame)
12-
S3method(labelise,default)
13-
S3method(unlabelise,data.frame)
14-
S3method(unlabelise,default)
15-
export("label<-")
16-
export(as.dataframe)
17-
export(as_dataframe)
18-
export(cl)
195
export(data_example)
206
export(data_types)
217
export(hread_text)
228
export(hread_xls)
239
export(hread_xlsx)
24-
export(is.dataframe)
25-
export(is_dataframe)
26-
export(label)
27-
export(labelise)
28-
export(labelize)
2910
export(read)
3011
export(read_write_option)
3112
export(relative_path)
3213
export(type_from_extension)
33-
export(unlabelise)
34-
export(unlabelize)
3514
export(write)
36-
importFrom(Hmisc,"label<-")
37-
importFrom(Hmisc,label)
3815
importFrom(R.utils,gunzip)
3916
importFrom(data.table,fread)
4017
importFrom(data.table,fwrite)
@@ -47,8 +24,15 @@ importFrom(lifecycle,deprecated)
4724
importFrom(readr,default_locale)
4825
importFrom(readr,read_lines)
4926
importFrom(rlang,quos)
27+
importFrom(svBase,"label<-")
28+
importFrom(svBase,aka)
29+
importFrom(svBase,cl)
5030
importFrom(svBase,default_dtx)
51-
importFrom(svMisc,aka)
31+
importFrom(svBase,label)
32+
importFrom(svBase,labelise)
33+
importFrom(svBase,labelize)
34+
importFrom(svBase,unlabelise)
35+
importFrom(svBase,unlabelize)
5236
importFrom(tibble,add_column)
5337
importFrom(tibble,as_tibble)
5438
importFrom(tibble,is_tibble)

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# data.io 1.7.0
2+
3+
- Functions `labelise()`/`labelize()`, `cl()`, `unlabelise()`/`unlabelize()`, `label()` and `label<-()` are moved from here to svBase.
4+
15
# data.io 1.6.1
26

37
- The `$.subsettable_type()` method is now in {svMisc}.

R/as_dataframe.R

Lines changed: 0 additions & 255 deletions
This file was deleted.

R/data.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@
102102
#' library(ggplot2)
103103
#' ggplot(urchin_growth, aes(age, diameter)) +
104104
#' geom_jitter(alpha = 0.2) +
105-
#' xlab(label(urchin_growth$age, units = TRUE)) +
106-
#' ylab(label(urchin_growth$diameter, units = TRUE)) +
105+
#' xlab(svBase::label(urchin_growth$age, units = TRUE)) +
106+
#' ylab(svBase::label(urchin_growth$diameter, units = TRUE)) +
107107
#' ggtitle("Growth of a cohort of sea urchins")
108108
"urchin_growth"
109109

File renamed without changes.

R/data.io-package.R

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
#' with [base::write()] but provides many more features if you indicate
1515
#' `type=` or use it like `write$type()`.
1616
#'
17-
#' - [labelise()] adds a `label`, and possibly a `units` attributes to an
18-
#' object, to be used while pretty printing a table or plot.
19-
#'
2017

2118
# The following block is used by usethis to automatically manage
2219
# roxygen namespace tags. Modify with care!
@@ -27,7 +24,7 @@
2724
#' @importFrom R.utils gunzip
2825
#' @importFrom readr default_locale read_lines
2926
#' @importFrom rlang quos
30-
#' @importFrom svMisc aka
27+
#' @importFrom svBase aka labelise labelize cl unlabelise unlabelize label label<-
3128
#' @importFrom svBase default_dtx
3229
#' @importFrom tibble tibble tribble as_tibble is_tibble add_column
3330
#' @importFrom tsibble as_tsibble

R/data_types.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ data_types <- function(types_only = FALSE, view = TRUE) {
4545
# defines another version of that function, and we ant to use it instead!
4646
view <- get0("View", mode = "function")
4747
if (is.null(view)) {
48-
warning("'View' function not found, return the data instead")
48+
warning("'View()' function not found, return the data instead")
4949
`data types`
5050
} else {
5151
view(`data types`)

0 commit comments

Comments
 (0)