linear interpolation in R only to max depth and not fixed depth
In the example below, I can get a linear interpolation up to a fixed depth (30). For variable a, “1” only goes to a max depth of 25 whereas “2” goes to a max depth of 35. So for “1”, between 26 and 35 gets NA’s. Is there a way to stop interpolation based on maximum depth value? In which case, for “1” interpolation would go only to 25 and for “2” it will go to 30.
How to solve error message from interpolating in R? : (‘as.is’ should be specified by the caller; using TRUE)
I get this error message when I try to take away a part of the intepolation with data I’m no longer using: Warning messages:
1: In type.convert.default(x) :
‘as.is’ should be specified by the caller; using TRUE