Page 1 of 1

Issues with getting my INPs to work in Rmark

PostPosted: Tue Sep 01, 2020 3:10 pm
by jln1234
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.

Re: Issues with getting my INPs to work in Rmark

PostPosted: Tue Sep 01, 2020 3:19 pm
by jlaake
.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

Re: Issues with getting my INPs to work in Rmark

PostPosted: Tue Sep 01, 2020 3:38 pm
by jln1234
Thank you for replying so quickly. After chaning it to a txt.file and removing the semicolon it worked with using the import.chdata