[SOLVED] lost locators

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

[SOLVED] lost locators

Postby RThomas » Wed Dec 10, 2014 6:23 pm

Hello-

I'm working in RGeostats 10.0.8, and am having problems with losing my locators after I assign them. For example,
data.db<-db.create(hakedata)
db.locate(data.db, c(4,6), loctype="x")

gives

Variables
---------
Field = 1 - Name = rank - Locator = rank
Field = 2 - Name = Transect - Locator = NA
Field = 3 - Name = HakeBiomass - Locator = NA
Field = 4 - Name = HakeBiomassMean - Locator = x1
Field = 5 - Name = HakeLon - Locator = NA
Field = 6 - Name = TransectLength - Locator = x2
Field = 7 - Name = HakeLat - Locator = NA

Great, I can see the locators for the 4th and 6th fields
Now I do
db.locate(data.db, 3,loctype="z")
and I get
Variables
---------
Field = 1 - Name = rank - Locator = rank
Field = 2 - Name = Transect - Locator = NA
Field = 3 - Name = HakeBiomass - Locator = z1
Field = 4 - Name = HakeBiomassMean - Locator = NA
Field = 5 - Name = HakeLon - Locator = NA
Field = 6 - Name = TransectLength - Locator = NA
Field = 7 - Name = HakeLat - Locator = NA

Ulp. I have lost my locators on fields 4 and 6. Do you have any suggestions for how to handle this situation?

Thanks,
Rebecca
Last edited by RThomas on Thu Dec 11, 2014 10:28 am, edited 1 time in total.
RThomas
 
Posts: 2
Joined: Wed Dec 10, 2014 6:15 pm

Re: lost locators

Postby Fabien Ors » Thu Dec 11, 2014 9:08 am

Hi Rebecca
The problem is that you have to store the new db returned by db.locate into the current variable data.db
So, call db.locate function like that and it will fix your problem :
Code: Select all
data.db<-db.create(hakedata)
data.db<-db.locate(data.db, c(4,6), loctype="x")
data.db<-db.locate(data.db, 3,loctype="z")

Hope this helps ;-)
Fabien Ors
Administrateur du site
 
Posts: 97
Joined: Thu Sep 20, 2012 1:07 pm

Re: lost locators

Postby RThomas » Thu Dec 11, 2014 10:01 am

Doh!
Thanks for kindly clearing up a pretty silly mistake.

Thanks,
Rebecca
RThomas
 
Posts: 2
Joined: Wed Dec 10, 2014 6:15 pm


Return to Other Troubleshooting

Who is online

Users browsing this forum: No registered users and 1 guest

cron