Commit 7c4a5a24 authored by Sébastien Galais's avatar Sébastien Galais

Correction of a bug in the internal function 'deploy()'. The cases...

Correction of a bug in the internal function 'deploy()'. The cases 'to_list_length = 1' and 'to_list_length = 2' are now well handled (@julia.schmidt, 20200205 forum.db.nomics.world).
parent 59575603
Pipeline #119748 passed with stage
in 14 minutes and 37 seconds
Package: rdbnomics
Type: Package
Title: Download DBnomics Data
Version: 0.5.1
Version: 0.5.2
Authors@R: c(person("Sebastien", "Galais", role = c("cre", "ctb"),
email = "s915.stem@gmail.com"),
person("Thomas", "Brand", role = c("aut"),
......
# rdbnomics 0.5.2
* Correction of a bug in the internal function `deploy`. The cases
`to_list_length = 1` and `to_list_length = 2` are now well handled
(@julia.schmidt, 20200205 forum.db.nomics.world).
# rdbnomics 0.5.1
* New argument 'query' for function `rdb()`.
* New argument 'api_link' for function `rdb()` to replace `rdb_by_api_link()`.
* New internal function `.rdb()` because `rdb_by_api_link()` is deprecated.
* New function `dbnomics()` which is used in the vignette (@blu2ego, #2).
* New function `dbnomics()` which is used in the vignette (@blu2ego, #2 github).
* Small class correction for R 3.1.
# rdbnomics 0.5.0
......@@ -47,7 +53,7 @@
* New `rdb_last_updates()` shows the last updates.
* In the functions, dates and timestamps are transformed using `as.Date()` and
`as.POSIXct()`.
* `dimensions` in `rdb()` can be a list (@Iwo, #1).
* `dimensions` in `rdb()` can be a list (@Iwo, #1 gitlab).
# rdbnomics 0.4.3
......
......@@ -168,10 +168,13 @@ deploy <- function(DT, columns = NULL, reference_column = "value") {
v <- y[[iv]]
if (inherits(v, "list")) {
v <- unlist(v)
if (length(v) == 1) {
if (length(v) == 1 & to_list_length != 1) {
# New col
y[[iv]] <- paste0(trim(v), ",")
} else if ( (length(v) == to_list_length + 1) | (length(v) == 2) ) {
} else if (
(length(v) == to_list_length + 1) |
(length(v) == 2 & to_list_length != 2)
) {
# New col
y[[iv]] <- paste0(trim(v[1]), ",", utils::tail(v, -1))
} else if (length(v) != to_list_length) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment