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

unlist varsYZ for compatibility with upcoming data.table #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tdhock
Copy link

@tdhock tdhock commented Apr 11, 2024

Hi @djhurio @JBreidaks
I see that vardpoor uses data.table::melt, which has slightly different behavior in the next planned release (currently on github only).
Using data.table from github master, we get an error when running vardpoor examples, Rdatatable/data.table#6071
To fix that error, please accept this PR (which should work with both the current version of data.table on CRAN, and on github).
After merging the PR, please submit an update to CRAN.
Thanks!

@djhurio
Copy link
Contributor

djhurio commented Apr 11, 2024

Dear @tdhock,
I am not working at the CSBLatvia any more. Neither is @JBreidaks.
I believe somebody from the CSBLatvia will respond on this.

@tdhock
Copy link
Author

tdhock commented Apr 11, 2024

Thanks for the quick response Mārtiņš !
I see you are still the CRAN maintainer, https://cloud.r-project.org/web/packages/vardpoor/
so if you no longer want to maintain vardpoor, it would be good if you could please find another maintainer, and ask them to submit the new version with their email as new maintainer to CRAN (and you will have to confirm to CRAN the change of maintainer).

@djhurio
Copy link
Contributor

djhurio commented Apr 12, 2024

I have delegated the maintenance of the package to @jvoronova (@jvoronova - is it correct?).
However, I don't own the e-mail address <martins.liberts at csb.gov.lv> any more. I believe it should have been deleted long time ago. I am not sure how can I confirm the change of maintainer in this case.

@tdhock
Copy link
Author

tdhock commented Apr 12, 2024

Thanks for the info! I think CRAN will accept a confirmation email from your new address.

Comment on lines 626 to +628
varsYZ <- list(namesY)
if (!is.null(namesZ)) varsYZ <- list(namesY, namesZ)
if (length(varsYZ)==1) varsYZ <- unlist(varsYZ)

Choose a reason for hiding this comment

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

Suggested change
varsYZ <- list(namesY)
if (!is.null(namesZ)) varsYZ <- list(namesY, namesZ)
if (length(varsYZ)==1) varsYZ <- unlist(varsYZ)
varsYZ <- if (is.null(namesZ)) namesY else list(namesY, namesZ)

Comment on lines 732 to 733
varsYZ <- list(namesY1)
if (!is.null(namesZ1) & !linratio) varsYZ <- list(namesY1, namesZ1)

Choose a reason for hiding this comment

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

Suggested change
varsYZ <- list(namesY1)
if (!is.null(namesZ1) & !linratio) varsYZ <- list(namesY1, namesZ1)
varsYZ <- if (is.null(namesZ1) || linratio) namesY1 else list(namesY1, namesZ1)

@@ -731,7 +731,7 @@ vardcros <- function(Y, H, PSU, w_final,
keyby = namesperc, .SDcols = namesY2]
varsYZ <- list(namesY1)
if (!is.null(namesZ1) & !linratio) varsYZ <- list(namesY1, namesZ1)

if (length(varsYZ)==1) varsYZ <- unlist(varsYZ)

Choose a reason for hiding this comment

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

Suggested change
if (length(varsYZ)==1) varsYZ <- unlist(varsYZ)

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.

3 participants