Page 1 of 1

output files bug(?)

PostPosted: Fri Nov 02, 2018 6:33 am
by ksl59
Hi all,

One of my collaborators wants to see the "actual PRESENCE output files" and I'm trying to use occMod(...,outfile = "modname",...) to produce files that won't be deleted. However, when using SURVEY as a covariate, the output file uses SURVEY in all caps, but occMod() (or its lower level functions) are attempting to read the lower case version of the file. For example, an output file named "p(SURVEY)psi().out" results in the error:
Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") :
cannot open file 'p(survey)psi().out': No such file or directory"

On line 95 of occ.mod.so.R, v=readLines(tolower(outfile)) would appear to cause the error. Other versions of occMod() also contain an analogous line. When I delete tolower() from the call, my problem is solved, but perhaps this change would cause errors in other cases.

Is this a relic from the way previous versions of PRESENCE created output files?

Any thoughts?

Katherine

Re: output files bug(?)

PostPosted: Fri Nov 02, 2018 8:32 am
by jhines
Hi Katherine,

With Windows, upper/lowercase in filenames doesn't matter, but with Mac OS and Linux it does. I think I put the lowercase function in there to avoid having multiple output files from the same model, but don't see a reason for it now. I've updated RPresence with the lowercase function removed. Thanks for doing the debugging for me.

Jim

Re: output files bug(?)

PostPosted: Thu Nov 08, 2018 4:33 am
by ksl59
Glad to know it won't cause other problems. Thanks Jim!