You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encounter the problem when passing a boolean variable to smooth.spline.
julia> a = true
julia> x = rand(100);
julia> y = x;
julia> R"smooth.spline($x, $y, cv=$a)"
RObject{VecSxp}
Call:
smooth.spline(x = `#JL`$x, y = `#JL`$y, cv = `#JL`$a)
Smoothing Parameter spar= 0.2607728 lambda= 7.905905e-08 (18 iterations)
Equivalent Degrees of Freedom (Df): 43.86631
Penalized Criterion (RSS): 1.62104e-30
Error showing value of type RObject{VecSxp}:
ERROR: REvalError: Warning in is.na(cv) :
is.na() applied to non-(list or vector) of type 'language'
Warning in if (!is.na(cv)) cat(if (cv) "PRESS(l.o.o. CV): " else "GCV: ", :
the condition has length > 1 and only the first element will be used
Warning in if (cv) "PRESS(l.o.o. CV): " else "GCV: " :
the condition has length > 1 and only the first element will be used
Error in if (cv) "PRESS(l.o.o. CV): " else "GCV: " :
argument is not interpretable as logical
It works well if with R's own boolean variable TRUE
Can you try using the most recent version of RCall (0.13.17)? I don't get an error message with RCall 0.13.17 and R 4.2. I'm guessing it's easier to upgrade RCall than R and the relevant part of the R printing source hasn't changed:
I encounter the problem when passing a boolean variable to
smooth.spline
.It works well if with R's own boolean variable
TRUE
The error message indicates that it failed at the
print.smooth.spline
step (https://github.com/wch/r-source/blob/1af6b4aa417e106d63687992e229f461d45a30d9/src/library/stats/R/smspline.R#L319-L321)The fitting procedure is OK. And if I append
;
to hide the message, no error is thrown,I'm quite curious about why the error is triggered. How should we fix it?
I am using Julia 1.8.1 + RCall v0.13.14 (R3.6.3)
The text was updated successfully, but these errors were encountered: