Ibrahim Tanyalcin Posted September 28, 2020 Share Posted September 28, 2020 I have a function called 'normalize' which gets a string as input and does something with it. I have to run this function for every cell of a single column in one of the tables. I have managed to do it like this: someTable[["newCol"]] Link to comment Share on other sites More sharing options...
Kirsten Smith (she/her) Posted September 28, 2020 Share Posted September 28, 2020 You cannot create a column from a TERR list due to its structure. You might see if you can get the same results with sapply() instead of laaply(), or massage the output with unlist() or some other coding to get a single string of values. Link to comment Share on other sites More sharing options...
Gaia Paolini Posted September 28, 2020 Share Posted September 28, 2020 It kind of works if I make something up, but my data and my function might be too simple with respect to yours. Without the code and a data sample I don't know how to help. I am using Spotfire 10.x but this should be basic stuff. Have you tried sapply instead Link to comment Share on other sites More sharing options...
Ibrahim Tanyalcin Posted September 28, 2020 Author Share Posted September 28, 2020 I have tried wrapping the output with unlist and it worked! I don't know R at all so I guess I was not supposed assign a list to a column, a vector (as unlist outputs) works great! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now