myPO <- function(x){
lx <- L(x)
rx <- R(x)
n <- length(lx)
out <- rep(-2, n)
out[lx > rx] <- 2
return(out)
}
xx <- rnorm(20)
yy <- xx + runif(20,-0.1,0.1)
pe <- new.pim.env(environment(), compare = "unique",
vars = c("xx","yy"))
new.pim.formula(myPO(yy) ~ L(xx) - R(xx), pe)
returns :