Running examples in ‘OSDR-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: OSDR
> ### Title: Finds an Optimal System of Distinct Representatives for a family
> ###   of subsets.
> ### Aliases: OSDR
> ### Keywords: ~order optimal matching ~incomplete matching
> 
> ### ** Examples
> 
> # example 1
> # M is a family of feasible representatives (suitable applicants) for five jobs
> M1 <- c("A" , "B")
> M2 <- c("B" , "C")
> M3 <- c("B")
> M4 <- c("A" , "C")
> M5 <- c("B" , "C" , "D")
> M  <- list(M1 , M2 , M3 , M4 , M5)
> M
[[1]]
[1] "A" "B"

[[2]]
[1] "B" "C"

[[3]]
[1] "B"

[[4]]
[1] "A" "C"

[[5]]
[1] "B" "C" "D"

> 
> OSDR(M)
SDR[ 3 ]= BHall's condition not satisfied at step 4: T_4 dropped
$matching
[1] 1 2 3 5

$OSDR
[1] "A" "C" "B" "D"

$unmatched
[1] 4

> 
> # job 4 unmatched so Hall's condition is not satisfied: it's impossible to fill all the jobs
> # note that it is possible an order-suboptimal assignment of the same length of the optimal, 
> # eg: 0CBAD , BC0AD
> 
> # example 2: sligthly modified: more than one order optimal matching
> M1<-c("A","B","C")
> M2<-c("A","C")
> M3<-c("B")
> M4<-c("A","C")
> M5<-c("A","D")
> M  <-list(M1,M2,M3,M4,M5)
> 
> OSDR(M)
Hall's condition not satisfied at step 4: T_4 dropped
$matching
[1] 1 2 3 5

$OSDR
[1] "A" "C" "B" "D"

$unmatched
[1] 4

> # note that there are other maximum size matchings 
> # e.g. opt = ACB0D or CAB0D  and subopt = 0CBAD or BC0AD
> 
> # case study: matching men and women executives
> # load executive data  
> data(exdata)
> 
> # descriptives on:
> # sex(0=M; 1=F) ;
> # position (4=top manager, 3=medium/first line manager, 2 =supervisor);
> table(exdata$sex)# there are more women

 0  1 
11 16 
> table(exdata$position,exdata$sex)# and more in apical position
   
    0 1
  2 2 4
  3 5 9
  4 4 3
> 
> # order by matching priority (high-rank women first)
> # see e.g. Lynn and Thompson(1997), J. of Appl. Psych. 82(3))
> data <- exdata[order(-exdata$sex,-exdata$position, -exdata$seniority),] 
> 
> # covariate distance matrix
> require(optmatch)
Loading required package: optmatch
Loading required package: survival
Error: package or namespace load failed for ‘survival’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/lattice/libs/lattice.so':
  /home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/lattice/libs/lattice.so: failed to map segment from shared object
Failed with error:  ‘package ‘survival’ could not be loaded’
> dist <- match_on(sex ~ position+education+year_born+contract+part_fulltime+seniority ,
+ data=exdata) 
Error in match_on(sex ~ position + education + year_born + contract +  : 
  could not find function "match_on"
Execution halted