Closed FaguiCurtain closed 1 year ago
I'm not able to reproduce this bug using the latest RProvider with .NET 5 running dotnet fsi, macOS 11, R 4.1.1.
> let x1 : float = R.sin(1).GetValue()
- let x2 : float = R.sin(1.0).GetValue();;
val x1 : float = 0.8414709848
val x2 : float = 0.8414709848
I am getting the same error as the OP. In my locale (Norwegian), comma is used as the decimal separator, which perhaps supports the OP's suggestion that the issue lies there somehow.
Like in the OP's case, R.sin (1.0)
works fine, but I suppose that might be because the decimal is ignored in that case?
.NET 6, macOS 11 (Apple Silicon), R 4.1.2, RProvider 2.0.2.
The workaround I found was to set LC_ALL to e.g. "C" or "en_US.UTF-8" before starting dotnet fsi
or VSCode, which confirms that the problem is related to locale.
By the way, I have to change LCALL - setting any of the other LC* variables individually does not work.
This issue should be fixed in the new release 2.1.0. Please re-open if it re-occurs.
running RProvider1.1.20 on a Terminal window on MacOS
I try to run the example from http://bluemountaincapital.github.io/FSharpRProvider/mac-and-linux.html
R.mean([1;2;3;4)]
R.x11()
R.sin(1)
> R.sin(1.0);;
all work fine
However
>R.sin(1.0);;
Error in base::sin(0, 1) : 2 arguments passed to 'sin' which requires 1I first wondered if it had to do with regional settings (comma or dot separator for numbers) but the example with 0.1 and 1.0 suggest otherwise