# R execution error : object of type 'externalptr' is not subsettable

**URL:** <https://forum.knime.com/t/r-execution-error-object-of-type-externalptr-is-not-subsettable/607>\
**Category:** KNIME Analytics Platform\
**Created:** [December 17, 2009, 1:32pm UTC](https://forum.knime.com/t/r-execution-error-object-of-type-externalptr-is-not-subsettable/607 "2009-12-17T13:32:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vermaneha](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/v/94ad74/32.png) [@vermaneha](https://forum.knime.com/u/vermaneha)\
**Post date:** [December 17, 2009, 1:32pm UTC](https://forum.knime.com/t/r-execution-error-object-of-type-externalptr-is-not-subsettable/607/1 "2009-12-17T13:32:46Z")

</div>

Hi,

I am executing the following R snippet through KNIME :

“R\<-add.constraint(R, R$“ECV”, “\<=”, 8000)”

and getting the following error:  
Error in R$ECV : object of type ‘externalptr’ is not subsettable  
Calls: add.constraint  
Execution halted

Any idea about the same? If I execute it through the KNIME console itself, the same works fine.  
The snippet that i use when directly executing from console is :  
“lprec\<-set.objfn(lprec, Optimization$“Revenue”)”

---

<div class="post-metadata">

**Author:** ![gabriel](https://forum-cdn.knime.com/user_avatar/forum.knime.com/gabriel/32/61386_2.png) [@gabriel](https://forum.knime.com/u/gabriel)\
**Post date:** [December 17, 2009, 2:21pm UTC](https://forum.knime.com/t/r-execution-error-object-of-type-externalptr-is-not-subsettable/607/2 "2009-12-17T14:21:50Z")

</div>

Hi,  
I am not sure, but is it possible that this function returns some kind of pointer or status that is assigned to R? Can you please try:  
add.constraint(R, R$“ECV”, “\<=”, 8000)  
R\<-R  
If this does not help, can you please provide a small sample dataset that demonstrates the problem.  
Thanks, Thomas

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [June 23, 2023, 8:15pm UTC](https://forum.knime.com/t/r-execution-error-object-of-type-externalptr-is-not-subsettable/607/3 "2023-06-23T20:15:13Z")

</div>


