View source: R/convert_Cpeptide_units.R
convert_Cpeptide_units | R Documentation |
This function converts C-peptide values between different standard units. As input, it takes the values (as a vector), the input units, and the desired output units. These can be individual timepoints or AUC or mean AUC from an OGTT or MMTT - the function is ambivalent.
convert_Cpeptide_units(
values, input_units, output_units, test_minutes = NULL)
values |
numeric vector C-peptide values. If there are issues with values below the detection threshold, those must be resolved before running this function (i.e. values such as "<0.01" are not allowed) |
input_units |
character, the input units of the C-peptide values. Options include "ng_per_ml", "nmol_per_l", or less commonly "nmol_per_ml" or "ng_per_l". Each of these can be specified with and without "_per_min" appended. If "_per_min" is included, input values are assumed to be means across the time period of the MMTT or OGTT, and the number of minutes must be specified in |
output_units |
character, the desired output units of the C-peptide values. Options are the same as for |
test_minutes |
numeric, the number of minutes for the OGTT or MMTT. Ignored if "_per_min" is not included as part of |
a vector containing the C-peptide values, with NA where it could not be calculated
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.