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

Issues with replace_na() in tidyr v1.2.0 #68

Closed
ArturoEsquerra opened this issue Feb 2, 2022 · 4 comments
Closed

Issues with replace_na() in tidyr v1.2.0 #68

ArturoEsquerra opened this issue Feb 2, 2022 · 4 comments

Comments

@ArturoEsquerra
Copy link

ArturoEsquerra commented Feb 2, 2022

Hi everyone!

We just noticed that a change in the newly released version of tidyr (v1.2.0) causes a problem with augsynth().

Specifically, in the new version of tidyr, the replace_na() function no longer allows the type of data to change (more info on this change can be found here). Therefore, replacing NA's of the integer column trt_time with Inf through the line: mutate(trt_time = replace_na(trt_time, Inf)) makes the code crash as replace_na() can't no longer convert from double to integer.

Best.
Arturo

@ebenmichael
Copy link
Owner

Thanks for catching this! Can you link to the relevant line? Would it fix things to make sure that the treatment time is a double?

@ArturoEsquerra
Copy link
Author

Thanks for the quick reply! Matching the data types of trt_time and the replacement value should fix the issue.

I believe that the that the affected lines are:

  1. Line 61 of augsynth_pre.R
  2. Line 104 of format.R (potentially line 156 of the same .R file as well)

@idg23
Copy link

idg23 commented Mar 23, 2022

Is this issue solved? Thanks in advance!

@ebenmichael
Copy link
Owner

Sorry for the delay here, this should be fixed now!

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