Description Usage Arguments Examples
View source: R/convert_to_percentage.R
convert_to_percentage can convert a data frame to percentage.
1 | convert_to_percentage(df, row_sum = TRUE, hundred_percent = FALSE)
|
df |
A data frame. |
row_sum |
Default is TRUE. If row_sum == TRUE, then will take every value of a row and divide by the summary of this row, and apply this to every row. If row_sum == FALSE, then will take every value of a column and divide by the summary of this column, and apply this to every column. Total sum of the result is 1. |
hundred_percent |
Default is FALSE, if TRUE, turn value to 100 percent, total sum is 100. |
1 | convert_to_percentage(demo_dada2_result$seq_tab, row_sum = TRUE) %>% .[,1:5]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.