Rui Li Posted January 31, 2019 Share Posted January 31, 2019 Hello everyone, I have a datasheet with some empty entries in Spotfire. I would like to creat a IF-ELSE loop in TERR script to test if cell in column Ahas a value, if yes, copy that value to column C, if not, copy value from column B to C. I tried a couple things, like is.null, cell == "", or cell == 0. None of them worked. So how does TERR treat these empty cells (I found they are numerical value with a length of 1) How should I use a logic test here I have uploaed an example data file. Thank you! Rui Link to comment Share on other sites More sharing options...
Rui Li Posted February 1, 2019 Author Share Posted February 1, 2019 I figured this out. is.na function can detect the empty cell. Link to comment Share on other sites More sharing options...
Gaia Paolini Posted February 1, 2019 Share Posted February 1, 2019 Hi yes you are correct. Empty values in R (TERR) are codedas NA. Gaia Link to comment Share on other sites More sharing options...
Rui Li Posted February 1, 2019 Author Share Posted February 1, 2019 Thank you very much, Gaia! Rui 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