Xor.segSet {GeneR}R Documentation

Xor for segments sets

Description

computes the eXclusive OR of two objects of class segSet a and b, i.e. returns segments which correspond to at least one part of a segment in one set but to nothing in the other set..

XorRecouvr returns segments .which correspond to at least one part of a segment of the envelope but to nothing in the segment set

Usage

Xor.segSet(a, b)
xorRecouvr(ranges,envel)

Arguments

a,b

elements of class segSet, or matrix nx2

ranges,envel

elements of class segSet, or matrices nx2

Value

an element of class segSet.

Author(s)

Antoine Lucas

See Also

globalSeg,not.globalSeg

Examples


a = matrix(c(1,5,15,45,17,38,
             100,120,130,140,
             135,145,142,160),
             ncol=2,byrow=TRUE)
b  = matrix(c(15,18, 28,45,
              1,10, 15,20, 25,40,
              17,23, 35,38,100,105,
              110,120),ncol=2,byrow=TRUE)

a <- as.segSet(a)
b <- as.segSet(b)

c = Xor(a,b)
par(mfrow=c(3,1))
plot(a,xlim=c(1,160),main="A")
plot(b,xlim=c(1,160),main="B")
plot(c,xlim=c(1,160),main="A Xor B")


## Another sample

a = matrix(c(1,30,40,50,60,70,80,110),ncol=2,byrow=TRUE)
b = matrix(c(1,10,20,30,40,70,80,90,100,110),ncol=2,byrow=TRUE)
a <- as.segSet(a)
b <- as.segSet(b)

c = Xor(a,b)
par(mfrow=c(3,1))
plot(a,xlim=c(1,160),main="A")
plot(b,xlim=c(1,160),main="B")
plot(c,xlim=c(1,160),main="A Xor B")

## Show all
c


[Package GeneR version 2.24.0 Index]