similar to: How to remove all objects except a few specified objects?

Displaying 20 results from an estimated 3000 matches similar to: "How to remove all objects except a few specified objects?"

2007 Jan 07
2
environmentName
I noticed the new environmentName in R 2.5.0dev. Thus I gather that each environment has: (1) a name (2) a hex value so 1. environmentName gets the name. Is there any way to set the name? 2. is there any way to get the hex value for an environment other than doing: e <- new.env() capture.output(e)
2010 Jul 14
1
Set environment name
Hello All, ?environmentName shows how to get the environment name. But I don't see how to set the name in the first place. Could you tell me where to look for the function that set the environment name? -- Tom
2016 Dec 08
2
methods(`|`) lists all functions?
Dear R-Devel, I was attempting an exercise in Hadley Wickam's book "Advanced R". The exercise is to find the generic with the greatest number of methods. I found that 'methods(`|`)' produces a list of length 2506, in R 3.3.1. Similar behavior is found in 3.4.0. It seems to include all functions and methods. I imagine something is being passed to "grep" without
2015 Jul 07
3
List S3 methods and defining packages
Hi, from the man page ?methods, I expected to be able to build pairs (class,package) for a given S3 method, e.g., print, using attr(methods(print), 'info'). However all the methods, except the ones defined in base or S4 methods, get the 'from' value "registered S3method for print", instead of the actual package name (see below for the first rows). Is this normal
2010 Sep 07
2
R package to identify model
Dear all, I would like to know if there is a R package performing model identification? thank you! -- View this message in context: http://r.789695.n4.nabble.com/R-package-to-identify-model-tp2529525p2529525.html Sent from the R help mailing list archive at Nabble.com.
2010 Sep 07
4
minor diagonal in R
Dear all, seems that easy question but cannot find the function for that. How to get the elements of the minor diagonal of the matrix? Thanks a lot. [[alternative HTML version deleted]]
2016 Apr 13
2
formula argument evaluation
I suppose it would work, although "=>" is rather a descriptive symbol and less a function. But choosing between quoting: "A + B => C" and a regular function: A + B %=>% C probably quoting is the most straightforward, as the result of the foo() function has to be a string anyways (which is parsed by other functions). On Tue, Apr 12, 2016 at 6:20 PM, Richard M.
2010 Sep 14
5
Problem with cat()
Dear all, I have a problem with the cat() function. Let say I have following: fn1 <- function(n = 5){ mat <- matrix(rnorm(5*5), 5, 5) cat(as.character(mat)) return(n) } However when I run above function I get this: > fn1() -0.601930631438248 -1.16950049447942 0.469257329394626 -1.39766868242906 -1.02580943892082 1.4067931110327 -1.07245318857022 -0.0205043699310245 0.234628727206755
2010 Sep 10
2
gee p values
windows Vista R 2.10.1 Is it possible to get p values from gee? Summary(geemodel) does not appear to produce p values.: > fit4<- gee(y~time, id=Subject, data=data.frame(data)) Beginning Cgee S-function, @(#) geeformula.q 4.13 98/01/27 running glm to get initial regression estimate (Intercept) time 1.1215614 0.8504413 > summary(fit4) GEE: GENERALIZED LINEAR MODELS FOR
2016 Apr 13
0
formula argument evaluation
%=>% would have precendence ('order of operations') problems also. A + B %=>% C is equivalent to A + ( B %=>% C) and I don't think that is what you want. as.list(quote(A + B %=>% C)) shows the first branch in the parse tree. The following function, str.language, shows the entire parse tree, as in > str.language(quote(A + B %=>% C)) `quote(A + B %=>%
2011 Jan 14
1
Help on a Display function
> I wanted to simulate the Matlab DISPLAY function for some time now. After seeing a recent proposal by Gabor Grothendieck I came up with the following solution, display <- function(...) { my_names <- lapply(substitute(placeholderFunction(...))[-1], deparse) for (my in my_names) cat(my, "=", eval(parse(text=my)), "\n", sep=" ") } that works about as
2010 Aug 28
9
How to define new matrix based on an elementary row operation in a single step?
-- View this message in context: http://r.789695.n4.nabble.com/How-to-define-new-matrix-based-on-an-elementary-row-operation-in-a-single-step-tp2341768p2341768.html Sent from the R help mailing list archive at Nabble.com.
2016 Dec 09
0
methods(`|`) lists all functions?
On 12/08/2016 05:16 PM, frederik at ofb.net wrote: > Dear R-Devel, > > I was attempting an exercise in Hadley Wickam's book "Advanced R". The > exercise is to find the generic with the greatest number of methods. > > I found that 'methods(`|`)' produces a list of length 2506, in R > 3.3.1. Similar behavior is found in 3.4.0. It seems to include all >
2011 Oct 20
1
How to remove all objects except the sequence
Dear All: I would like to know if there is plausible way to say to R to remove all elements in the memory but the sequence. I have a code which makes a loop, and what I want is after the programme has performed all the operation over every "i"th element, to remove all the objects, expect the sequence parameter. I included the option "rm(list=ls(all=TRUE))", but obviously that
2015 Jul 07
0
List S3 methods and defining packages
On 07/07/2015 02:05 AM, Renaud Gaujoux wrote: > Hi, > > from the man page ?methods, I expected to be able to build pairs > (class,package) for a given S3 method, e.g., print, using > > attr(methods(print), 'info'). > > However all the methods, except the ones defined in base or S4 > methods, get the 'from' value "registered S3method for print",
2011 Mar 10
2
Create an environment and assign objects to it in one go?
Hi, I've just created: newEnvEval <- function(..., hash=FALSE, parent=parent.frame(), size=29L) { envir <- new.env(hash=hash, parent=parent, size=size); evalq(..., envir=envir); envir; } # newEnvEval() so that I can create an environment and assign objects to it in one go, e.g. env <- newEnvEval({ a <- 1; b <- 2; }); print(env$a); Does this already exists somewhere?
2015 Jul 08
0
List S3 methods and defining packages
Thanks Kevin, this indeed clarifies a bit the S3 method registration universe. On 8 July 2015 at 15:48, Kevin Wright <kw.stat at gmail.com> wrote: > Not sure if this answers your question, but you can't unregister a method. See > > http://tolstoy.newcastle.edu.au/R/help/06/07/30791.html > > Kevin Wright > > > On Wed, Jul 8, 2015 at 5:09 AM, Renaud Gaujoux >
2009 Nov 12
1
S4 objects in the data directory
Hi [R-2.10.0; suse linux] I am having difficulty creating S4 objects in the data directory of a package. I want to create a bunch of simple S4 objects for use in the examples section of the Rd files. It says in R-exts that: " R code should be ?self-sufficient? and not make use of extra functionality provided by the package, so that the data file can also be used without having to load
2010 Jul 21
1
Objects within environment
Hi all, I have following environments loaded with my current R session: > search() [1] ".GlobalEnv" "package:stats" "package:graphics" "package:grDevices" [5] "package:utils" "package:datasets" "package:methods" "Autoloads" [9] "package:base" How can I find the objects
2002 May 17
1
What is the most efficient way to assign to PARTS of objects in other frames/environments?
Can please someone familiar with the R internals explain on the following: PR#1434 from r-bugs clarifies that assign("a[1]", x, SomeOtherFrame) or assign("a$a", x, SomeOtherFrame) will NOT assign to an object 'a' in the other frame BUT create a new object called 'a[1]' resp. 'a$a'. This leads to the following question: what is the most