powered by
This function converts values in a dataframe to a fraction/percentage of the sum of their column.
relabund(counttable, percentage = FALSE)
Data frame of numeric values with rows as observations and columns as samples.
Should values be returned as a percentage? i.e multiplied by 100. Default is FALSE (as required for most IgA scoring approaches).
A data frame of the input data normalised by column (to sum to either 1 or 100).
# NOT RUN { taxcounts <- data.frame(Sample1=c(1,2,10,10),Sample2=c(3,10,5,1)) rownames(taxcounts) <- c("Taxon1","Taxon2","Taxon3","Taxon4") relabund(taxcounts) # }
Run the code above in your browser using DataLab