Skip to main content

interp_format

Function interp_format 

Source
fn interp_format(
    args: &[RValue],
    named: &[(String, RValue)],
    context: &BuiltinContext<'_>,
) -> Result<RValue, RError>
Expand description

Format a value as a character string (S3 generic).

Supports named parameters: nsmall (minimum decimal places for doubles), width (minimum field width, right-justified), big.mark (thousands separator), and scientific (force scientific notation when TRUE, suppress when FALSE).

@param x the value to format @param nsmall minimum number of digits to the right of the decimal point @param width minimum field width (right-justified with spaces) @param big.mark character to insert as thousands separator @param scientific logical; TRUE forces scientific notation, FALSE suppresses it @return character vector representation