test dizinine dışında veri dosyasını kullanarak testthat: test1.r
dosyasındaR - Ben aşağıdakine benzer bir dosya ağacının bir paket test etmek <code>testthat</code> kullanıyorum
.
├── data
│ └── testhaplom.out
├── inst
│ └── test
│ ├── test1.r
│ ├── tmp_S7byVksGRI6Q
│ │ └── testm.desc
│ └── tmp_vBcIkMN1arbn
│ ├──testm.bin
│ └── testm.desc
├── R
│ ├── haplom.r
│ └── winIdx.r
└── tmp_eUG3Qb0PKuiN
└── testhaplom.hap2.desc
, ben data/testhaplom.out
dosyasını kullanmak gerekir Ben test_file(test1.r)
yaparsanız, aşağıda hatayı veren inst/test
dizine değiştirir ve veri dosyası göremiyorum ancak belirli bir işlev için giriş verileri:
...Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'data/testhaplom.out': No such file or directory