IQSS / dataverse-client-r

R Client for Dataverse Repositories

Home Page:https://iqss.github.io/dataverse-client-r

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

new data.frame attribute for `get_dataverse()`.

wibeasley opened this issue · comments

There's a subtle & trivial difference in the tests for get_dataverse(), which may be related to new versions of tibble or R 4.0.

>   expect_equal(actual, expected)
Error: `actual` not equal to `expected`.
Componentdatasets: Attributes: < Names: 1 string mismatch >
Componentdatasets: Attributes: < Length mismatch: comparison on first 2 components >
Componentdatasets: Attributes: < Component 2: Modes: character, numeric >
Componentdatasets: Attributes: < Component 2: target is character, current is numeric >
> actual
Dataverse name: Demo Dataverse
Released?       Yes
data frame with 0 columns and 0 rows
> expected
Dataverse name: Demo Dataverse
Released?       Yes
data frame with 0 columns and 0 rows
> str(expected)
List of 4
 $ title                   : chr "Demo Dataverse"
 $ generator               : list()
  ..- attr(*, "uri")= chr "http://www.swordapp.org/"
  ..- attr(*, "version")= chr "2.0"
 $ dataverseHasBeenReleased: chr "true"
 $ datasets                :'data.frame':	0 obs. of  0 variables
 - attr(*, "class")= chr "dataverse_dataset_list"
> str(actual)
List of 4
 $ title                   : chr "Demo Dataverse"
 $ generator               : list()
  ..- attr(*, "uri")= chr "http://www.swordapp.org/"
  ..- attr(*, "version")= chr "2.0"
 $ dataverseHasBeenReleased: chr "true"
 $ datasets                :'data.frame':	0 obs. of  0 variables
 - attr(*, "class")= chr "dataverse_dataset_list"
> attributes(actual$datasets)
$names                                      # This is new
character(0)

$class
[1] "data.frame"

$row.names
integer(0)

> attributes(expected$datasets)
$class
[1] "data.frame"

$row.names
integer(0)