Page 1 of 1

mark.wrapper and running models in general

PostPosted: Sun Jun 21, 2015 4:57 pm
by BJones
As an Ecology Masters student, this is the first time I've attempted to use RMARK so I apologise in advance if my queries seem a bit rudimentary.

I'm trying to run some models to estimate age-specific survival rates of signal crayfish populations using two different capture methods (covariates being sex, age, method and time). I've been following the instructions of Laake (2013) and produced a function which contains the parameter specifications I want for Phi and p, as well as a cml function (construct model list, I think) that's set to "CJS"

I then try to use the mark.wrapper function, specifying the cml, then processed data, then design data (ddl) and finally set the Output to False.

Every step up to this last one seems to work fine individually, but when I try and run the complete function I get the same error message reprinted for every parameter combination, which reads as follows:

Phi.time.p.time

Error in file(tempfilename, open = "wt") : cannot open the connection
In addition: Warning message:
In file(tempfilename, open = "wt") :
cannot open file 'C:/Program Files/R/R-3.2.0/bin/x64\markxxx15b85ce23a6a.tmp': Permission denied
Error in mark(model.parameters = model.parameters, initial = initial, :
Misspecification of model or internal error in code

No mark models found

Error in collect.models() :
[/color]

I have no idea at all how to rectify this and would sincerely appreciate any tips that can be offered.

Thanks for your time!

Re: mark.wrapper and running models in general

PostPosted: Mon Jun 22, 2015 10:55 am
by jlaake
In file(tempfilename, open = "wt") :
cannot open file 'C:/Program Files/R/R-3.2.0/bin/x64\markxxx15b85ce23a6a.tmp': Permission denied


That is your clue! You are trying to run with your R workspace in 'C:/Program Files/R/R-3.2.0/bin/x64" and unlss you run as administrator Windows stops you from doing so - permission denied. Change your workspace in R. You can use setwd() function or double click on a .Rdata file in a directory for which you have pernmission to write.

Re: mark.wrapper and running models in general

PostPosted: Wed Jun 24, 2015 6:05 am
by BJones
I hadn't even realised that would be an issue. Thanks for pointing it out, but I can't seem to change the working directory in R - again that may be because the R folder is currently in an administrator folder. I'll try moving it to another location or failing that I guess it'll have to be campus computers.

Thanks again!