tapply() not working properly/Missing column from a TERR script

Hi, I've written a very simple script in R studio which pivots data in a table.  When I run it in R Studio, it works just fine.  But when I run it in Spotfire, the column where the data is pivoting around doesn't show up (I have looked for it under properties of course).  but I'm not even sure how to find where the problem is let alone trying to solve it.

Here's my code:

#Function to send all the rows of a table listed by rights owner, then
  #pivot that data around the rights owner to get all of their net acreage
  #within the selected tracts.  Remember that the tracts themselves will
  #already be filtered, so the only thing needed is to pivot the data for
  #subtotals.  Additionally, the gross acreage will be calculated in another
  #This table shows the number of parts of the T/R/S the rights owner is in.
  #then need to create the sum, and next merge the tables.

  TotalNetAcreage <- tapply(FilteredLeaseTable$Acreage, FilteredLeaseTable$Rights_Owner, sum)

I'm wondering if something isn't working correctly with tapply().  As i stated previously, it works fine in Rstudio.


(4) Answers