fastr icon indicating copy to clipboard operation
fastr copied to clipboard

Different behavior from GnuR - Dataframe column names

Open rbotafogo opened this issue 6 years ago • 4 comments

The following code:

x = list(a = (1:10), beta = exp(-3:3), logic = c(TRUE, FALSE, FALSE, TRUE))
quant = lapply(x, quantile)
print(quant)

has this output in fastR:

$a
       0% 25,00000% 50,00000% 75,00000% 100,0000% 
     1.00      3.25      5.50      7.75     10.00 

$beta
         0%   25,00000%   50,00000%   75,00000%   100,0000% 
 0.04978707  0.25160736  1.00000000  5.05366896 20.08553692 

$logic
       0% 25,00000% 50,00000% 75,00000% 100,0000% 
      0.0       0.0       0.5       1.0       1.0 

Where the column names have 5 digits after the decimal mark.

In GnuR the same code has this output:

$`a`
   0%   25%   50%   75%  100% 
 1.00  3.25  5.50  7.75 10.00 

$beta
         0%         25%         50%         75%        100% 
 0.04978707  0.25160736  1.00000000  5.05366896 20.08553692 

$logic
  0%  25%  50%  75% 100% 
 0.0  0.0  0.5  1.0  1.0 

rbotafogo avatar Mar 12 '19 18:03 rbotafogo

Hello Rodrigo,

thank you for the report. It seems that this is fixed in the master. Next RC will be published soon. Please re-open if you can still reproduce in the next RC or with the FastR master.

steve-s avatar Mar 13 '19 18:03 steve-s

Hello Steve,

Seems like the same behavior in RC14.

rbotafogo avatar Mar 19 '19 14:03 rbotafogo

Hello Rodrigo,

it seems that the issue may be in this piece of code:

> stats:::format_perc(0.1)
[1] "10%"

can you try running it on your system?

steve-s avatar Mar 27 '19 09:03 steve-s

This is the output:

[1] "10,00000%"

Em qua, 27 de mar de 2019 às 06:09, Stepan Sindelar < [email protected]> escreveu:

Hello Rodrigo,

it seems that the issue may be in this piece of code:

stats:::format_perc(0.1) [1] "10%"

can you try running it on your system?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/oracle/fastr/issues/58#issuecomment-477050746, or mute the thread https://github.com/notifications/unsubscribe-auth/AD0H8R7cpjwRrKJn4zGB4uQ45Uqt9S_5ks5vazUvgaJpZM4brnAf .

-- Rodrigo Botafogo

rbotafogo avatar Mar 27 '19 16:03 rbotafogo