Jump to content

Error message "Output column has 1 rows while the table has 3 rows" in TERR


Rui Li

Recommended Posts

Hello everyone,

I got the following TERR error message with my R script. I am trying to have the output as a vector, however, TERR takes it as a row. I cannot figure out how to map the output correctly into spotfire datasheet.

hank you very much!

Rui

 

Here is error message:

Adapting output columns to result table row count.

All columns in an add columns operation need to have the same row count as the data table. Output column has 1 rows while the table TEST (2) has 3 rows.

---

Here is my R script (the code is redundant, as it is a part of a long script. The statement in for loop is just an example to show the problem)

raw_pars

Link to comment
Share on other sites

Hi

this is a very long script and you give no sample data and no details of where exactly the error occurs.

A useful way of debugging such situations is:

1. place a statement like this:

save.image('C:/Debug/myscript.RData')

as a first statement of your TERR script, where C:/Debug is just an example of afolder. As long as it exists, any name is fine, same for the file.

2. run your script within Spotfire to generate the image file, does not matter if it gives the usual error

3. copy and paste your script into an editor e.g. RStudio pointing at TERR

4. replace the save.image with load

5. run the script line by line

In order to open RStudio on TERR, you can go, from within Spotfire, to Tools>TERR Tools> Launch RStudio IDE. It will open RStudio pointing to the TERR version you are currently running within Spotfire. You can verify it by running the 'version' statement.

Gaia

Link to comment
Share on other sites

Hi Gaia,

 

Thank you very much! I kind of figured out where the problem was: I did not specify the output correctly. However, I still cannot figure out what to do. 

 

I take data from columns of Data Table as inputs, and I am trying to add a new column as the output. But with a for loop, Spotfire or TERR is confused with my output dimension. Could you tell me what I should do

 

I have simplified the script to a few lines, and uploaded the data file.

 

Rui

Link to comment
Share on other sites

Hi Gaia,

 

Thank you for your recommendation! While I was preparing dxp file, I found that it was a problem of how I defined the output. It worked after I deleted the old settings, and redefined all the inputs and output. 

 

Rui

Link to comment
Share on other sites

Hi

This is now a different question to the one I answered.

It seems rather confusing. It is no longer a very long script and the error is different.

Tips about debugging a TERR script are useful to the community, but it is better to ask a new question in this case, rather than changing the original question.

Gaia

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...