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

floor not working for few values in round_any() #291

Open
herambgadgil opened this issue Oct 24, 2018 · 0 comments
Open

floor not working for few values in round_any() #291

herambgadgil opened this issue Oct 24, 2018 · 0 comments

Comments

@herambgadgil
Copy link

herambgadgil commented Oct 24, 2018

Greetings,

I am using round_any() function in one of my projects and few values are getting incorrectly floored.

test_var <- unlist(
                     lapply(
                         seq(1000, 10000, 10), function(x) plyr::round_any(x / 1000, accuracy = 0.01, f = floor)
                               )
                      )

check_var <- test_var[duplicated(test_var)] 

test_df <- data.frame(Original_Ser = seq(1000, 10000, 10), Trunc2Deci_Result = test_var, 
                                   Dups_Tag = duplicated(test_var)
                                  )

Ideally there should not be any duplicates as I am increasing the input by 10. But I am getting 76 duplicates. I did not observe any pattern for these duplicates.

Thanks!
Heramb

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

1 participant