Skip to content

Commit

Permalink
test margin
Browse files Browse the repository at this point in the history
  • Loading branch information
yeguanhuav committed May 30, 2019
1 parent 6d63a17 commit 1dc3cf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/convert_to_percentage.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' convert_to_percentage(demo_dada2_result$seq_tab, row_sum = TRUE) %>% .[,1:5]

convert_to_percentage <- function(df, row_sum = TRUE) {
# df must be data frame only contain numeric
# df must be data frame only contain numeric-----------------------------------------------------------
if (row_sum) {
# 将df中每一行求和,然后用每一行中的每一个数字除以行和
df <- sweep(df, 1, rowSums(df), '/')
Expand Down

0 comments on commit 1dc3cf2

Please sign in to comment.