subset.connectedness {connectedness}R Documentation

Subset disconnected sets

Description

subset.connectedness helps you to subset data based on disconnected sets.

Usage

subset.connectedness(x, data, set=NULL, ...)

Arguments

x connectedness, output from connectedness
data data.frame, data
set integer, set number(s), see details
... argument passed to subset.data.frame

Details

set defines which sets of records will stay in output of this function. If set=NULL "all" records will be returned. If there were any NA's in call of connectedness not exactly all reccords will be returned here because connectedness excludes records with NA's (subject to change/improve in future).

If subset slot is NULL, the following error is issued "subset slot NULL". This is due to use of argument subset=FALSE in connectedness.

Value

Data.frame with records that correspond to defined sets in set.

Author(s)

Gregor Gorjanc

See Also

connectedness, levelsBySet and plot.connectedness

Examples


data(connect)
table(connect$group, connect$season)
tmp <- connectedness(x=connect$group, y=connect$season)

## Subset method
subset(x=tmp, data=connect, set=1)
subset(x=tmp, data=connect, set=2)
subset(x=tmp, data=connect, set=c(1, 2))
subset(x=tmp, data=connect)


[Package connectedness version 0.2 Index]