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

ds_plot #20

Closed
carly-n-hobbes opened this issue Apr 16, 2021 · 3 comments
Closed

ds_plot #20

carly-n-hobbes opened this issue Apr 16, 2021 · 3 comments

Comments

@carly-n-hobbes
Copy link

When selecting the "ds_plot" option in render_report_manual, the plots don't show up - just a blank page - but there's no error message on the page or in the console other than something about the factor score file:


> In readLines(file, n = thisblock) :
>   incomplete final line found on '/Users/carolinetubbs/Box/Peru/Data/Full/Analysis/Factor Analysis/Final models/CSRL/csrl_fscores.csv'

@psanker
Copy link
Member

psanker commented Apr 16, 2021

Open Terminal (/Applications/Utilities/Terminal.app), run this:

tail "/Users/carolinetubbs/Box/Peru/Data/Full/Analysis/Factor Analysis/Final models/CSRL/csrl_fscores.csv" | cat -ve

and comment with what it returns. I'm guessing there's a missing newline character.

@littlehifive
Copy link
Collaborator

It is a warning from MplusAutomation. My guess is that it's trying to extract the section where you specified file = csrl_fscores.csv or Save file csrl_fscores.csvand that line is missing an end of line marker (e.g. see here).

This occurs whenever the factor scores are exported, but I am not sure if we could do anything about it. Since it doesn't affect our results/plots in anyways, I'd just ignore it.

ps. The label on the plot is not showing the wave tags because of there is also strict requirement of the naming of the model files. Change CSRL_cfa_1c_fsamp.out to CSRL1_cfa_1c_fsamp.out will solve the problem. The code is extracting the numbers after the construct name in the file name. \\2 finds the second bracket \\d+, which is used as a wave tag such that it shows things like "T1: 0.102" in the plot.

wave = paste("T", 
                        gsub("^([a-zA-Z]+)(\\d+)(.*)$", "\\2", model), 
                        ": ",  sep = "")

@littlehifive
Copy link
Collaborator

I added the above comment here.

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

No branches or pull requests

3 participants