Give Mplus files unique IDs, and add cleanup argument#174
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 111f13be7e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| generateRandomCharId <- function(n = 36) { | ||
| chars <- c(letters, LETTERS, as.character(0:9)) | ||
| paste0(sample(chars, size = n, replace = TRUE), collapse = "") |
There was a problem hiding this comment.
Preserve the user's RNG state when generating filenames
Because modsem_mplus() now calls this helper on every fit, sample() advances .Random.seed just to choose a scratch filename. In workflows that set a seed before fitting an Mplus model and then run simulations or Monte Carlo standardization afterward, the post-fit random draws silently change even though the model fit itself did not previously consume R RNG state; use a non-RNG temp name or restore the RNG state around this call.
Useful? React with 👍 / 👎.
No description provided.