countChangesDataframe: Count won or lost values in comparison with those present in...

Description Usage Arguments Value Examples

View source: R/BNP_Dataframe.R

Description

Counts how many values were won or lost in comparison between dataframe. It measures ocurrences and then counts the values with sum.

Usage

1
countChangesDataframe(df, reference = "WT", axis = 2)

Arguments

df

dataframe with numeric values

reference

name of column to use as reference

Value

axis, axis to obtain new/lost values, see sum

Examples

 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

mar-esther23/boolnet-perturb documentation built on Jan. 14, 2019, 7:49 p.m.