statistikat / simPop

Simulation of Synthetic Populations for Survey Data Considering Auxiliary Information
30 stars 7 forks source link

simRelation implementation error ($ operator) #8

Closed aastha-shah closed 3 years ago

aastha-shah commented 3 years ago

Hello, I just came across your library and I was trying to run a few examples. After a successful installation, I found that the simRelation example, as listed here raises an Error: $ operator is invalid for atomic vectors, resulting in the relevant columns in ghanaP@pop@data being absent. Any insight would be helpful. Apologies if I'm going by the wrong version of the docs, I believe the man pages on this repo have the same code for this function.

matthias-da commented 3 years ago

Thank you for pointing this out. A quick and dirty solution (only tested for this case) is already implemented.

Please install the newest version

devtools::install_github("statistikat/simPop")

Best Matthias

aastha-shah commented 3 years ago

Hi, unfortunately, I still get the same error despite having all other packages up to date. Could it be a R or RStudio issue?

manab-prakash commented 3 years ago

unfortunately, I still get the same error.

matthias-da commented 3 years ago

Originally this function was implemented by Andreas Alfons from Rotterdam (you may also contact him), and updated and rewritten by Bernhard. I assigned him to this issue. Best, Matthias

bernhard-da commented 3 years ago

hi @manab-prakash could you please try, if https://github.com/statistikat/simPop/commit/c711b8c142bcff34341f5e4413bcd3c74a586e31 fixes this? you can install the dev-branch with

remotes::install_github("statistikat/simPop", ref = "fix-issue-8")

and try the same example as reported.

manab-prakash commented 3 years ago

@bernhard-da I tested it. It now works as expected. Thank you !!! and Cheers!!!

bernhard-da commented 3 years ago

hi, thx for confirming that the fix works; merged into master and will be in the next cran version;