title: R: object of type 'externalptr' is not subsettable Issue
body: <p>I created a Linear Programming model as follows:</p>
  
  <pre><code>require(lpSolveAPI)
  </code></pre>
  
  <p>% defining data</p>
  
  <pre><code>liab&lt;--c(100,500,200,400,210,-600,100,900,500,400,600,810,100)
  num_times&lt;-length(liab)
  </code></pre>
  
  <p>% details the rates of interest</p>
  
  <pre><code>money &lt;- 0.5/100;
  shorttermrate &lt;- 0.9/100;
  creditgrate &lt;- 1/100;
  transactionrate &lt;- 0.2/100;
  bondvalue &lt;- 200;
  
  num_constraints = num_times;
  </code></pre>
  
  <p>% defining the no of variables</p>
  
  <pre><code>num_vars &lt;- num_times-6;
  num_vars &lt;- num_vars + num_times-6;
  num_vars &lt;- num_vars + num_times-1;
  num_vars &lt;- num_vars + num_times-1;
  num_vars &lt;- num_vars + num_times-6;
  num_vars &lt;- num_vars + num_times-1;
  vec1 &lt;- c(2,3,4,5,6)
  </code></pre>
  
  <p>% create an LP model with num_constraints constraints and 
  % num_vars variables</p>
  
  <pre><code>lpmodel&lt;-make.lp(num_constraints,num_vars)
  </code></pre>
  
  <p>% This is where I find an issue:
  % I am struggling to understand how to access elements within <code>lpmodel</code>. I get the error `Error in 
  % lpmodel[t, column - (ntimes - 1) + t - 1] : object of type 'externalptr' is not subsettable</p>
  
  <pre><code>for (t in c(1:(num_times-6))){
  if (t==1)
   set.column(lpmodel,column+t,c(bondvalue), indices=c(t))
  else
   set.column(lpmodel,column+t,c((shorttermrate)*lpmodel[t-1,column]), indices=c(t)) % Issue associated with trying to access lpmodel
  if (t==num_times-6)
   set.column(lpmodel,column+t+1,c(-bondvalue), indices=c(t))
  for (i in vec1){
   set.column(lpmodel,column+t+i,c(lpmodel[t-1,column]-lpmodel[t,column]), indices=c(t)) % Issue associated with trying to access lpmodel
   }
  }
  </code></pre>
  
  <p>Thanks</p>