Learn R Programming

hierformR (version 0.1.0)

csf: Determine class-stability factor (CSF)

Description

Determine class-stability factor (CSF)

Usage

csf(df)

Arguments

df
either a two-column dataframe of winners and losers or a dataframe produced by `addstates` with columns winner, loser, id and class

Value

a named vector of state ids with the CSF for all link numbers

Examples

Run this code
df<-data.frame(winner=c(1,2,3,1,2,3,2,1,2,3,3,1,2,3,4,3,1,3,2,1,1,1,1,2,2),
loser=c(2,4,4,4,3,2,1,3,3,4,4,2,3,2,3,4,2,4,3,3,3,2,2,4,3)
)
csf(df)

csf(addstates(wldf()))

Run the code above in your browser using DataLab