Description Usage Arguments Value Functions Examples
View source: R/renaming_fattyacids.R
Fatty acids in the PROMISE cohort are in the form e.g. ne160
. In the
typical data analysis pipeline, these variables may be converted into a long
format such that these variables are now rows in a column. These variables
will likely end up in plot, so it's necessary to convert them into the
appropriate scientific format (e.g. NE 16:0
, or such simply 16:0
).
1 2 3 | renaming_fa(fa, keep.fraction = TRUE)
extract_fa_fraction(x, uppercase = FALSE)
|
keep.fraction |
Logical. Whether to keep the fraction abbreviation as a prefix. |
x |
Vector (or column when through dplyr::mutate) of the original fatty acid names. |
uppercase |
Logical. Whether to convert the fraction abbreviation to upper case. |
Reformatted fatty acid names to be scientifically accurate.
extract_fa_fraction
: Extract the fatty acid fraction from the PROMISE
fatty acid variables.
1 2 3 4 5 | fattyacids <- c("ne160", "tg141n7", "TotalTG")
renaming_fa(fattyacids)
renaming_fa(fattyacids, keep.fraction = FALSE)
extract_fa_fraction(fattyacids)
extract_fa_fraction(fattyacids, uppercase = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.