oracle / fastr

A high-performance implementation of the R programming language, built on GraalVM.
Other
626 stars 64 forks source link

Different behavior from GnuR - Dataframe column names #58

Open rbotafogo opened 5 years ago

rbotafogo commented 5 years ago

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 
steve-s commented 5 years ago

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.

rbotafogo commented 5 years ago

Hello Steve,

Seems like the same behavior in RC14.

steve-s commented 5 years ago

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?

rbotafogo commented 5 years ago

This is the output:

[1] "10,00000%"

Em qua, 27 de mar de 2019 às 06:09, Stepan Sindelar < notifications@github.com> 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