Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

File Path too Long?

24 views
Skip to first unread message

Seungju Kim

unread,
Sep 20, 2024, 5:41:18 PM9/20/24
to MplusAutomation
Hello everyone, 
This is not a serious issue, yet one that I imagine many folks run into at one point. 

I use the here() function in R so that I can output files into smaller folders when running multiple models. This quickly raises issues of when file path can be greater than 90 characters. 
I wanted to ask how we can combat this WITHOUT moving the analyses closer to a root folder (that is a shorter file path).

Are there any functions or methods to resolve this issue? I can't believe Mplus doesn't do >90 character file paths.

michael.hallquist

unread,
Oct 5, 2024, 9:10:49 AM10/5/24
to MplusAutomation
Hi there,

You can use longer file paths for your data file by 1) quoting the file name and 2) breaking the path across lines (at the < 90-character mark) and not having any spaces on subsequent lines. This is what prepareMplusData does in the package, so you can also use that to handle long paths.

Here's an example of a setup that works.

Best,
Michael

TITLE:
MCFA CROSS-LOAD
DATA:
FILE = "~/Data_Analysis/Momentum/momentum_collab/code/ema/analysis/mplus_fa/
mcfa_cross1_bayes.dat";
 
Reply all
Reply to author
Forward
0 new messages