(Please use a more informative Subject:, for example naming the package. I
haven't changed the Subject:, but it should be "substr() error in
read.pnm")
On Wed, 29 Jan 2003, Francisco do Nascimento Junior wrote:
> people,
>
> I'm using the pixmap library and method read.pnm() for to read figures
and
> it's
> giving the following error:
> Error in substr(inpstr, com1, stop = ns) :
> evaluation is nested too deeply: infinite recursion?
If you look at the code of read.pnm() you see that it calls
read.pnmhead(). Within this is a function called strip.comments(). My
guess is that someone has written a dissertation instead of a comment. PNM
files have ASCII headers, so you could try simply shortening any comments
you see. If you can put the offending file on a website I can take a look
at it. At present read.pnmhead() assumes that the header is not more than
350 characters long; if you enter debug(read.pnmhead) before running
read.pnm(), you will see which line it fails at. Please contact me off the
list.
Roger Bivand
>
> I think that to be because of its size.
> Am I correct?
>
> Tks,
> Francisco.
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Francisco J?nior,
> Computer Science - UFPE-Brazil
> "One life has more value that the
> world whole"
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> http://www.stat.math.ethz.ch/mailman/listinfo/r-help
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand at nhh.no