by Didier Renard » Thu Feb 13, 2020 12:27 pm
This is probably a consequence of the "attach" statement that is used only in two functions in RGeostats: i.e.
- db.add for adding variables to a Db
- db.sel for performing selections
The "attach" statement makes it easy to manipulate already existing variables of the Db. As an illustration, imagine the Db (named db) contains two variables called A and B. Then the following command is valid:
db = db.add(db,C=A+B)
But the attach statement actually converts the variables of the Db as if they were variables defined in the environment. This is the reason why problem may occur when similar variables already exist in the environment. I do not know if there is any way distinguish between the two.
With the new naming convention, I am not sure we should not suppress this facility, as we can change the previous statement into:
db = db.create(db,C=db$A+db$B)
Still to be discussed.