Skip to content
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

Recursive validObject does not work on formulas #552

Open
Dav-Ng opened this issue Mar 9, 2022 · 1 comment
Open

Recursive validObject does not work on formulas #552

Dav-Ng opened this issue Mar 9, 2022 · 1 comment

Comments

@Dav-Ng
Copy link

Dav-Ng commented Mar 9, 2022

Hi everyone,

I'm having an issue when validating an object recursively that contains a formula, an exception is thrown from Renjin:

org.renjin.eval.EvalException: object 'sloti' not found
	at org.renjin.sexp.Symbol.eval(Symbol.java:329)
	at org.renjin.sexp.Promise.doEval(Promise.java:87)
	at org.renjin.sexp.Promise.force(Promise.java:81)
	at org.renjin.sexp.Symbol.eval(Symbol.java:337)
	at org.renjin.sexp.Promise.doEval(Promise.java:87)
	at org.renjin.sexp.Promise.force(Promise.java:81)
	at org.renjin.primitives.R$primitive$identical.applyPromised(R$primitive$identical.java:27)
	at org.renjin.sexp.BuiltinFunction.apply(BuiltinFunction.java:100)
	at org.renjin.primitives.special.InternalFunction.apply(InternalFunction.java:46)
	at org.renjin.sexp.FunctionCall.eval(FunctionCall.java:80)
	at org.renjin.sexp.Closure.applyPromised(Closure.java:200)
	at org.renjin.sexp.Closure.apply(Closure.java:133)
	at org.renjin.primitives.special.RecallFunction.apply(RecallFunction.java:43)
	at org.renjin.sexp.FunctionCall.eval(FunctionCall.java:80)
	at org.renjin.sexp.Promise.doEval(Promise.java:87)
	at org.renjin.sexp.Promise.force(Promise.java:81)

Here is a simple code to reproduce the issue on either Java or R:
Java:
rEngine.eval("validObject(~1,complete=TRUE)");
R:
validObject(~1,complete=TRUE)

However, there is no issue when "complete" argument is omitted. Am I missing something?
The code works on GNU R 3.5.3 and returns TRUE. I'm using Renjin 3.5-beta76 in a Java project.

@perNyfelt
Copy link
Contributor

This is just a comment to make it easier to investigate later (I dont have the time right now to look into this). The validObject code begins on line 429 here: https://github.com/bedatadriven/renjin/blob/master/packages/methods/R/SClasses.R
From a brief look at the code, I see no obvious reason why setting complete to true should cause this issue though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants