Description Usage Arguments Value Examples
View source: R/BNP_Dataframe.R
Counts how many values were won or lost in comparison between dataframe. It measures ocurrences and then counts the values with sum.
1 | countChangesDataframe(df, reference = "WT", axis = 2)
|
df |
dataframe with numeric values |
reference |
name of column to use as reference |
axis, axis to obtain new/lost values, see sum
1 2 3 4 5 6 7 8 9 10 | df <- data.frame(WT=c(1,2,0,0), a=c(1,2,0,0),
b=c(0,2,1,0), c=c(1,0,3,1))
countChangesDataframe(df)
# WT a b c
# new 0 0 1 2
# lost 0 0 1 1
countChangesDataframe(df, axis=1)
# WT a b c
# new 0 0 2 1
# lost 1 1 0 0
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.