-
Notifications
You must be signed in to change notification settings - Fork 0
equivalent integers and floats don't get the same key #25
Copy link
Copy link
Open
Labels
questionFurther information is requestedFurther information is requested
Description
R creates floats by default when using single numbers, but integers when using the range notation 1:3.
This creates unexpected behaviour:
library(noah)
ark <- Ark$new(parts = list(
foo = c("one", "two", "three"),
bar = c("fi", "fa", "fu")
))
max_total <- 9
ark$pseudonymize(1:5)
#> [1] "Two Fi" "Three Fi" "Two Fu" "Three Fa" "One Fi"
ark$pseudonymize(5L) # gets theexisting pseudonym for 5
#> [1] "One Fi"
ark$pseudonymize(5) # gets new pseudonym
#> [1] "Three Fu"
print(ark)
#> # An Ark: 6 / 9 pseudonyms used (1%)
#> key pseudonym
#> <md5> <Attribute Animal>
#> 1 14fa27a6... Three Fu
#> 2 216deaa6... Two Fi
#> 3 3297603a... One Fi
#> 4 8357d673... Three Fi
#> 5 9380ec58... Three Fa
#> 6 ee415bd5... Two FuReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested