Skip to content
Snippets Groups Projects
Commit 10b69aab authored by Mick Jordan's avatar Mick Jordan
Browse files

allow RExpression in VECTOR_ELT

parent bdf54db8
Branches
No related tags found
No related merge requests found
......@@ -568,6 +568,9 @@ public class CallRFFIHelper {
public static Object VECTOR_ELT(Object x, int i) {
RFFIUtils.traceUpCall("VECTOR_ELT", x, i);
Object vec = x;
if (vec instanceof RExpression) {
return ((RExpression) vec).getDataAt(i);
}
RAbstractListVector list = guaranteeInstanceOf(RRuntime.asAbstractVector(vec), RAbstractListVector.class);
return list.getDataAt(i);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment