-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when plot_nn #145
Comments
Can you share a minimal repro that gives this error? Or perhaps @sergey-tihon would know? |
Yes, this is code from his blog that I changed just a little because Species (Iris data) could not be strings so I converted them to ints thats all. #load "packages/Deedle.1.1.0-beta/Deedle.fsx" open RProvider.utils let test x = let iris : Frame<int, string> = R.iris.GetValue() let features = let helper = iris.Columns.["Species"].As() |> Series.map(fun x y -> test y) iris.DropColumn("Species") iris?Species <- helper let ir = iris |> Frame.mapColValues (fun c -> c.As()) //R.featurePlot(x = features, y = targets, plot = "pairs") let range = [1..iris.RowCount] let nn = R.plot_nn(nn, rep="best") |
It would be very helpful if you found the single line that causes the issue and created just a few line snippet that we can use to diagnose what is going wrong. |
It is the last line: R.plot_nn(nn, rep="best") |
R x64 3.0.2 2015-02-11 22:26 GMT+01:00 Sergey Tihon [email protected]:
|
Found in the log
I see |
A bit more light on the problem: |
Some extra information that might be helpful: I also have this error with R 3.1.1 although the R console can find the package grid and also access grid.newpage without issues. The function is not found only when called from the type provider, in FSI. And strangely the same error is displayed when using graphics.plot. So I added this code:
but nothing changed. Again this works fine in the R console. |
I wonder if this is related to the error reported here (also #121). Can you try adding:
Or perhaps:
And see if this makes it work? (The R provider should do this automatically, but it looks like there might be some corner case...) |
You are right. It helps: R.eval(R.parse(text="library(grid)")) |
This was happening to me but with the package fArma. The same solution applied. |
Get's an error message while using R.plot_nn
Replicated the script from the blog "F# Neural Networks with RProvider & Deedle" so I excluded any misstaket on my side.
Using latest RProvider.1.1.8
Error in neuralnet::plot.nn(x = fsr_2936_27, rep = fsr_2936_28) :
could not find function "grid.newpage"
RDotNet.EvaluationException: Error in neuralnet::plot.nn(x = fsr_2936_27, rep = fsr_2936_28) :
could not find function "grid.newpage"
at RDotNet.REngine.Parse(String statement, StringBuilder incompleteStatement)
at RDotNet.REngine.d__0.MoveNext()
at System.Linq.Enumerable.LastOrDefault[TSource](IEnumerable`1 source)
at RDotNet.REngine.Evaluate(String statement)
at <StartupCode$FSI_0010>.$FSI_0010.main@()
Stopped due to error
The text was updated successfully, but these errors were encountered: