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

> ### Name: sim.phe
> ### Title: Simulation for phenotypes (SimPhe main process)
> ### Aliases: sim.phe
> 
> ### ** Examples
> 
> #### file path of example
> # simulation parameters:
> fpar.path <- system.file("extdata", "simupars.txt", package="SimPhe")
> 
> # genotype file: rows are individuals and columns are SNPs
> fgeno.path <- system.file("extdata", "10SNP.txt", package="SimPhe")
> 
> 
> #### instead of a parameter file, prepared list like genepars also works
> genepars
$P1mean
  mean
1   10

$P1main
    SNP additive dominance
1 SNP01      4.0       2.0
2 SNP02      2.5       1.5
3 SNP03      5.5       1.8
4 SNP04     -2.5       1.0
5 SNP05      8.5       9.8
6 SNP06      8.7       8.4

$P1epistasis
   SNPA  SNPB additive_additive additive_dominance dominance_additive
1 SNP01 SNP02              10.0                2.0                2.8
2 SNP03 SNP04               8.0                3.0                3.5
3 SNP05 SNP06              20.5               20.6               20.4
  dominance_dominance
1                 1.8
2                 2.5
3                10.2

$P1heritability
  heritability
1          0.6

$P2mean
  mean
1   20

$P2main
    SNP additive dominance
1 SNP01      8.0       2.0
2 SNP02      4.5       1.8
3 SNP03      6.5       1.5
4 SNP04     -3.5      -1.2
5 SNP07     10.4       8.6
6 SNP08     12.3      11.9

$P2epistasis
   SNPA  SNPB additive_additive additive_dominance dominance_additive
1 SNP01 SNP02              15.0                4.0                3.0
2 SNP03 SNP04              12.0                5.0                3.5
3 SNP07 SNP08              21.5               20.9               20.5
  dominance_dominance
1                 2.0
2                 2.5
3                20.3

> 
> 
> #### simulate phenotype(s)
> phe <- sim.phe(sim.pars = fpar.path, fgeno = fgeno.path, ftype = "snp.head", fwrite = FALSE)
Warning in readLines(file.new) :
  line 1 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 2 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 3 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 4 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 5 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 6 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 7 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 8 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 9 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 10 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 11 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 12 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 13 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 14 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 15 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 16 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 17 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 18 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 19 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 20 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 21 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 22 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 23 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 24 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 25 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 26 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 27 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 28 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 29 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 30 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 31 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 32 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 33 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 34 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 35 appears to contain an embedded nul
Warning in readLines(file.new) :
  line 36 appears to contain an embedded nul
Warning in grep("^\\[", all.lines) :
  unable to translate '<f6>[' to a wide string
Warning in grep("^\\[", all.lines) : input string 1 is invalid
Error in matrix(unlist(sapply(regmatches(x, gregexpr(pattern, x)), function(e) regmatches(e,  : 
  'data' must be of a vector type, was 'NULL'
Calls: sim.phe -> read.simu.pars -> regextract -> matrix
Execution halted