Skip to content

Give Mplus files unique IDs, and add cleanup argument#174

Merged
Kss2k merged 1 commit into
mainfrom
mplus-results-id
Jun 25, 2026
Merged

Give Mplus files unique IDs, and add cleanup argument#174
Kss2k merged 1 commit into
mainfrom
mplus-results-id

Conversation

@Kss2k

@Kss2k Kss2k commented Jun 25, 2026

Copy link
Copy Markdown
Owner

No description provided.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread R/utils.R

generateRandomCharId <- function(n = 36) {
chars <- c(letters, LETTERS, as.character(0:9))
paste0(sample(chars, size = n, replace = TRUE), collapse = "")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@Kss2k Kss2k merged commit 96f1469 into main Jun 25, 2026
6 checks passed
@Kss2k Kss2k deleted the mplus-results-id branch June 25, 2026 17:56
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

Successfully merging this pull request may close these issues.

1 participant