Skip to content

Commit

Permalink
Merge pull request #52 from atorus-research/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
statasaurus authored Oct 4, 2022
2 parents 93498ed + 6e69c1b commit f957141
Show file tree
Hide file tree
Showing 36 changed files with 622 additions and 996 deletions.
Binary file removed .DS_Store
Binary file not shown.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
vignettes/*.html
vignettes/*.pdf

# Files to draft tests
*/define_examples/*

# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
.httr-oauth

Expand All @@ -42,3 +45,5 @@ tests/testthat/temp_data/*
docs
doc
Meta
.DS_Store?
.DS_Store
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: metacore
Title: A Centralized Metadata Object Focus on Clinical Trial Data Programming Workflows
Version: 0.0.4
Version: 0.1.0
Authors@R:
c(person(given = "Christina",
family = "Fillmore",
Expand All @@ -27,7 +27,7 @@ Description: Create an immutable container holding metadata for the purpose of b
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE, r6 = FALSE)
RoxygenNote: 7.1.2
RoxygenNote: 7.2.1
Suggests:
testthat,
knitr,
Expand All @@ -39,7 +39,7 @@ Imports:
dplyr,
stringr,
magrittr,
XML,
xml2,
purrr,
readxl,
rlang,
Expand Down
19 changes: 12 additions & 7 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@ export(xml_to_ds_vars)
export(xml_to_value_spec)
export(xml_to_var_spec)
import(R6)
importFrom(XML,getNodeSet)
importFrom(XML,xmlElementsByTagName)
importFrom(XML,xmlGetAttr)
importFrom(XML,xmlNamespaceDefinitions)
importFrom(XML,xmlToDataFrame)
importFrom(XML,xmlTreeParse)
importFrom(XML,xmlValue)
importFrom(dplyr,anti_join)
importFrom(dplyr,arrange)
importFrom(dplyr,bind_rows)
Expand Down Expand Up @@ -67,7 +60,9 @@ importFrom(purrr,map_dfr)
importFrom(purrr,map_int)
importFrom(purrr,map_lgl)
importFrom(purrr,pmap_chr)
importFrom(purrr,quietly)
importFrom(purrr,reduce)
importFrom(purrr,safely)
importFrom(readxl,excel_sheets)
importFrom(readxl,read_excel)
importFrom(rlang,"!!")
Expand All @@ -80,6 +75,7 @@ importFrom(rlang,prim_name)
importFrom(rlang,sym)
importFrom(stats,na.omit)
importFrom(stats,var)
importFrom(stringr,regex)
importFrom(stringr,str_c)
importFrom(stringr,str_count)
importFrom(stringr,str_detect)
Expand All @@ -93,6 +89,7 @@ importFrom(stringr,str_replace_na)
importFrom(stringr,str_split)
importFrom(stringr,str_starts)
importFrom(stringr,str_subset)
importFrom(stringr,str_to_lower)
importFrom(stringr,str_trim)
importFrom(tibble,as_tibble)
importFrom(tibble,tibble)
Expand All @@ -101,3 +98,11 @@ importFrom(tidyr,nest)
importFrom(tidyr,replace_na)
importFrom(tidyr,unnest)
importFrom(tidyselect,everything)
importFrom(tidyselect,matches)
importFrom(xml2,read_xml)
importFrom(xml2,xml_attr)
importFrom(xml2,xml_find_all)
importFrom(xml2,xml_find_first)
importFrom(xml2,xml_ns_strip)
importFrom(xml2,xml_parent)
importFrom(xml2,xml_text)
12 changes: 12 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# Metacore 0.1.0
- Updates for latest version of {tidyselect}
- Move from XML to xml2 for define.xml processing
- Correct issue with warning on ds_var$core
- Correct bug with not reading the derivation of predecessor and assigned variables correctly

# Metacore 0.0.6
- Correct typos
- Limits origin value/make all origins lower case

# Metacore 0.0.5
- [#47](https://github.com/atorus-research/metacore/issues/47) Improve `yn_to_tf()` to be more robust in parsing yes/no columns

# Metacore 0.0.4
- Adds a supp table to store the `idvar` and `qeval` information
Expand Down
6 changes: 4 additions & 2 deletions R/metacore.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' @family Metacore
#' @noRd
#'
#'
#' @importFrom stringr str_to_lower
MetaCore_initialize <- function(ds_spec, ds_vars, var_spec, value_spec, derivations, codelist, supp){

private$.ds_spec <- ds_spec %>%
Expand Down Expand Up @@ -47,7 +47,9 @@ MetaCore_initialize <- function(ds_spec, ds_vars, var_spec, value_spec, derivati
dataset = "Dataset Name",
variable = "Variable Name",
where = "Value of the Variable",
derivation_id = "ID of Derivation")
derivation_id = "ID of Derivation") %>%
mutate(origin = str_to_lower(.data$origin))


private$.derivations <- derivations %>%
add_labs(derivation_id = "ID of Derivation",
Expand Down
Loading

0 comments on commit f957141

Please sign in to comment.