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

Manage double-dot environments #60

Merged
merged 4 commits into from
Oct 3, 2020
Merged

Manage double-dot environments #60

merged 4 commits into from
Oct 3, 2020

Conversation

assignUser
Copy link
Collaborator

@assignUser assignUser commented Oct 3, 2020

So the issue with #59 and with the errors in the documentation I mentioned somewhere was that previously we used parent.frame() WITHIN simstudy. Due to the way environments work, if the ..var was not assigned in an environment upstream from simstudy e.g. the global environment we had no chance to finde the variable.

I add an envir argument to the functions that are used to generate data:

  • addCorFlex
  • addColumns
  • addCondition
  • genData
    And of course all internal functions used by those. This allows for use of double-dot vars in mcapply and other situations with nested/different environments.

Let me know what you think!

(It was easier then expected if this works correclty :D )

@assignUser
Copy link
Collaborator Author

@kgoldfeld I just found a very cool feature of pkgdown that allows to have a site for the released version: https://kgoldfeld.github.io/simstudy/ and one for the dev version: https://kgoldfeld.github.io/simstudy/dev/
which is automatically decided by checking version number e.g. 0.2.0 -> release 0.1.16.9000 -> dev.
I think this is pretty cool and would like to use it, what do you think?

@kgoldfeld
Copy link
Owner

The double-dot functionality is really cool, and works within functions, and by extension with lapply and mclapply. I think I can draft the vignette now.

@kgoldfeld
Copy link
Owner

And yes - let's definitely have the two versions of the website - one for release, and one for development.

@kgoldfeld kgoldfeld merged commit 4e9ff6f into main Oct 3, 2020
@assignUser assignUser deleted the assignUser/issue41 branch October 3, 2020 14:59
@assignUser assignUser added the feature feature request or enhancement label Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants