subset.connectedness {connectedness} | R Documentation |
subset.connectedness
helps you to subset data based on
disconnected sets.
subset.connectedness(x, data, set=NULL, ...)
x |
connectedness, output from connectedness |
data |
data.frame, data |
set |
integer, set number(s), see details |
... |
argument passed to subset.data.frame |
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
.
Data.frame with records that correspond to defined sets in
set
.
Gregor Gorjanc
connectedness
, levelsBySet
and
plot.connectedness
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)