It looks as if it may be trying to write a file in a directory for which
you do not have write access. Are you an administrator on your own
machine? If so, you should be able to write anywhere unless you have
set the directory to read only. I wrote the mrds R package but Len
wrote the code that drives it from DISTANCE and that is where the error
is, so he'll have to address that. It appears that the directory
portion of filespec for the wmf file is missing but maybe that is
because the default directory is the dst4998 temp sub-directory. Len
may have to answer this one for you.
--jeff
On 1/16/2010 4:06 AM, Philippe Bouchet wrote:
> > Dear list members,
> >
> > I am working through a series of distance sampling exercises (provided by CREEM
> > researchers during the latest Distance Sampling workshop) and can't get the MRDS engine
> > to work properly. An error message is returned to me every time I try to run the first
> > analysis of the "Golf tees" exercise (see below for details).
> >
> > -----------------------------------------------------------------------
> >
> > Engine started with the following command:
> > C:\RSOFTW~1\R-29~1.2\bin\Rcmd.exe BATCH
> > C:\Users\Phil\AppData\Local\Temp\dst4998\in.r
> > C:\Users\Phil\AppData\Local\Temp\dst4998\log.r
> > -- Start of Analyis Engine Log File --
> >
> > R version 2.9.2 (2009-08-24)
> > Copyright (C) 2009 The R Foundation for Statistical Computing
> > ISBN 3-900051-07-0
> >
> > R is free software and comes with ABSOLUTELY NO WARRANTY.
> > You are welcome to redistribute it under certain conditions.
> > Type 'license()' or 'licence()' for distribution details.
> >
> > Natural language support but running in an English locale
> >
> > R is a collaborative project with many contributors.
> > Type 'contributors()' for more information and
> > 'citation()' on how to cite R or R packages in publications.
> >
> > Type 'demo()' for some demos, 'help()' for on-line help, or
> > 'help.start()' for an HTML browser interface to help.
> > Type 'q()' to quit R.
> >
> >
>> >> if(sum(.packages(all=T)=='mrds')==0)
>> >>
> > + install.packages('C:\\Program Files\\Distance 6\\mrds.zip', repos=NULL)
> >
>> >> library(mrds)
>> >>
> > This is mrds 1.3.8
> > Built: R 2.9.1; i386-pc-mingw32; 2009-07-28 01:46:46 UTC;
> > windows
> >
>> >> source('C:\\Program Files\\Distance 6\\mrds.support.r')
>> >> source('C:\\Program Files\\Distance 6\\support.r')
>> >> file.create('C:\\Users\\Phil\\AppData\\Local\\Temp\\dst4998\\res.r')
>> >>
> > [1] TRUE
> >
>> >> file.create('C:\\Users\\Phil\\AppData\\Local\\Temp\\dst4998\\stat.r')
>> >>
> > [1] TRUE
> >
>> >> ddf.dat.2<-read.table(file='C:\\Users\\Phil\\AppData\\Local\\Temp\\dst4998\\ddf.dat.r',
>> >>
> > header=TRUE, sep='\t', comment.char='')
> >
>> >> check.factor.vars(ddf.dat.2, c('observer', 'sex', 'exposure'))
>> >> ddf.dat.2$observer<-as.factor(ddf.dat.2$observer)
>> >> ddf.dat.2$sex<-as.factor(ddf.dat.2$sex)
>> >> ddf.dat.2$exposure<-as.factor(ddf.dat.2$exposure)
>> >>
>> >> ddf.2<-
>> >>
> > ddf(method='
trial.fi',mrmodel=~glm(link='logit',formula=~distance),data=ddf.dat.2,meta
> > .data=list(width=4))
> >
>> >> ddf.summary.2<-summary(ddf.2)
>> >> sink(file='C:\\Users\\Phil\\AppData\\Local\\Temp\\dst4998\\res.r',append=T)
>> >> cat('\tDetection Fct/Summary\t\n')
>> >> ddf.summary.2
>> >> sink()
>> >> win.metafile(filename='qq.2.%02d.wmf',width=7,height=5,pointsize=12)
>> >>
> > Unable to create metafile
> > Error in win.metafile(filename = "qq.2.%02d.wmf", width = 7, height = 5, :
> > unable to start device
> > Calls: win.metafile -> .External
> > In addition: Warning messages:
> > 1: In win.metafile(filename = "qq.2.%02d.wmf", width = 7, height = 5, :
> > Unable to open metafile 'qq.2.01.wmf' for writing
> > 2: In win.metafile(filename = "qq.2.%02d.wmf", width = 7, height = 5, :
> > opening device failed
> > Execution halted
> >
> > -- End of Analyis Engine Log File --
> > Analysis engine status 'Errors'
> > Reading Results
> > Run finished
> >
> > --------------------------------------------------------------------
> >
> >
> > I have checked the list's previous posts but was not able to find an answer to my
> > problem. I installed R inside a user-defined folder (not the Program Files folder, as
> > recommended inside the Read Me file that came with Distance).
> > The mrds package has not been unzipped, I reinstalled both distance 6.0R2 and R 2.9.2
> > and nothing worked.
> >
> > I work on a mac (windows vista installed via Parallels Desktop).
> >
> > Does anyone have any idea how to fix this ?
> >
> > Many warm thanks in advance for your help and suggestions,
> >
> > Phil
> >
> > --
> > distance-sampling list home page:
> >
http://www.jiscmail.ac.uk/lists/distance-sampling.html
> > To unsubscribe, go to the home page and click "Join or leave the list",
> > or email
jisc...@jiscmail.ac.uk with the following message body:
> > leave distance-sampling
> > Before posting to the list, read the list guidelines at
> >
http://www.jiscmail.ac.uk/files/distance-sampling/
> > distance-sampling.welcome
> > Any questions, email the list owner at
> >
distance-sam...@jiscmail.ac.uk
> > --
> >
--
distance-sampling list home page:
http://www.jiscmail.ac.uk/lists/distance-sampling.html
To unsubscribe, go to the home page and click "Join or leave the list",
or email
jisc...@jiscmail.ac.uk with the following message body:
leave distance-sampling
Before posting to the list, read the list guidelines at
http://www.jiscmail.ac.uk/files/distance-sampling/
distance-sampling.welcome
Any questions, email the list owner at
distance-sam...@jiscmail.ac.uk
--