Learn R Programming

cem (version 1.1.31)

combine.spacegraphs: Combine two spacegraph objects.

Description

Combine two spacegraph objects so that their results can be plotted together. Both spacegraphs must be from the same dataset using the same distance metric.

Usage

combine.spacegraphs(x,y)

Value

val

an object of class spacegraph.

Arguments

x

a spacegraph object to be combined

y

a spacegraph object to be combined

Author

Richard Nielsen

Details

This allows users to combine two spacegraph objects rather than having to re-run the spacegraph command from the start.

Inputs must be created using spacegraph.

See Also

spacegraph

Examples

Run this code
# \donttest{
data(LL)
set.seed(123)
sp1 <- spacegraph("treated", LL, drop="re78", M=5,
                  R=list(cem=5,psm=5, mdm=0))

## Note that we must use the same L1 measure from the first spacegraph!
sp2 <- spacegraph("treated", LL, drop="re78", raw.profile=sp1$raw.profile,
                  R=list(cem=0,psm=0, mdm=5))

sp3 <- combine.spacegraphs(sp1,sp2)

plot(sp3)
# }

Run the code above in your browser using DataLab