michaelhallquist / MplusAutomation

The MplusAutomation package leverages the flexibility of the R language to automate latent variable model estimation and interpretation using Mplus, a powerful latent variable modeling program developed by Muthen and Muthen (www.statmodel.com). Specifically, MplusAutomation provides routines for creating related groups of models, running batches of models, and extracting and tabulating model parameters and fit statistics.
84 stars 46 forks source link

First step for fixing CRAN errors #166

Closed cjvanlissa closed 2 years ago

cjvanlissa commented 2 years ago

Dear @michaelhallquist and @JWiley ,

I made a first effort to address the CRAN checks, but still need your help finishing it.

What I've done is downloaded all of the files from statmodel.com required for the tests, and put them in two locations: inst/extdata, and tests/testthat. The tests work when run interactively using testthat::test_file(), but not when run through RStudio/devtools check().

However, I consistently get the following errors, indicating that the files are not found:

-- Warning (test-cfasem.R:7:3): Mplus User Guide 5.1 - CFA with continuous indicators results can be read in --
path[1]="ex5_1.out": The system cannot find the file specified
Backtrace:
 1. MplusAutomation::readModels(target = testthat::test_path("ex5_1.out")) test-cfasem.R:7:2
 2. MplusAutomation:::getOutFileList(target, recursive, filefilter)
 5. base::normalizePath(target)
-- Warning (test-cfasem.R:15:3): Mplus User Guide 5.2 - CFA with categorical indicators results can be read in --
path[1]="testthat/ex5.2.out": The system cannot find the path specified
Backtrace:
 1. MplusAutomation::readModels(target = testthat::test_path("testthat/ex5.2.out")) test-cfasem.R:15:2
 2. MplusAutomation:::getOutFileList(target, recursive, filefilter)
 5. base::normalizePath(target)