similar to: R-beta: Source code: grep(.) and objects(..., pattern):

Displaying 20 results from an estimated 20000 matches similar to: "R-beta: Source code: grep(.) and objects(..., pattern):"

2003 Nov 26
0
Question about Unix file paths (and proposal for new regexp class)
> Date: Wed, 26 Nov 2003 13:52:44 +0100 > From: Martin Maechler <maechler@stat.math.ethz.ch> > To: <Kurt.Hornik@wu-wien.ac.at> > Cc: <r-devel@stat.math.ethz.ch> > Subject: Re: [Rd] Question about Unix file paths > > > > >>>>> " Kurt" == Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> > >>>>> on Wed, 26
2015 Jan 09
2
RFC: getifexists() {was [Bug 16065] "exists" ...}
>>>>> Martin Maechler <maechler at stat.math.ethz.ch> >>>>> on Fri, 9 Jan 2015 14:00:38 +0100 writes: >>>>> Michael Lawrence <lawrence.michael at gene.com> >>>>> on Thu, 8 Jan 2015 14:02:26 -0800 writes: >> On Thu, Jan 8, 2015 at 11:57 AM, <luke-tierney at uiowa.edu> wrote: >>> On Thu, 8
2001 Jan 10
1
eval() bug in plot.formula() ?
I don't have time now to investigate myself, and I'm not feeling like deciding myself if the following is a bug: myplot <- function(dat, cex = 1.2, ...) { if(!is.data.frame(dat <- as.data.frame(dat))) stop("`dat' must be a data.frame") if(any(is.na(match(c("x","y"), names(dat))))) stop("`dat' must have a `x' and a
2000 Feb 11
1
Something strange in "?assign"? (PR#433)
According to the assign helpfile (0.90.1) the "assign" function is function (x, value, pos = -1, envir = sys.frame(sys.parent()), inherits = FALSE, immediate = TRUE) which is not quite the implementation, which is function (x, value, pos = -1, envir = pos.to.env(pos), inherits = FALSE, immediate = TRUE) This seems to have the following interesting effect. "short.fun"
2015 Jan 08
0
RFC: getifexists() {was [Bug 16065] "exists" ...}
Adding an optional argument to get (and mget) like val <- get(name, where, ..., value.if.not.found=NULL ) (*) would be useful for many. HOWEVER, it is possible that there could be some confusion here: (*) can give a NULL because either x exists and has value NULL, or because x doesn't exist. If that matters, the user would need to be careful about specifying a value.if.not.found
2002 Sep 27
3
? Exact pattern matching in GREP ?
How is exact pattern matching achieved in GREP (and GREPlike) functions ? # Want: listing of all object names that end in *.lm > objects(pattern="*.lm",pos=1) # ... but get: all objects that partially match *.lm, e.g., *.lme [1] "j3.lm" "J3.lme" "j8.lm" "J8.lme" # Want: position of string "4jan2002" in vector >
2005 Jun 10
1
Exiting R and package detachment?
Hi, is there away to assure that a package is detached when R quits? I know about .Last(), but that requires the user to setup that function. What I am looking for is a way for the package to do this itself, without asking the user to edit "their" .Last(). From ?setHook I know that: "...when an R is finished, packages are not detached and namespaces are not unloaded, so
2015 Jan 08
2
RFC: getifexists() {was [Bug 16065] "exists" ...}
On Thu, Jan 8, 2015 at 11:57 AM, <luke-tierney at uiowa.edu> wrote: > On Thu, 8 Jan 2015, Michael Lawrence wrote: > > If we do add an argument to get(), then it should be named consistently >> with the ifnotfound argument of mget(). As mentioned, the possibility of a >> NULL value is problematic. One solution is a sentinel value that indicates >> an unbound value
2015 Jan 08
1
RFC: getifexists() {was [Bug 16065] "exists" ...}
On 08/01/2015 9:03 AM, John Nolan wrote: > Adding an optional argument to get (and mget) like > > val <- get(name, where, ..., value.if.not.found=NULL ) (*) That would be a bad idea, as it would change behaviour of existing uses of get(). What I suggested would not give a default. If the arg was missing, we'd get the old behaviour, if the arg was present, we'd use it.
2010 May 26
2
writing function : can't find an object
Dear group, Here is my function: #return the daily PL for day y PLDaily<-function(x,y) { #find elements in my directory with "LSCPos" in the name, keep the numeric part in the name and #create a list l<-gsub("\\D","",dir()[grep("LSCPos",dir())]) #select in the list the desired elements
2009 Dec 17
2
issue with using rm: cannot generate on-the-fly list
Hello, I have the following problem when trying to use rm: In a top level script file I have a loop iterating over some index. The loop is not contained within a function, so the scope of variables declared in the loop is global. Within this loop I generate several variables which should be removed at the end of each iteration. To do this, I wrote a function to clean up the workspace. An example
2007 Mar 06
2
bug: sticky symbol refs? (PR#9555)
Hello. What happens in the following is that I create two simple functions, f and g, on the workspace. Then I replace g. When I then call f, it uses the old version of g. Now clearly, the circumstances for this to happen must be quite special and rare. But I'd say they're not pathological. It seems to require two things: 1) masked versions of f and g on a search position lower down the
2015 Jan 08
0
RFC: getifexists() {was [Bug 16065] "exists" ...}
On Thu, 8 Jan 2015, Michael Lawrence wrote: > If we do add an argument to get(), then it should be named consistently > with the ifnotfound argument of mget(). As mentioned, the possibility of a > NULL value is problematic. One solution is a sentinel value that indicates > an unbound value (like R_UnboundValue). A null default is fine -- it's a default; if it isn't right for
2014 Dec 04
0
we need an exists/get hybrid
All, So that suggests that .GlobalEnv[["X"]] is more efficient than get("X", pos=1L). What about .GlobalEnv[["X"]] <- value, compared to assign("X", value)? Dave On Wed, Dec 3, 2014 at 3:30 PM, Peter Haverty <haverty.peter at gene.com> wrote: > Thanks Winston! I'm amazed that "[[" beats calling the .Internal > directly. I
2004 Dec 03
2
setGeneric(rm)
Hi, We are developing a package using S4 classes. The S4 classes are wrappers to C++ classes. So S4 classes contain an integer that is the memory address of one C++ object. If an user calls the rm() function, the C++ object must be deleted. But our generic rm() function apparently doesn't work. Here is the code: # The class setClass("component",
2002 Dec 20
0
RE workspace vs. image
As an alternative to the use of multiple shortcus to gain entry to different R environments on WIndows platforms I would like to suggest the use of two R functions written by my colleague John Miyamoto. I have taken the liberty of attaching their definitions to this message. Their efficient use is based on adopting the following regimen or something like it: (1) at startup attach an .Rdata
2016 Mar 29
0
body(NULL) <- something; ditto formals() -- should not work
Hi, On 03/07/2016 09:26 AM, Martin Maechler wrote: > I'm proposing to signal an error (from R >= 3.3.0) in such > examples -- which do "work" in R 3.2.x and earlier : > >> f <- NULL; body(f) <- quote(sin(a+1)); f > function () > sin(a + 1) > <environment: 0x48f9798> > This works because formals() (the getter) works on things that are not a
2015 Jan 08
1
RFC: getifexists() {was [Bug 16065] "exists" ...}
> Adding an optional argument to get (and mget) like > val <- get(name, where, ..., value.if.not.found=NULL ) (*) > would be useful for many. HOWEVER, it is possible that there could be > some confusion here: (*) can give a NULL because either x exists and > has value NULL, or because x doesn't exist. If that matters, the user > would need to be careful about
2001 Jul 17
0
bug in the interface of ESS, R for linux, S+6 for linux (PR#1028)
Object name completion doesn't work on linux. On S+6 the problem seems to be that ESS uses the argument `inherits' and S+6 is expecting `inherit' . ".Last.value <- get(\".ess.lvsave\",inherits=T)\n") ; envir=1 . "assign(\".ess.lvsave\",.Last.value,inherits=T)\n") ;envir=1 -rw-r--r-- 1 544 everyone 7170 Mar 1 13:55
1998 May 02
0
R-beta: R-0.61.3 released
I've just put up R-0.61.3.tgz and R-0.61.2-0.61.3.diff.gz for anonymous FTP on ftp.stat.auckland.ac.nz. As usual: Don't get it from there unless you are in a desperate hurry. It will migrate to the CRAN sites within a day or two. (See the FAQ for the list of CRAN sites. And see the footer for the FAQ location....) This release mainly fixes a couple of embarassing bugs in 0.61.2. It is