normalizePath error after creating github repository in Rstudio, using subdirectories in my analysis?


I'm struggling my way through coding a function in R to run a simulation. I recently found out about how github repositories work and the ability to view old version as I continue to develop my simulation function. I just installed a github repository in Rstudio and have run into an issue that I can't seem to find a solution to. I'd prefer to keep my files organized and have stored analyses i'm running in Mplus in a subdirectory. When I went to run the runModels command(part of MplusAutomation package) I got an error.

runModels(target = "C:/Users/gitz1/Desktop/smallsamplebayesian/mplusinp/",
#issue with filefilter as of 1.2.2021
filefilter = "threeitemML.inp",
showOutput = F,

The error I get when running this is:

Running model: threeitemML.inp
System command: C:\WINDOWS\system32\cmd.exe /c cd "C:\Users\gitz1\Desktop\smallsamplebayesian" && "Mplus" "threeitemML.inp"
Warning message:
In normalizePath(path.expand(path), winslash, mustWork) :
path[1]="threeitemML.inp": The system cannot find the file specified

I figured out that if I moved the "threeitemML.inp", to the respository folder ""C:/Users/gitz1/Desktop/smallsamplebayesian/" I had no issue.

Is it easier to just work out of one respository and not use subfolders? Is there an easy way to work out of subfolders when I have a function wrapped about this that will specifically call files out of the subfolder?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.