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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: mmcm.resamp
> ### Title: The permuted modified maximum contrast method
> ### Aliases: mmcm.resamp
> ### Keywords: htest
> 
> ### ** Examples
> 
> OpenMPController::omp_set_num_threads(2)
[[1]]
[1] 2

> 
> ## Example 1 ##
> #  true response pattern: dominant model c=(1, 1, -2)
> set.seed(136885)
> x <- c(
+   rnorm(130, mean =  1 / 6, sd = 1),
+   rnorm( 90, mean =  1 / 6, sd = 1),
+   rnorm( 10, mean = -2 / 6, sd = 1)
+ )
> g <- rep(1:3, c(130, 90, 10))
> boxplot(
+   x ~ g,
+   width = c(length(g[g==1]), length(g[g==2]), length(g[g==3])),
+   main  = "Dominant model (sample data)",
+   xlab  = "Genotype", ylab="PK parameter"
+ )
> 
> # coefficient matrix
> # c_1: additive, c_2: recessive, c_3: dominant
> contrast <- rbind(
+   c(-1, 0, 1), c(-2, 1, 1), c(-1, -1, 2)
+ )
> y <- mmcm.resamp(x, g, contrast, nsample = 20000, abseps = 0.01, seed = 5784324)
> y

	Permuted modified maximum contrast method

data:  'x' by group 'g' with contrast coefficient matrix 'contrast'
Permuted modified maximum contrast statistic = 0.53389, p-value =
0.04672
alternative hypothesis: two.sided

Maximum contrast coefficient vector = (-1, -1, 2), index = 3

Estimated absolute error of P-value = 0.009998037
Status messages of P-value calculation = Normal Completion

> 
> ## Example 2 ##
> #  for dataframe
> #  true response pattern: pos = 1 dominant  model c=( 1,  1, -2)
> #                               2 additive  model c=(-1,  0,  1)
> #                               3 recessive model c=( 2, -1, -1)
> set.seed(3872435)
> x <- c(
+   rnorm(130, mean =  1 / 6, sd = 1),
+   rnorm( 90, mean =  1 / 6, sd = 1),
+   rnorm( 10, mean = -2 / 6, sd = 1),
+   rnorm(130, mean = -1 / 4, sd = 1),
+   rnorm( 90, mean =  0 / 4, sd = 1),
+   rnorm( 10, mean =  1 / 4, sd = 1),
+   rnorm(130, mean =  2 / 6, sd = 1),
+   rnorm( 90, mean = -1 / 6, sd = 1),
+   rnorm( 10, mean = -1 / 6, sd = 1)
+ )
> g   <- rep(rep(1:3, c(130, 90, 10)), 3)
> pos <- rep(c("rsXXXX", "rsYYYY", "rsZZZZ"), each=230)
> xx  <- data.frame(pos = pos, x = x, g = g)
> 
> # coefficient matrix
> # c_1: additive, c_2: recessive, c_3: dominant
> contrast <- rbind(
+   c(-1, 0, 1), c(-2, 1, 1), c(-1, -1, 2)
+ )
> 
> mmcmtapply <- function(r) {
+   mmcm.resamp(
+     xx$x[xx$pos==r[1]], xx$g[xx$pos==r[1]],
+     contrast, nsample = 10000, abseps = 0.01, seed = 5784324+as.numeric(r[1])
+   )
+ }
> y <- tapply(xx$pos, xx$pos, mmcmtapply)
Warning in mmcm.resamp(xx$x[xx$pos == r[1]], xx$g[xx$pos == r[1]], contrast,  :
  NAs introduced by coercion
Error in set.seed(seed) : supplied seed is not a valid integer
Calls: tapply -> lapply -> FUN -> mmcm.resamp -> set.seed
Execution halted