Description Usage Arguments Value Examples
View source: R/load-data.R View source: R/load-data copy.R
This function scales data after tables are made. Scales numeric adjustment
and proteomic variables. Done separately to maintain scale and values for
table 1 and figure generation. Numeric adjustment variables must be
specified. See numeric.id()
for more details.
1 | get.scaled(data, adjust, proteins = NULL)
|
data |
Tibble of Data to be scaled |
adjust |
List of NUMERIC ADJUSTMENT VARS ONLY – output of
|
proteins |
List of Proteins to Scale |
Tibble where all numeric adjustment variables and protein variables are scaled to mean 0 and sd 1.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
labels <- get.labels('data/proteinMapping.csv', sid,
uniprot.full.name,
entrezgenesymbol,
flag2 == 0)
soma.data.fifth <- get.soma('data/somaV5.txt', labels)
fifth.visit.study <-
get.adjust(stata = haven::read_dta('data/ARICmaster_121820.dta'),
mods = list('data/visit-five/outcomes.csv',
'data/visit-five/adjusted.csv'),
filts = list('data/visit-five/filters.csv'))
adj <- readr::read_csv('data/visit-five/adjusted.csv')[[1]][-1]
visit.data <- get.data(fifth.visit.study, soma.data.fifth, adj)
num.vars <- numeric.id(visit.data, adj)
visit.data.scaled <- get.scaled(visit.data, num.vars, labels$term)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.