mirror of
https://github.com/sensebox/opensensmapr
synced 2025-02-22 14:53:57 +01:00
add some brackets
This commit is contained in:
parent
0529dd9a29
commit
fda76ed670
2 changed files with 3 additions and 3 deletions
5
R/api.R
5
R/api.R
|
@ -45,8 +45,9 @@ get_boxes_ = function (..., endpoint) {
|
|||
df = dplyr::bind_rows(boxesList)
|
||||
df$exposure = df$exposure %>% as.factor()
|
||||
df$model = df$model %>% as.factor()
|
||||
if (!is.null(df$grouptag))
|
||||
if (!is.null(df$grouptag)){
|
||||
df$grouptag = df$grouptag %>% as.factor()
|
||||
}
|
||||
df
|
||||
}
|
||||
|
||||
|
@ -70,7 +71,7 @@ parse_measurement_csv = function (resText) {
|
|||
})
|
||||
|
||||
osem_as_measurements(result)
|
||||
}
|
||||
}
|
||||
|
||||
get_measurements_ = function (..., endpoint) {
|
||||
osem_get_resource(endpoint, c('boxes', 'data'), ..., type = 'text') %>%
|
||||
|
|
|
@ -50,7 +50,6 @@ test_that('optional box attributes are correctly parsed', {
|
|||
expect_null(oldbox$description)
|
||||
expect_null(oldbox$grouptag)
|
||||
expect_null(oldbox$weblink)
|
||||
expect_null(oldbox$updatedAt)
|
||||
expect_null(oldbox$height)
|
||||
expect_null(oldbox$lastMeasurement)
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue