Rmark: Error in readChar(z, 16) : invalid UTF-8 input

posts related to the RMark library, which may not be of general interest to users of 'classic' MARK

Re: Rmark: Error in readChar(z, 16) : invalid UTF-8 input

Postby adigby » Thu Jul 27, 2023 6:54 pm

Thanks @jlaake for your help with this.

I'm having the same problem, but still get the error with version 3.0.0.

The dipper example in `?run.mark.model` returns the error:

Error in readChar(fd, 8 ) : invalid UTF-8 input in readChar()

Problem extracting output. Look at MARK output file to see what is wrong.


I wonder if the problem is related to a special character appearing at the start of a header line in mark???.out. It appears as an 'up arrow' on my machine, and as a square in the following:
Program MARK - Survival Rate Estimation with Capture-Recapture Data
Compaq(Win32) Vers. 5.1 Apr 2007 28-Jul-2023 10:44:05 Page 002
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


Any tips gratefully received!

Many thanks.

Reproducible example:

Code: Select all
> packageVersion("RMark")
[1] ‘3.0.0’


Code: Select all
library(RMark)
test=function()
{
  data(dipper)
  for(sex in unique(dipper$sex))
  {
     x=dipper[dipper$sex==sex,]
     x.proc=process.data(x,model="CJS")
     x.ddl=make.design.data(x.proc)
     Phi.dot=list(formula=~1)
     Phi.time=list(formula=~time)
     p.dot=list(formula=~1)
     p.time=list(formula=~time)
     cml=create.model.list("CJS")
     x.results=mark.wrapper(cml,data=x.proc,ddl=x.ddl,prefix=sex,delete=TRUE)
     assign(paste(sex,"results",sep="."),x.results)
  }
  rm(Male.results,Female.results,x.results)
}
test()
adigby
 
Posts: 4
Joined: Sun Dec 04, 2022 11:53 pm

Re: Rmark: Error in readChar(z, 16) : invalid UTF-8 input

Postby jlaake » Thu Jul 27, 2023 7:26 pm

Try updating MARK. The output header suggests it is version 5.1 from 2007. I believe current version is 9 or 10.


Jeff
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Rmark: Error in readChar(z, 16) : invalid UTF-8 input

Postby adigby » Wed Aug 02, 2023 6:13 pm

Thanks Jeff.

My problem seems to be that there's an old file 'mark.exe' in my MarkPath directory which I can't delete, and RMark is using that. The GUI version on my machine is newer, using a file Mark_Int.exe in the same folder.
I'm on a locked-down (work) machine with no admin rights, so can't delete the old `mark.exe` and create an alias.

Other than MarkPath, I guess there's no way of specifying the MARK version in RMark?

Thanks for your help.
adigby
 
Posts: 4
Joined: Sun Dec 04, 2022 11:53 pm

Re: Rmark: Error in readChar(z, 16) : invalid UTF-8 input

Postby jlaake » Wed Aug 02, 2023 6:28 pm

So can you put the newer mark64.exe or mark32.exe in a directory that you can write to and then point MarkPath to it? If not fine someone that does have admin rights for your computer and have them fix it.
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Previous

Return to RMark

Who is online

Users browsing this forum: No registered users and 1 guest

cron