search for: getsrclin

Displaying 4 results from an estimated 4 matches for "getsrclin".

Did you mean: getsrclines
2009 May 21
3
file descriptor leak in getSrcLines in R 2.10.0 svn 48590
...#39;t remove a package unless I shut down the R session that had loaded and used it. The function that triggered the problem printed the output of a call to parse(). Each time one prints a srcref a connection is opened and not closed. It looks like it happens in as.character.srcref's call to getSrcLines, which has some logic I don't understand about closing 'srcfile' on exit only if !.is.Open(srcfile): > getSrcLines function (srcfile, first, last) { if (first > last) return(character(0L)) if (!.isOpen(srcfile)) on.exit(close(srcfile)) conn <- ope...
2009 Oct 30
1
.Rprofile replacement function setwd() causing errors
...ever, this causes errors in some cases where setwd is used by other functions, particularly example(): > library(HistData) > example(Snow) Error in setwd(olddir) : cannot change working directory > traceback() 6: setwd(olddir) 5: open.srcfile(srcfile, first) 4: open(srcfile, first) 3: getSrcLines(srcfile, lastshown + 1, srcref[3L]) 2: source(zfile, local, echo = echo, prompt.echo = paste(prompt.prefix, getOption("prompt"), sep = ""), continue.echo = paste(prompt.prefix, getOption("continue"), sep = ""), verbose = verbose, max.deparse....
2007 Apr 03
1
source(..., echo=TRUE) broken in R-2.5.0 alpha and in R-2.6.0 devel
Hi, I get this error with R-2.5.0 alpha and R-2.6.0 devel: > source("http://bioconductor.org/biocLite.R", echo=TRUE) Error in if (timestamp != srcfile$timestamp) warning("Timestamp of '", : missing value where TRUE/FALSE needed Same with 'verbose=TRUE': > source("http://bioconductor.org/biocLite.R", verbose=TRUE)
2015 Jul 29
1
Mapping parse tree elements to tokens
As Michael guessed my main use cases was code analysis. A concrete example where this would help is with my test code coverage tool covr. There is currently a bug when tracking coverage for if / else statements when the clauses do not contain brackets (https://github.com/jimhester/covr/issues/39). Because only one source reference is generated in this case (because it is parsed as a single