user1424739
user1424739

Reputation: 13745

the problem of getSrcFilename() in R but not in littler

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))

Upvotes: 1

Views: 54

Answers (0)

Related Questions