Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
DSCC
FSO Metadata Auto R
Commits
e7377d29
Commit
e7377d29
authored
Oct 22, 2021
by
Pauline Maury Laribière
Browse files
extending post processing to non level 1 start
parent
8a063f48
Pipeline
#270027
passed with stage
in 1 minute and 1 second
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
NAMESPACE
View file @
e7377d29
...
...
@@ -18,5 +18,4 @@ export(get_identifier_content)
export(get_nomenclature_multiple_levels)
export(get_nomenclature_one_level)
export(get_nomenclature_path_nodes)
export(hash_to_string)
export(query_nomenclature)
R/api_call.R
View file @
e7377d29
...
...
@@ -23,7 +23,7 @@ get_codelist <- function(identifier,
api
<-
api_class
(
api_type
=
"codelist"
,
export_format
=
export_format
,
parameters
=
glue
(
"annotations={tolower(annotations)}"
),
parameters
=
glue
::
glue
(
"annotations={tolower(annotations)}"
),
id
=
identifier
)
api
$
get_response
()
...
...
@@ -225,12 +225,11 @@ get_nomenclature_multiple_levels <- function(identifier,
# fill sub groups rows with parent group's values (instead of NA)
nb_col
<-
level_to
-
level_from
+
1
group_columns
<-
names
(
res
)[
1
:
nb_col
]
res
[[
group_columns
[[
1
]]]]
<-
data.table
::
nafill
(
res
[[
group_columns
[[
1
]]]],
type
=
"locf"
)
res
[
group_columns
[(
level_from
+
1
)
:
level_to
]]
<-
res
%>%
group_by
(
group_columns
[[
level_from
]])
%>%
subset
(
select
=
group_columns
[(
level_from
+
1
)
:
level_to
])
%>%
res
[
group_columns
[
2
:
(
level_to
-
level_from
+
1
)]]
<-
res
%>%
group_by
(
group_columns
[
1
])
%>%
subset
(
select
=
group_columns
[
2
:
(
level_to
-
level_from
+
1
)])
%>%
data.table
::
nafill
(
type
=
"locf"
)
res
...
...
example.Rmd
View file @
e7377d29
...
...
@@ -11,12 +11,18 @@ knitr::opts_chunk$set(echo = TRUE)
# Installation
To
install the library
: # source stuff
You can
install the library
with
```{r
cars
}
summary(cars
)
```{r
install
}
install.packages("fso_metadata"
)
```
then at the beginning of your R script, you will need to
```{r library}
library("fso_metadata")
```
# Available everywhere with the interoperability plateform (i14y)
## Code list
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment