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

Data and design information #14

Closed
mbojan opened this issue Aug 26, 2017 · 1 comment
Closed

Data and design information #14

mbojan opened this issue Aug 26, 2017 · 1 comment

Comments

@mbojan
Copy link
Collaborator

mbojan commented Aug 26, 2017

My poking continues...

egor object has the data stored twice

  1. as the main tibble
  2. as part of the svydesign object in the attribute

Won't there be hiccups if both copies are not in sync for example if the user transforms the data (1)? As an example I look at egor:::subset.egor. It subsets (1), but keeps (2) unchanged, doesn't it.

@krivit
Copy link
Collaborator

krivit commented Aug 26, 2017

Some transformations are handled correctly, since [.egor passes many of them on to the design object. For example, if you do something like e[c(1,1,2,2),] it the survey object will turn into a cluster sample as it should.

On the other hand, other transformations might not be set correctly, and the whole thing is pretty untested, since no one working on this has had a chance to set the correct sampling information on any particular dataset.

krivit added a commit that referenced this issue Sep 13, 2020
* as_survey_design.egor() is gone.
* as_survey.egor() behaves the same as as_tibble.egor(), but returns a tbl_svy object (regardless of whether the egor has ego design).
* as_egos_df() has been added for consistency.
* as_(egos|alters|aaties)_survey() have been added, analogous to as_*_df() but returning a tbl_svy object.
* as_tibble.egor() is has been moved to conversions.R.
* as_tibble.egor() and as_survey.egor() are now documented in the same file as as_*_df() and as_*_survey().

References #14. Fixes #33, #53.
krivit added a commit that referenced this issue Sep 13, 2020
* as_survey_design.egor() is gone.
* as_survey.egor() behaves the same as as_tibble.egor(), but returns a tbl_svy object (regardless of whether the egor has ego design).
* as_egos_df() has been added for consistency.
* as_(egos|alters|aaties)_survey() have been added, analogous to as_*_df() but returning a tbl_svy object.
* as_tibble.egor() is has been moved to conversions.R.
* as_tibble.egor() and as_survey.egor() are now documented in the same file as as_*_df() and as_*_survey().

References #14. Fixes #33,#53.
krivit added a commit that referenced this issue Sep 13, 2020
* as_survey_design.egor() is gone.
* as_survey.egor() behaves the same as as_tibble.egor(), but returns a tbl_svy object (regardless of whether the egor has ego design).
* as_egos_df() has been added for consistency.
* as_(egos|alters|aaties)_survey() have been added, analogous to as_*_df() but returning a tbl_svy object.
* as_tibble.egor() is has been moved to conversions.R.
* as_tibble.egor() and as_survey.egor() are now documented in the same file as as_*_df() and as_*_survey().

References #14. Fixes #33. Fixes #53.
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

No branches or pull requests

3 participants