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

Wip features #67

Draft
wants to merge 137 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
fc23410
Merge pull request #28 from Big-Life-Lab/small-cells
rvyuha Apr 1, 2019
e15a08c
Example of using centering, rcs and Fine and Grey modelling using pbc…
StaceyFisher Apr 19, 2019
9c8f70c
[feature] linting and add getwd()
DougManuel Apr 19, 2019
977e2a9
[Refactor] Added travis settings
rvyuha May 13, 2019
eae9209
[Refactor] Merged Stacey's model branch
rvyuha May 13, 2019
54729af
[Feature] Added basic Model Reference creation
rvyuha May 13, 2019
f103c8e
[Refactor] Added example to vignette
rvyuha May 13, 2019
e3113ba
[feature] example vignette for CreateBLLModelObject
DougManuel May 13, 2019
51b8940
Merge remote-tracking branch 'origin/create-reference' into create-re…
DougManuel May 13, 2019
edb2aab
[Refactor] Column name change
rvyuha May 13, 2019
bce8610
[Feature] Function Skeleton
rvyuha May 21, 2019
61fda1f
Merge remote-tracking branch 'origin/master' into create-reference
rvyuha May 27, 2019
ec8b969
[Feature] Cleaner CreateBLLModelObject function structure with additi…
rvyuha May 27, 2019
6f38048
[Refactor] Revieved the comments of CreateBLLModelObject
rvyuha May 27, 2019
bc339f0
[Bug] Fixed check() errors
rvyuha May 28, 2019
912f6ad
[Bug] Fixed model example rmd not being pkgdown properly
rvyuha May 28, 2019
d62515a
[Bug] pkgdown function fix
rvyuha May 28, 2019
28d6b22
[feature] add vignette to e_model_development.Rmd
DougManuel May 31, 2019
1921641
Modify fine and grey example to use rcs2 function
StaceyFisher Jun 4, 2019
a938980
Revert commit- will move to new branch
StaceyFisher Jun 4, 2019
2982788
Fine and Grey baseline risk and other minor chagnes
StaceyFisher Jun 4, 2019
bae5f20
[Feature] Implemented calculateMean param
rvyuha Jun 25, 2019
fb2f332
Merge remote-tracking branch 'origin/baseline-risk' into create-refer…
rvyuha Jun 25, 2019
ad90c8f
[Feature] Added baseline
rvyuha Jun 25, 2019
7a7cf95
[Feature] Recipe use Example
rvyuha Jul 3, 2019
4a21b00
[Refactor] Better comments
rvyuha Jul 3, 2019
62324ac
[Feature] Proposed Implementation of the operations
rvyuha Jul 8, 2019
a54d689
[Refactor] Function name fix
rvyuha Jul 8, 2019
8f8455b
[Feature] Updated Proof of concept
rvyuha Jul 9, 2019
3e1bc42
[Feature] Added a sample run of modules
rvyuha Jul 11, 2019
890f4c3
[Feature] Module sequence error trapping
rvyuha Jul 11, 2019
ba42cba
[Feature] TestThat merge
rvyuha Jul 11, 2019
35fc970
[Feature] Master Merge
rvyuha Jul 11, 2019
81c8e7c
[Bug] Fixed missing comma
rvyuha Jul 11, 2019
7263905
[Feature] Function Object created
rvyuha Jul 17, 2019
0793eb5
[Feature] Created arg specific functions
rvyuha Jul 22, 2019
85a5168
[Refactor] Changed function special character from - to ::
rvyuha Aug 6, 2019
f1b8826
[Feature] Wrapper function skeleton
rvyuha Aug 19, 2019
5288c15
[Feature] Created bllFlow meanImpute
rvyuha Aug 20, 2019
587b32b
[Feature] Added a testing viggnette
rvyuha Aug 20, 2019
242edf3
[Feature] Modification on main function loop
rvyuha Sep 9, 2019
1aa2ec0
.
rvyuha Sep 9, 2019
cd7ac81
Merge branch 'recode-with-table' into derived-variable-creation
rvyuha Sep 16, 2019
a7076c0
[Feature] Set up recursive function for Function variables
rvyuha Sep 16, 2019
bd79823
[Feature] Got the function call working
rvyuha Sep 17, 2019
8389447
[Feature] Recoded Packyears function
rvyuha Sep 18, 2019
bfd40ca
[Feature] Finished packyear recode
rvyuha Sep 23, 2019
ce37182
[Feature] PackYears function
rvyuha Sep 24, 2019
0621943
[Feature] Added ability to pass custom functions
rvyuha Sep 26, 2019
41d00eb
[Feature] Dplyr function calling
rvyuha Oct 1, 2019
29b4816
Merge branch 'master' into derived-variable-creation
rvyuha Oct 3, 2019
8a407c9
Merge remote-tracking branch 'origin/master' into derived-variable-cr…
rvyuha Oct 3, 2019
98c8f97
[Feature] Added vignette to test some simple functionallity
rvyuha Oct 3, 2019
3674f8e
[Feature] Added recusive support for multiple function variables
rvyuha Oct 7, 2019
ef6a899
[Refactor] Prepping for multi data
rvyuha Oct 10, 2019
d9934b2
[Feature] List bllFlow creation support
rvyuha Oct 15, 2019
6e108e9
[Feature] Template generation
rvyuha Oct 15, 2019
26961cc
[Bug] Fixed non character reading
rvyuha Oct 15, 2019
c36cfed
[Refactor] Added better warnings for derived variable creation
rvyuha Oct 15, 2019
55b8f5d
[Bug] Reverting unsported changes
rvyuha Oct 15, 2019
401929a
[Fix] Addressed merge issues
rvyuha Oct 22, 2019
85eae19
Merge branch 'new-format-update' into step-function-recoding
rvyuha Oct 22, 2019
a2d3280
[Feature] Building recipy using steps
rvyuha Oct 22, 2019
b3f4e87
[Feature] Passed variables as arguments
rvyuha Oct 22, 2019
f0631de
[Feature] Reading specific columns
rvyuha Oct 23, 2019
843f9b5
[Feature] Parsed out variables
rvyuha Oct 28, 2019
bc47645
[Feature] Only specified columns are read
rvyuha Oct 28, 2019
8d95653
[Bug] Fixed funcCellnon character argument
rvyuha Oct 28, 2019
f8afefe
[Feature] Added ability to specify number of rows to read
rvyuha Oct 28, 2019
6de776a
[Bug] Fixed null column creation
rvyuha Oct 28, 2019
443d2a3
Merge branch 'derived-variable-creation' into dev
rvyuha Oct 28, 2019
888948a
Merge branch 'importing-data' into dev
rvyuha Oct 28, 2019
685c819
[Feature] Added directory for MSW and modified read data to take vari…
rvyuha Oct 29, 2019
d208dfd
[Feature] Added variable extraction functions
rvyuha Oct 31, 2019
e3aed08
[Bug] Fixed different functions on same variable in same cycle
rvyuha Nov 4, 2019
92913e2
[Feature] Got long table working as well as summary table
rvyuha Nov 4, 2019
0024671
add role (#65)
DougManuel Nov 8, 2019
69096d9
[Feature] Readded ReadData nrow argument
rvyuha Nov 12, 2019
afe8667
[Feature] Skeleton for recipy get and set
rvyuha Nov 18, 2019
ab2dc5d
[Feature] Partial snake_case variable and function name conversion
rvyuha Nov 18, 2019
2d37af9
[Feature] snake_case_update and test removal
rvyuha Jan 9, 2020
4e5493e
[Feature] Added step_z
rvyuha Jan 9, 2020
6b6755c
[Feature] Fixed z_score bugs and added testing vignette
rvyuha Jan 9, 2020
a52fa8c
[Feature] Removed list handling added modules
rvyuha Jan 15, 2020
edb87b6
[Feature] Harrell rcs wrapper function
rvyuha Jan 28, 2020
c48d626
[Feature] Added bllflow run_module and apply_missing_tagged_na new f…
rvyuha Jan 29, 2020
c008511
[Feature] Added module handling for
rvyuha Feb 4, 2020
97ab811
[Feature] Added proper run_module bllflow return
rvyuha Feb 6, 2020
54e16be
[Feature] Role selection for table one
rvyuha Feb 7, 2020
fffc13d
[Bug] Fixed non tibble vars select
rvyuha Feb 10, 2020
42ce3bc
[Bug] Fixed white space issue
rvyuha Feb 10, 2020
9a2a0d1
[Bug] Accounted for multiple roles
rvyuha Feb 11, 2020
d051685
[Bug] levels mismatch fix
rvyuha Feb 11, 2020
ce8bf17
[Feature] Added labels to tableOne
rvyuha Feb 12, 2020
cdab001
[Feature] Additional params for CreateTableOne are passed to tableOne
rvyuha Feb 13, 2020
3aacf2f
[Test] Testing tableone added features
rvyuha Feb 18, 2020
5c3105c
[Feature] Slight Bloat reduction and commenting out of old/depricated…
rvyuha Feb 19, 2020
02b457d
.
rvyuha Feb 19, 2020
30eb690
[Feature] Added sample config file
rvyuha Feb 25, 2020
8b1b5e5
[Feature] Config rec with table
rvyuha Feb 25, 2020
5cb2da8
[Bug] Fixed modules not being read and multi rec not working
rvyuha Feb 25, 2020
0b31a41
[Feature] config data combination
rvyuha Feb 25, 2020
28f1693
[Feature] Custom function skeleton
rvyuha Feb 25, 2020
e700323
[Feature] Added steps back due to complications with bllflow-recipes
rvyuha Feb 26, 2020
b1f41e1
[Feature] Added missing export
rvyuha Feb 26, 2020
de2f094
[Feature] Fixed z
rvyuha Feb 27, 2020
8ef3d96
[Feature] fixed NA.rm
rvyuha Feb 27, 2020
d2274ba
[Bug] Removed print
rvyuha Feb 27, 2020
9d4dc53
[Bug] Reverted bllflow class change back to BLLFlow
rvyuha Feb 28, 2020
dbe1989
[Feature] Removed the need for tableoneTest as a way of applying valu…
rvyuha Feb 28, 2020
aadf2dc
[Bug] Added tableone function reference
rvyuha Feb 28, 2020
45c303f
[Bug] Removed tableoneTEST reference
rvyuha Feb 29, 2020
b0a20b7
[Feature] Added basic formatting from variables in case variable is n…
rvyuha Mar 2, 2020
465871e
[Feature] added labels to kableone print
rvyuha Mar 2, 2020
eb042d2
[Feature] Added additional params to bllflow::kableone (missingLabel,…
rvyuha Mar 3, 2020
3b4d757
[Bug] Fixed trying to add labels to non existant variables anywhwere
rvyuha Mar 3, 2020
b96ad21
[Feature] Added bllflow object return to avoid accidental NULL return
rvyuha Mar 3, 2020
48e19e2
[Feature] Test updated bllflow
rvyuha Mar 9, 2020
dd62ae4
[Feature] Updated RData config reading to resave data in default loca…
rvyuha Mar 9, 2020
03c53d9
[Feature] Added bllflow scrambling of data
rvyuha Mar 11, 2020
fb93f04
[Feature] Updated argument for data_name
rvyuha Mar 11, 2020
48110db
[Feature] Updated examples
rvyuha Mar 24, 2020
32e4e9e
[Test] Testing derived/recoded combo
rvyuha Mar 25, 2020
51bf24c
[Bug] Fixed derived and rec on same variable
rvyuha Mar 25, 2020
919676a
[Test] Default for rec and derived vars
rvyuha Mar 25, 2020
cefe039
[Bug] Fixed rec and derived for default years
rvyuha Mar 25, 2020
5d9b3c0
[Feature] Strata scrambling
rvyuha Mar 26, 2020
c75d6d7
[Bug] Fixed && usage causing all var selection
rvyuha Jun 8, 2020
fbceec3
[Feature] Reintroduced summary_data_long
rvyuha Jun 25, 2020
8b427d9
[Feature] Initial PR edits
rvyuha Jul 22, 2020
ccd63f9
[Refactor] Updated namespace
rvyuha Jul 22, 2020
5a1aab9
[Bug] Fixed broken example
rvyuha Jul 22, 2020
4038f00
[Refactor] Fixed linter and spelling errors
rvyuha Jul 24, 2020
d2968ab
[Bug] Fixed adding arguments to formula based steps
rvyuha Jul 28, 2020
4d13c68
[Fix] Minor fix for roles
rvyuha Jul 29, 2020
d6ed586
[Refactor] Moved the WIP functions
rvyuha Aug 4, 2020
3437979
[Refactor] Adding missing snippit of depricated
rvyuha Aug 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ BLLFlow.Rproj
^images$
docs$
vignettes
^.travis.yml
^CODE_OF_CONDUCT.md
^CONTRIBUTING.md
^config.yml
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,3 @@ man/*
!man/figures/
docs
.RData
OneDrive_1_8-9-2019
PoRT MSW - cchsVariableDetails.csv
PoRT MSW - variablesCCHSFlow.csv
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ before_script:
- R -e "install.packages('knitr')"
- R -e "install.packages('roxygen2')"
- R -e "install.packages('devtools')"
- Rscript -e 'devtools::install()'

script:
- R -e 'devtools::document()'
- R CMD build .
- R CMD check *tar.gz

after_success:
- Rscript -e 'devtools::install()'
- R -e "install.packages('pkgdown')"
- Rscript -e 'pkgdown::build_site(run_dont_run = TRUE)'

Expand Down
35 changes: 19 additions & 16 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Type: Package
Title: Big Life Lab Flow - a Workflow for Predictive Studies
Description: An implementation of predictive algorithm studies. Predictive
Modelling Mark-up Language (PMML) is suported. The workflow has three steps:
data prepartation; model development, and; model deployment.
data preparation; model development, and; model deployment.
Version: 0.1.0
Date: 2018-12-09
Authors@R: c(
Expand All @@ -24,29 +24,32 @@ Authors@R: c(
Depends:
R (>= 3.2),
tableone,
recipes
Imports:
DDIwR,
xml2,
stringr,
sjlabelled,
haven
Imports:
rstudioapi,
glue,
plotly,
Hmisc,
tidyr,
dplyr
haven,
magrittr,
rms,
config,
dplyr,
labelled,
rlang,
tibble,
tidyr
Suggests:
knitr,
rmarkdown,
DT,
magrittr,
survival,
testthat
knitr,
rmarkdown,
survival,
testthat,
cchsflow
URL: https://github.com/Big-Life-Lab/bllflow
BugReports: https://github.com/Big-Life-Lab/bllflow/issues
Maintainer: Rostyslav Vyuha <[email protected]>
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.1.1
RoxygenNote: 7.1.0
VignetteBuilder: knitr
72 changes: 51 additions & 21 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,26 +1,56 @@
# Generated by roxygen2: do not edit by hand

S3method(CheckSmallCells,SummaryData)
S3method(CheckSmallCells,TableOne)
S3method(CreateTableOne,BLLFlow)
S3method(CreateTableOne,default)
S3method(RecWTable,default)
S3method(WriteDDIPopulatedMSW,BLLFlow)
S3method(WriteDDIPopulatedMSW,BLLFlowDDI)
S3method(clean.Max,BLLFlow)
S3method(clean.Min,BLLFlow)
S3method(print,metaDataLog)
export(BLLFlow)
export(CheckSmallCells)
S3method(bake,step_apply_missing_tagged_na)
S3method(bake,step_tagged_naomit)
S3method(bake,step_z)
S3method(get_variables,BLLFlow)
S3method(get_variables,default)
S3method(prep,step_apply_missing_tagged_na)
S3method(prep,step_tagged_naomit)
S3method(prep,step_z)
S3method(print,TableOne)
S3method(run_module,BLLFlow)
S3method(run_module,default)
S3method(set_data_labels,BLLFlow)
S3method(set_data_labels,default)
export(CreateTableOne)
export(GetDDIDescription)
export(GetDDIVariables)
export(ProcessDDIVariableDetails)
export(ReadDDI)
export(RecWTable)
export(SetDataLabels)
export(SummaryDataLong)
export(UpdateMSW)
export(WriteDDIPopulatedMSW)
export(clean.Max)
export(clean.Min)
export(bllflow_config_combine_data)
export(bllflow_config_init)
export(bllflow_config_read_data)
export(bllflow_config_rec_data)
export(build_bllflow)
export(get_variables)
export(is_equal)
export(kableone)
export(read_data)
export(rec_with_table)
export(run_module)
export(scramble_data)
export(set_data_labels)
export(step_apply_missing_tagged_na)
export(step_tagged_naomit)
export(step_z)
export(table_one_long)
importFrom(dplyr,do)
importFrom(dplyr,rowwise)
importFrom(dplyr,select)
importFrom(haven,tagged_na)
importFrom(labelled,var_label)
importFrom(magrittr,"%>%")
importFrom(recipes,bake)
importFrom(recipes,prep)
importFrom(recipes,step)
importFrom(recipes,tidy)
importFrom(rlang,parse_expr)
importFrom(sjlabelled,"set_label<-")
importFrom(sjlabelled,get_labels)
importFrom(sjlabelled,set_label)
importFrom(sjlabelled,set_labels)
importFrom(stats,sd)
importFrom(stringr,str_match)
importFrom(tableone,CreateTableOne)
importFrom(tibble,as.tibble)
importFrom(tidyr,drop_na)
importFrom(utils,capture.output)
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# bllFlow (development version)
## Temp dump of changes
- ReadData function
- changed table one to use working data
- changed naming convention to snake case in recode-wit-table.R
- changed naming convention to snake case in small-cell-check.R
- changed naming convention to snake case in table-one-long.R
- changed naming convention to snake case in util-funcs.R

# bllflow 0.1.2 (current build)

Expand Down
21 changes: 21 additions & 0 deletions R/apply_missing_tagged_na.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# ---------- DEPRECATED SEE BLLFLOWRECIPES FOR NEW VERSION ----------
#' #' Apply missing tagged NA
#' #'
#' #' Any non tagged NA has the passed tag applied to them this helps tag NA
#' #' that were added by other packages
#' #'
#' #' @param data
#' #' @param variables
#' #' @param tag_type
#' #'
#' #' @return passed data with non tagged NA now having the tag_type applied
#' #' @export
#' apply_missing_tagged_na <- function(data, variables, tag_type) {
#' for (variable in variables) {
#' NA_index <- is.na(data[[variable]])
#' tagged_NA_index <- haven::is_tagged_na(data[[variable]])
#' true_NA_index <- !(NA_index == tagged_NA_index)
#' data[true_NA_index, variable] <- haven::tagged_na(tag_type)
#' }
#' return(data)
#' }
Loading