Page 1 of 1
[SOLVED] Not able to run migrate()

Posted:
Mon Apr 25, 2022 3:48 am
by Sammy1405
Hi,
I am a student from CWRU and I am taking the geospatial course taught by Dr. Jeffrey Yarus. I am facing some issues while using the following code. The error I am seeing is: 'Error: Identifying attribute called 'L*D*P*'. You must designate at least one attribute'. I didn't include dcell, origin and extend arguments for db.grid.init() function.
Here's my code.
db_grid <-
db.grid.init(
db_sub_temp_noout
)
migrate(
dbin = db_sub_temp_noout,
dbout = db_grid,
names = c("L*", "D*", "P*"),
radix = "")
Please suggest what I can do to make it work. I tried removing names argument from migrate but that does not help.
Thank you.
Regards,
Sameera
Re: Not able to run migrate()

Posted:
Mon Apr 25, 2022 1:54 pm
by Didier Renard
Hello
If I understand correctly, you have created a grid Db starting from an initial Db called "db_sub_temp_noout" on which I have no information.
The first procedure used (db_grid_init) consists in creating a Db organized as a Grid, which covers the bounding box of db_sub_temp_noout.
The second commande migrate, consists in migrating (copying to the closest information) some variables from one Db to the other, i.e. from db_sub_temp_noout to db_grid (newly created).
You also name the set of variables to be "migrated", using the 'names' argument.
It seems that you are interested in all the variables whose name start with "L" or "D" or "P".
This is what I understand but cannot check, having no information on the initial file.
Please print the list of variables contained in this initial file (i.e. db_sub_temp_noout) for me to give you advices.
Cheers
Re: Not able to run migrate()

Posted:
Mon Apr 25, 2022 6:44 pm
by Sammy1405
Hi Dr. Renard,
Thanks for your response. I got the permission to share information. db_sub_temp_noout has the following information:-
Data Base Characteristics
=========================
Data Base Summary
-----------------
File is organized as a set of isolated points
Space dimension = 2
Number of fields = 5
Maximum Number of attributes = 5
Total number of samples = 72
Variables
---------
Field = 1 - Name = rank - Locator = NA
Field = 2 - Name = lat - Locator = x2
Field = 3 - Name = lon - Locator = x1
Field = 4 - Name = depth - Locator = NA
Field = 5 - Name = temp_c - Locator = z1
Please let me know if there is further information you would like.
Re: Not able to run migrate()

Posted:
Wed Apr 27, 2022 12:06 pm
by Sammy1405
Hi,
I have an update. We were able to get the kriging code to work with the help of my group members. Apparently, there were some duplicate values lurking in the latitude and longitude columns which was causing issues in the code.
Thanks for your help so far.
Regards,
Sameera