Hi, I'm trying to conduct a priori power analyses in RStudio using the semPower package and the following code. When I run it in a normal R file, there's absolutely no problem and I easily get the result of N = 403 Required Num Observations I'm looking for:
However, I would like to hand in my term paper as a RMarkdown file as it looks 'cleaner'. When I run the same code in RMarkdown, I only get the following output:
Please help me. What am I doing wrong? What do I have to change in order to receive the same clean output in the Markdown file? I'm rather new in working with R and English isn't my first language.
Thanks in advance for everyone who's willing to help!
The only thing I did after opening the Markdown file was installing and loading semPower, nothing else. So, besides that, the abovementioned code is everything I used within the R code chunk.
In the meantime, someone in a different forum actually recommended me to try/add this in my chunk:
do.call(rbind, SUP_CFA)
Worked like a charm. I'm honestly lacking the R skills to know what this code actually does and why it works, but it does work (or at least the output makes sense now) - so I guess that's good?