View source: R/transform_comp.R
transform_comp | R Documentation |
Takes a dataset with a set of labelled compositional columns and returns a dataset with
transformed variables added. The current behaviour also returns compositional columns rescaled to be on the unitless scale, and with zeroes imputed
if rounded_zeroes
is TRUE
.
transform_comp( data, comp_labels, transformation_type = "ilr", rounded_zeroes = TRUE, det_limit = NULL, comparison_part = NULL, part_1 = NULL )
data |
Dataset to have the transformation applied to. |
comp_labels |
The labels of the compositional columns. |
transformation_type |
The type of transformation desired. Should be |
rounded_zeroes |
Are zeroes rounded zeroes? |
det_limit |
Detection limit if zeroes are to be imputed. This is needed when |
comparison_part |
Only needed for alr transformation. Should be an element of |
part_1 |
Used with ilr-pivot coordinate transformation to specify which should be first part. Passed to |
data
with transformed compositional columns.
transform_comp(data = simdata, comp_labels = c("vigorous", "moderate", "light", "sedentary", "sleep"), transformation_type = "ilr", det_limit = 0.00119)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.