Anthony Quarm 5 Posted January 6, 2021 Share Posted January 6, 2021 I have replicated an excel sheet in spotfire. One of the if statements has a false that is essentially: D16*EXP(-$B$12) With D16being a cell reference that cascades per iteration (D17, D18, etc) and B12 being a stagnant value. Currently I am calculating this inside of a data function using r script. This part of the if statement is represnted by: RateFunctionCalc Link to comment Share on other sites More sharing options...
Fabian Duerr Posted January 7, 2021 Share Posted January 7, 2021 Are all values in your column EurSheet$Dm.month equal It's a bit puzzling that you iterate thru this column but within Excel you are using a fix cell value. Link to comment Share on other sites More sharing options...
Anthony Quarm 5 Posted January 7, 2021 Author Share Posted January 7, 2021 yes, DM.month is always the same. As it loads this data as a table, it gives an error if I don't specify . But since it is the same value for every iteration, it doesn't matter. Is that to say there isn't a solution to the exp part Link to comment Share on other sites More sharing options...
Fabian Duerr Posted January 7, 2021 Share Posted January 7, 2021 I see. If it's all the same value than it makes sense to store this value in a variable using an aggregation like mean, min or max: my.variable <- max(EurSheet$Dm.month) This will keep your code cleaner. But it will not solve your problem. Did you verify with a calculator that R datafunction is giving you the wrong result Can you post a snapshot 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