1

I'd expect getSrcFilename() also works in R not just lr. Is it a bug in the command R?

$ lr -e "source('main.R');"
[1] "main.R"
$ R --slave --no-save --no-restore --no-init-file -e "source('main.R')"
character(0)
$ cat main.R 
options(keep.source=T)

f=function() {
  getSrcFilename(f)
}

print(getSrcFilename(f))
MrFlick
  • 195,160
  • 17
  • 277
  • 295
user1424739
  • 11,937
  • 17
  • 63
  • 152

0 Answers0