-
Notifications
You must be signed in to change notification settings - Fork 990
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
Extend functionality of nafill to use 'fill' argument for all 'type's #3594
Comments
Thanks. For now the you can use nafill(nafill(x = c(NA,1,NA,NA,5,3,NA,0), type = "locf"), fill = -1) |
@jangorecki if no one else is working on this, can I take it up ? |
@saraswatmks I just assigned you, go for it! |
@saraswatmks note that nafill tests are in |
@MichaelChirico thanks! I see this function is still in dev. How do I reproduce it on my local machine ? My local master is up to date with remote. If I do
|
@saraswatmks I found that when working with RStudio features like Clean and Rebuild it was actually resulting into more time wasted into debugging issues than it helped. Although for package where no compile code was present it was much more reliable. Anyway, I suggest to use |
@saraswatmks regarding your installation error:
I just came across the same issue on my new laptop. It appears something in the installation of Developer Tools was mixed up. Found this comment on another repo: catboost/catboost#137 (comment) And it worked on my machine. Hope it can help. |
related issue #3700 |
Just happened on a use case for this playing around with COVID data 😃
I want to fill the initial missing values with
|
AFAIR |
* nafill rework for more robust coerce * initial change for #4101 * nafill simple fill coerce * nafill const works for locf and nocb as well, closes #3594 * fix tests for #4101 * coverage * placeholder for nafill #3992 * use coerceAs in froll * enable disabled test * nafill retain names, tests for fill list * coerceAs gets copyArg so now can return its input * better control of verbose, and better find class for coerceAs * proper verbose to int * verbose changes coverage * rm unused anymore * more precise verbose arg check * memrecycle escape warnings and simple verbose for numcol==0 * coerceAs does not emit extra warning anymore * coerceAs verbose, more tests * use older nanotime api * update error msg * coverage * codecov of coerceAs * catch all verbose * Revert "initial change for #4101" This reverts commit 1fa2069. * Revert "fix tests for #4101" This reverts commit cc2cc0e. * use coerceAs in fcast.c * restore actual fix * ws * incomplete merge * vestigial bad merge * minimize diff * coerceAs throws warning for string->double, and errors on list * comment * example without warning * bad NEWS merge * warning is still needed --------- Co-authored-by: jangorecki <[email protected]> Co-authored-by: Michael Chirico <[email protected]>
Suppose I have this vector
and I want to fill NAs with the preceding non NA values. I can do this
Great, but sometimes I want to specify a fill value to catch the NA(s) at the front of the vector. I tried this which seemed obvious to me,
but it didn't work and instead gave a warning, "argument 'fill' ignored, only make sense for type='const'".
My request is to extend the method so that 'fill' is applied to the front/back of the vector for types 'locf' and 'nocb' respectively. Thanks
Output of
sessionInfo()
The text was updated successfully, but these errors were encountered: