Displaying 3 results from an estimated 3 matches for "deferred_str".
2018 Oct 08
2
bug with OutDec option and deferred_string altrep object
While implementing R's new 'altrep' functionality in the TERR engine,
I discovered a bug in R's 'deferred_string' altrep object: it is not
using the correct value of the 'OutDec' option when it expands a
deferred_string. See the following example:
R 3.5.1: (same results in R 3.6.0 devel engine built 10/5)
> options(scipen=0, OutDec=".")
> as.character(123.456)
[1]...
2018 Oct 09
0
bug with OutDec option and deferred_string altrep object
Thanks for the report. The approach you outlines below should work --
I'll look into it.
Best,
luke
On Mon, 8 Oct 2018, Michael Sannella wrote:
> While implementing R's new 'altrep' functionality in the TERR engine,
> I discovered a bug in R's 'deferred_string' altrep object: it is not
> using the correct value of the 'OutDec' option when it expands a
> deferred_string.? See the following example:
>
> R 3.5.1: (same results in R 3.6.0 devel engine built 10/5)
> ? ? > options(scipen=0, OutDec=".")
> ? ? >...
2018 Nov 15
2
STRING_IS_SORTED claims as.character(1:100) is sorted
...s.character(100:1)) ## should return NA
[1] -1
> issort(as.character(1:100+1L))
[1] NA
issort(as.character(1:100)) should return NA, since the string vector
"1","2",..."10",... is not sorted. I suspect that the problem is that
the Is_sorted method for deferred_string is just calling the Is_sorted
method for the source object 1:100 (which _is_ a sorted integer
vector). It should probably just return NA for any source object.
~~ Michael Sannella
[[alternative HTML version deleted]]