Skip to content
Prev 248220 / 398506 Next

error with source(): invalid 'times' value

Put a space after the # in the line
#line 516
to avoid the problem.  A similar problem also
appears in parse().

  > parse(text="#line 102\nlog(pi)\n")
  Error in `Encoding<-`(`*tmp*`, value = character(0)) :
    'value' must be of positive length
  > parse(text="# line 102\nlog(pi)\n")
  expression(log(pi))
  attr(,"srcfile")
  <text>
  attr(,"wholeSrcref")
  # line 102
  log(pi)

(I'm still using 2.12.0.)

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com