Jump to content

Tibco Exensio Spotfire - issue with R coding in Datafunction

Gianvito Calabrese

Recommended Posts

can you output the colnames of temp and tempp to verify what is actually going into Spotfire If you have column names starting with numbers then R might not see them as such.

One way of doing it would be to save the data flowing in within the R script this way:


making sure the C:/Temp (or whateve you chose) directory already exists, then run the data function to store the image, open RStudio and copy and paste your R data function, changing the save.image to load

Link to comment
Share on other sites

Hi Gaia,

thank you very much for the support.

I did thetest you suggest:


temp and tempp are well defined when loaded - the colnames are actually the same.

R studio reproduces exactly the same strange behavior I reported in Exensio:


temp works fine with stack().

Regardless exactly the same code applied on a former table with the same colname of temp, tempp does not work with stack().

Link to comment
Share on other sites

Are 'data' and 'datamark' the same or just from the same source If they are identical, then only load it once to your function. If they are only from the same source, then please show if there are any filtering or marking options active in the "edit parameter' section. I can't see this part in your screenshot.


What is your final intention with the stacking operation


Maybe you can have a look at the dplyr::pivot_longer() or reshape2::melt() function.


But in any case your column names will create problems (as Gaia mentioned) as they contain spaces. So please fix your column names first. You can use a TRANSFORMATION in Spotfire to do this. Or check out the make.names() function in R


(In R...) "syntactically valid names consists of letters, numbers and the dot or underline characters, and start with a letter or the dot (but the dot cannot be followed by a number)"





Link to comment
Share on other sites

The sources are exactly the same but the.


1) There is a Marking activated (this is the reason why having two import) but also removing it, the entire picture is the same (and this is something it's difficult to understand for me at all).




2) I need to have two stack table to realize a couple of Pareto with the same field and so compute a gap.




3) I will have a look to this different function opportunity!


Thank you very much for your effort.







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...