[SOLVED]mélange entre nom de variable "z_i" et locator "z_j"

If you have problems using RGeostats package or if you simply need some help on an unlisted subject.

[SOLVED]mélange entre nom de variable "z_i" et locator "z_j"

Postby bez » Fri Mar 03, 2017 4:25 pm

a <- db.create(x1=runif(10,0,20),x2=runif(10,0,20),z2 = rep(1,10),z3 = rep(1,10),z4 = rep(1,10),z1 = rep(1,10))
a <- db.locate(a,4:6,"z")
db.plot(a) # represents z2 ==> OK
db.plot(a,name.prop="z2") # represents z3 ==> not OK ; should represent z2
Last edited by bez on Mon Mar 06, 2017 10:50 am, edited 1 time in total.
Posts: 18
Joined: Tue Oct 23, 2012 10:31 am

Re: mélange entre nom de variable "z_i" et locator "z_j"

Postby Didier Renard » Fri Mar 03, 2017 8:30 pm

The reason is obvious.
A field can be defined by one of the following ways:
1) by the field rank
2) by the locator of the field
3) by the name of the field
This definition is performed along the order of the previous list.

Here, the user asks for "name.post=z2".
The algorithm is performed as follows:
- is "z2" a number: NO then this cannot be the field rank
- can "z2" be a locator: YES so the system plots the variable with locator "z2" ... which has the name "z3".

One could be surprised by the name of the argument: 'name.post' which is much more than the "name" of the field.
Didier Renard
Posts: 279
Joined: Thu Sep 20, 2012 4:22 pm

Return to Other Troubleshooting

Who is online

Users browsing this forum: No registered users and 1 guest