Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runAnalysis csv file location #18

Open
AlexanderLyNL opened this issue May 11, 2021 · 1 comment · May be fixed by #26
Open

runAnalysis csv file location #18

AlexanderLyNL opened this issue May 11, 2021 · 1 comment · May be fixed by #26
Assignees

Comments

@AlexanderLyNL
Copy link

jaspTools v 1.4.2

When making the unit test for reliability (jasp-stats/jaspReliability#27) I noticed that it doesn't search for the csv file in the subfolder

 /tests/testthat/

anymore. This used to be the case. In R it's a bit of a nuisance to get enter the whole path. Would it be possible to include the subfolder in the search ptah when running runAnalysis?

options <- analysisOptions("reliabilityUniDimFrequentist")
options$omegaScale <- TRUE
options$alphaScale <- TRUE
options$lambda2Scale <- TRUE
options$lambda6Scale <- TRUE
options$meanScale <- TRUE
options$omegaItem <- TRUE
options$alphaItem <- TRUE
options$lambda2Item <- TRUE
options$lambda6Item <- TRUE
options$itemRestCor <- TRUE
options$itemMean <- TRUE
options$itemSd <- TRUE
options$omegaAnalytic <- TRUE

options$variables <- c(paste("Question", c(1, 4:8), sep="_0"), paste("Question", 10, sep="_"))
set.seed(1)
results <- jaspTools::runAnalysis("reliabilityUniDimFrequentist", 
                                  paste0(packagePath, "/tests/testthat/Reliability.csv"), options)
@TimKDJ
Copy link
Contributor

TimKDJ commented May 12, 2021

jaspTools doesn't actually look in the modules for datasets. What happens instead is that it checks if Reliability.csv is an existing file in the working directory; this is the case when run throughtestAll() or testAnalysis() because testthat sets the working directory to module/tests/testthat. It will not work when run outside of testthat (unless you change the working directory to the testthat folder); I agree that it would be nice if jaspTools searched for datasets in the modules too.

@TimKDJ TimKDJ self-assigned this May 12, 2021
TimKDJ added a commit to TimKDJ/jaspTools that referenced this issue Dec 21, 2021
…sets

- Deprecates setPkgOption("module.dirs") in favour of monitor()
- Introduces setPkgOption("install.deps")
- Looks for datasets also in modules (fixes jasp-stats#18)
@vandenman vandenman self-assigned this Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants