Issues with getting my INPs to work in Rmark

posts related to the RMark library, which may not be of general interest to users of 'classic' MARK

Issues with getting my INPs to work in Rmark

Postby jln1234 » Tue Sep 01, 2020 3:10 pm

Hello All,
I apologize for the most likely very simple question. I am having a hard time getting my INP files to load into RMark. I keep getting the error "error Number of columns in data file does not match group/covariate specification". My INP file looks like this:
101100000000000000 B Perm. F ;
111111100000000000 B Perm. M ;
100111111111010001 B Perm. F ;
111111000000000000 B Perm. M ;
111111111111101111 B Perm. M ;
111000000000000000 C Perm. M ;
100010000000000000 C Perm. M ;
100000000000000000 C Perm. M ;
It starts with the encounter history, then the site, species, and finally gender. The code to get this into R to use with Rmark is:
Code: Select all
Lon=convert.inp("Lon_ehnospace.inp", covariates=c("grid","species","gender"), use.comments = FALSE)

I have been following section C.12 page C-46 in "program mark: a gentle introduction" but for the life of me no matter how I change the code. I cannot get that error to go away and the code to work. I am sorry for the basic question and thank you in advance for your help. Please let me know if you need any farther information.
jln1234
 
Posts: 5
Joined: Tue Sep 01, 2020 2:34 pm

Re: Issues with getting my INPs to work in Rmark

Postby jlaake » Tue Sep 01, 2020 3:19 pm

.inp format is the MARK format which is entirely different. The function convert.inp converts from the MARK format to the RMark format. You are using the the RMark format for your file except you are adding a ; at the end which is for a MARK inp file. Remove the semicolons and then use import.chdata or any of the R functions to read in data. If you use the latter just make sure that your capture history is read in as type character and is given the name ch. import.chdata does that for you. Also when you type library(RMark) it returns a website address for documentation. That documentation in the workshop notes is more up to date.

--jeff
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Issues with getting my INPs to work in Rmark

Postby jln1234 » Tue Sep 01, 2020 3:38 pm

Thank you for replying so quickly. After chaning it to a txt.file and removing the semicolon it worked with using the import.chdata
jln1234
 
Posts: 5
Joined: Tue Sep 01, 2020 2:34 pm


Return to RMark

Who is online

Users browsing this forum: No registered users and 1 guest

cron