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

> ### Name: OSDR
> ### Title: Finds an Optimal System of Distinct Representatives from a
> ###   family of subsets.
> ### Aliases: OSDR
> ### Keywords: ~order optimal matching ~incomplete matching
> 
> ### ** Examples
> 
> ### example 1
> # M is the list of 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)
> 
> OSDR(M)
stop at  3 ... 
backward until step  2 
stop at  4 ... 
Hall's condition not satisfied at step 4: T_4 dropped
$OSDR
[1] "A" "C" "B" "0" "D"

$matched
[1] 1 2 3 5

$unmatched
[1] 4

> 
> # $OSDR
> # [1] "A" "C" "B" "0" "D"
> # $matched
> # [1] 1 2 3 5
> # $unmatched
> # [1] 4
> 
> # job 4 unmatched so Hall's condition is not satisfied: it's impossible to fill all the jobs
> # note that there are (order-\emph{suboptimal}) assignments 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)
stop at  4 ... 
Hall's condition not satisfied at step 4: T_4 dropped
$OSDR
[1] "A" "C" "B" "0" "D"

$matched
[1] 1 2 3 5

$unmatched
[1] 4

> 
> # note there are other order optimal matchings: ACB0D or CAB0D 
> # note there are also other maximum size matchings (not order optimal):
> # e.g. 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 'optmatch' in library.dynam(lib, package, package.lib):
 DLL 'Rcpp' not found: maybe not installed for this architecture?
> 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