similar to: .Rprofile replacement function setwd() causing errors

Displaying 20 results from an estimated 1000 matches similar to: ".Rprofile replacement function setwd() causing errors"

2012 Jul 30
1
locked binding of setwd() in R 2.15.x causes .Rprofile to fail
[Env: Win XP, R 2.14.2, R 2.15.0] I have a replacement function for setwd() in my .Rprofile which displays the current R path in the R window title. It no longer works in R 2.15.x, giving the error below. Worse, the error prevents the rest of my .Rprofile script from completing. Is there some way to rescue this, i.e., preserve this behavior in R 2.15? If not, how can I modify my script so it
2013 Feb 07
1
assignInNamespace to create a setwd() replacement: how to use unlockBinding()?
In my .Rprofile for Windows, I had the following functions defined to mirror a few features I miss from linux: (a) replace setwd() with a version that stashes the current directory so it can be easily restored (b) writes a short version of the current R directory to the Windows title bar: I can always see where I am, with multiple Rgui windows. (c) creates a cd() shorthand for setwd(), but
2009 May 21
3
file descriptor leak in getSrcLines in R 2.10.0 svn 48590
I noticed the following file descriptor leak when I couldn'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
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)
2013 Jan 14
1
Issue with getParserData in R3.0.0
Hello, I am migrating my package lambda.r to R3.0.0 and am experiencing some issues with the getParserData function (which replaces the parser package). Basically the function works in the R shell but fails when either called from RUnit or from R CMD check. I've narrowed it down to the function getSrcfile, which is returning different values depending on the code path. From the command line
2014 Mar 05
1
[PATCH] Code coverage support proof of concept
Hello, I submit a patch for review that implements code coverage tracing in the R interpreter. It records the lines that are actually executed and their associated frequency for which srcref information is available. I perfectly understands that this patch will not make its way inside R as it is, that they are many concerns of stability, compatibility, maintenance and so on. I would like to have
2009 Feb 12
1
Why is srcref of length 6 and not 4 ?
Hello, Consider this file (/tmp/test.R) : <file> f <- function( x, y = 2 ){ z <- x + y print( z ) } </file> I get this in R 2.7.2 : > p <- parse( "/tmp/test.R" ) > str( attr( p, "srcref" ) ) List of 1 $ :Class 'srcref' atomic [1:4] 1 1 4 1 .. ..- attr(*, "srcfile")=Class 'srcfile' length 4 <environment>
2004 May 07
1
meetme conf-background.agi
Hello there! Somebody tried the meetme|b which initiates the conf-background AGI. Actually I want to originate another call from a conference.my AGI originates the call and connects it to the conference, but the calleeee is nowhere My extension exten => 21,1,meetme(21|pb) and my AGI **************************************************************************** #!/usr/bin/perl -w
2006 Mar 25
2
R gets slow
Hello, I have R as a socket server that computes R code sent by some scripts (the clients). These scrips send R code to generate models (SVM). The problem is that first models are generated in less than one second and one hour later, the same models are generated in more than ten seconds (even training with same data). If I restart the server , then it works well (fast). I don't know if I have
2004 May 10
1
AGI.pm wait_for_digit() not working for me!!!
Hello everybody!!! I really need your help guys, I am using the AGI mode in meetme application, and I want that AGI should wait for an input from the client/user i.e. a digit and then proceed, but I have used that AGI function agi->wait_for_digit(), but no use....my agi just passes, or ignores this function, where AGI should stop here and wait for the input.... .....my extension in my
2010 Mar 12
1
problem with parse(text=quote(name))
Calling parse(text=quote(name)) or text=as.name("name") makes parse() prompt for input from the command line and then it returns a parse of the initial characters of 'name' (depending on how many characters were typed at the prompt). E.g., > parse(text=quote(myName)) ?1/3 expression(myN) attr(,"srcfile") <text> >
2012 Jan 11
1
parse( connection) and source-keeping
In R <= 2.13.x, calling 'parse( con)' where 'con' is a connection, 'options( keep.source)' is TRUE, and default 'srcfile' would preserve the source. In R >= 2.14.1, it doesn't. > tf <- tempfile() > options( keep.source=TRUE) > texto <- c( 'function() { # comment', '}') > parse( text=texto) expression(function() { #
2019 Jul 16
4
Syncing Sysvol
Hi, in this thread: https://lists.samba.org/archive/samba/2019-July/224365.html Joachim Lindenberg reminded me that he was using smbclient to sync Sysvol. He posted (in the link above) a link to his original post: https://lists.samba.org/archive/samba/2019-July/224346.html Here he posted a copy of his script. I personally would never have thought about using smbclient, but it just goes to
2010 May 18
2
automate curve drawing on nls() object
Hi, I would like to use the curve() function to draw the predicted curve from an nls() object. for example: dd<-read.table("dd.txt",sep='\t',header=T,row.names=1) obj<-nls(y~c+(d-c)/(1+(x/e)^b),data=dd,start=list(b=-1, c=0, d=100, e=150)) coef(obj) b c d e -1.1416422 0.6987028 102.8613176 135.9373131
2011 Feb 03
1
bug in codetools/R CMD check?
Hi Mr Tierney, I have noticed an error message from R 1.12.x's CMD check for a while (apparently prof Ripley completely rewrote CMD check in R 1.12+) e.g.: http://bioconductor.org/checkResults/2.7/bioc-LATEST/snpMatrix/lamb2-checksrc.html ---------------- * checking R code for possible problems ... NOTE Warning: non-unique value when setting 'row.names': ?new? Error in
2006 Nov 25
2
Source references from the parser
I have just committed some changes to R-devel (which will become R 2.5.0 next spring) to add source references to parsed R code. Here's a description of the scheme: The design is done through 2 old-style classes. "srcfile" corresponds to a source file: it contains a filename, the working directory in which that filename is to be interpreted, the last modified timestamp of the
2016 May 20
2
identical on closures
Specifically, the srcfile attribute of the srcref attribute of the two instances of the functions contain different environments, AFAICT. Environments are compared only by exact pointer, so this forces return FALSE. Snippets from .Internal(inspect(x)) and .Internal(inspect(y)): @cca008 03 CLOSXP g0c0 [MARK,NAM(2),ATT] FORMALS: @604b58 00 NILSXP g0c0 [MARK,NAM(2)] BODY: @cc9650 06 LANGSXP
2013 Dec 13
1
Proper way to drop 'srcref' from an expression created via substitute(function() ...)?
First, why does this expression have a 'srcref' element: > exprA <- substitute(function(x) a*x, list(a=2)) > print(exprA) function(x) 2 * x > str(as.list(exprA)) List of 4 $ : symbol function $ :Dotted pair list of 1 ..$ x: symbol $ : language 2 * x $ :Class 'srcref' atomic [1:8] 1 20 1 34 20 34 1 1 .. ..- attr(*, "srcfile")=Classes
2016 Mar 13
1
formals(x)<- drops attributes including class
Just checking in to see whether it is intended or not that assigning new formals to a function/closure causes any attributes to be dropped: EXAMPLE: > fcn <- structure(function() {}, foo="foo", class=c("foo")) > str(fcn) function () - attr(*, "srcref")=Class 'srcref' atomic [1:8] 1 18 1 30 18 30 1 1 .. ..- attr(*, "srcfile")=Classes
2007 Dec 03
1
Fwd: source('clipboard')
In the code below the first source command works fine, but the second does not, as can be seen from the error message. Is there a way to have the second command work? I am using R 2.6.1 on Windows Vista. (The command that is in the clipboard is just "x <- 3") > source("clipboard", echo = F) > source("clipboard", echo = T) Error in file(srcfile$filename,