Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lookupname eq varname #108

Merged
merged 3 commits into from
Oct 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: secuTrialR
Type: Package
Title: Handling of data from the clinical data management system secuTrial
Version: 0.6.1
Version: 0.6.2
Authors@R:
c(person(given = "Pascal",
family = "Benkert",
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# secuTrialR 0.6.2
* `factorize_secuTrial()` now no longer triggers an unexpected warning when the name of a secuTrial lookuptable is equal to the name of the variable it is being used in. (PR #108)

# secuTrialR 0.6.1
* `return_random_cases()` has been added to the package. It allows to sample a random subset of cases from a secuTrial export in a reproducible fashion.

Expand Down
4 changes: 2 additions & 2 deletions R/factorize.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ factorize_secuTrial.data.frame <- function(data, cl, form, items, short_names) {
lookup <- cl[grepl(regex_cl, cl$column) |
(cl$var %in% names(data) & cl$var %in% lookups$ffcolname), ]

# exception for meta variables (for non meta variables the lookup should never be empty)
if (nrow(lookup) == 0 & name %in% meta_var_names) {
# exception for meta variables
if (name %in% meta_var_names) {
# meta variables do not need to be tied to a form thus the
# formname does not need to be part of the regex
lookup <- cl[grepl(paste0("^", name, "$"), cl$column), ]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- README.md is generated from README.Rmd. Please edit that file -->


# secuTrialR ![travis](https://api.travis-ci.com/SwissClinicalTrialOrganisation/secuTrialR.svg?branch=master) [![codecov](https://codecov.io/github/SwissClinicalTrialOrganisation/secuTrialR/branch/master/graphs/badge.svg)](https://codecov.io/github/SwissClinicalTrialOrganisation/secuTrialR) [![](https://img.shields.io/badge/dev%20version-0.6.1-blue.svg)](https://github.com/SwissClinicalTrialOrganisation/secuTrialR)
# secuTrialR ![travis](https://api.travis-ci.com/SwissClinicalTrialOrganisation/secuTrialR.svg?branch=master) [![codecov](https://codecov.io/github/SwissClinicalTrialOrganisation/secuTrialR/branch/master/graphs/badge.svg)](https://codecov.io/github/SwissClinicalTrialOrganisation/secuTrialR) [![](https://img.shields.io/badge/dev%20version-0.6.2-blue.svg)](https://github.com/SwissClinicalTrialOrganisation/secuTrialR)

An R package to handle data from the clinical data management system (CDMS) [secuTrial](https://www.secutrial.com/en/).

Expand Down