output files bug(?)

posts related to the RPresence library, which may not be of general interest to users of 'classic' PRESENCE.

output files bug(?)

Postby ksl59 » Fri Nov 02, 2018 6:33 am

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
ksl59
 
Posts: 6
Joined: Wed Oct 17, 2018 12:00 pm

Re: output files bug(?)

Postby jhines » Fri Nov 02, 2018 8:32 am

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
jhines
 
Posts: 424
Joined: Fri May 16, 2003 9:24 am
Location: Laurel, MD, USA

Re: output files bug(?)

Postby ksl59 » Thu Nov 08, 2018 4:33 am

Glad to know it won't cause other problems. Thanks Jim!
ksl59
 
Posts: 6
Joined: Wed Oct 17, 2018 12:00 pm


Return to RPresence

Who is online

Users browsing this forum: No registered users and 1 guest