Percent | R Documentation |
This function is a wrapper for easy affixing of the per cent sign (%) to a value or a vector or a data frame of values.
Percent(Data, Type, format = "f", ...)
Data |
The Data which the percent sign is to be affixed. The data must be in the raw form because for frame argument, the per cent value of each cell is calculated before the sign is affixed. |
Type |
The type of data. The default arguments are Value for single numeric data of Frame for a numeric vector or data frame data. In the case of vector or data frame, the per cent value of each cell is calculated before the per cent sign is affixed. |
format |
The format of the output which is internal and the default is a character factor |
... |
Additional arguments that may be passed to the function |
This function returns the result as
percent |
values with the percentage sign (%) affixed. |
Data <- c(1.2, 0.5, 0.103, 7, 0.1501)
Percent(Data = Data, Type = "Frame") # Value, Frame
Data <- 1.2
Percent(Data = Data, Type = "Value") # Value, Frame
Percent(Data = sample, Type = "Frame") # Value, Frame
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.