FloSchuberth / cSEM

Composite-based SEM
https://floschuberth.github.io/cSEM/
GNU General Public License v3.0
28 stars 8 forks source link

foreach #65

Closed FloSchuberth closed 6 years ago

FloSchuberth commented 6 years ago

Currently csem does not work with foreach. It does not find the model even if I provide it via .export. I think it has sth to do with storing the arguement and use the eval command...

FloSchuberth commented 6 years ago

Here is the problem with a potential solution, but not very nice: https://stackoverflow.com/questions/19651274/doparallel-foreach-scoping-issue-error-in-evalexpr-envir-enclos-could-not

FloSchuberth commented 6 years ago

Perhaps the solution is to avoid the val command and use get or a similar command.

M-E-Rademaker commented 6 years ago

yes, get() could work

M-E-Rademaker commented 6 years ago

@FloSchuberth can you test my recent commit using foreach? I hope that fixes the problem, although apparently the eval(print(text = "")) construct i used is not always optimal (see e.g., this stackoverflow discussion). But i guess we can worry about that some other time..