search for: globalenv

Displaying 20 results from an estimated 150 matches for "globalenv".

2018 Mar 22
3
GlobalEnv error
Dear all May I know how to solve this problem? I have encountered this problem after I have logged out from Rstudio. Thank you Warning: namespace ?caret? is not available and has been replaced by .GlobalEnv when processing object ?fit.ann? Warning: namespace ?ggplot2? is not available and has been replaced by .GlobalEnv when processing object ?p1? Warning: namespace ?plotly? is not available and has been replaced by .GlobalEnv when processing object ?p? Warning: namespace ?easyGgplot2? is not availabl...
2018 Mar 22
0
GlobalEnv error
...22, 2018 at 2:07 PM, Haida <haidaharis at gmail.com> wrote: > Dear all > > May I know how to solve this problem? I have encountered this problem after > I have logged out from Rstudio. Thank you > > Warning: namespace ?caret? is not available and has been replaced > by .GlobalEnv when processing object ?fit.ann? > Warning: namespace ?ggplot2? is not available and has been replaced > by .GlobalEnv when processing object ?p1? > Warning: namespace ?plotly? is not available and has been replaced > by .GlobalEnv when processing object ?p? > Warning: namespace ?eas...
2018 Mar 23
1
GlobalEnv error
...s at gmail.com> wrote: > >> Dear all >> >> May I know how to solve this problem? I have encountered this problem >> after >> I have logged out from Rstudio. Thank you >> >> Warning: namespace ?caret? is not available and has been replaced >> by .GlobalEnv when processing object ?fit.ann? >> Warning: namespace ?ggplot2? is not available and has been replaced >> by .GlobalEnv when processing object ?p1? >> Warning: namespace ?plotly? is not available and has been replaced >> by .GlobalEnv when processing object ?p? >> War...
2012 Aug 05
2
setMethod sometimes fails to set package slot when signature has trailing 'ANY'
...uot;] with 4 slots ..@ .Data :function (x, y) ..@ target :Formal class 'signature' [package "methods"] with 3 slots .. .. ..@ .Data : chr [1:2] "A" "A" .. .. ..@ names : chr [1:2] "x" "y" .. .. ..@ package: chr [1:2] ".GlobalEnv" ".GlobalEnv" ..@ defined:Formal class 'signature' [package "methods"] with 3 slots .. .. ..@ .Data : chr [1:2] "A" "A" .. .. ..@ names : chr [1:2] "x" "y" .. .. ..@ package: chr [1:2] ".GlobalEnv" &quo...
2011 May 02
1
How to pass objects from local() to GlobalEnv
Hi all, I create some objects in local(), and want to pass them to GlobalEnv. How can I do this? Thanks! xiagao1982 2011-05-02 [[alternative HTML version deleted]]
2000 Jun 13
3
Question on closure (lexical scoping) and encapsulation
Dear R users, I have two related questions about scoping and data encapsulation. One is fairly specific - I am looking at "scoping.R" which is used in demo(scoping) - it's an example of lexical scoping and encapsulation. Where is the 'total' stored? It is not an attribute in 'ross' or 'robert' however, functions like balance() have access to it. Is it more
2000 Sep 29
0
Is it R or I?
...es(xd)[charmatch("addcolx", names(xd))] <- resp cat("Lm Model", "\n") lmexp <- formula(paste(resp, " ~ ", pickedlist,sep="")) lmexpall <- formula(paste(resp, " ~ .", sep="")) assign("xd", xd, env=.GlobalEnv) tmpzx <- lm(lmexp, data=xd) # NOTE: THE STEP() TAKES FOREVER IN R # tmpzx2 <-lm(lmexpall,data=xd) # tmpzxall <- step(tmpzx2, trace=0) cat ("Done building model", "\n") # Get predictions xp <- predict(tmpzx,se.fit=T,interval=c("c...
2009 Dec 17
2
issue with using rm: cannot generate on-the-fly list
...t;rv2", "rv3", "rv4")) { if(exists(varname)) { delList<-append(delList, varname) } } if(length(delList)>0) { rm(list=delList, pos=-1) #rm(list=delList, envir=parent.env(environment())) #rm(list=delList, envir=globalenv()) } } Unfortunately, this fails to work - it aborts with the following error: Error in rm(list = delList, pos = -1) : invalid first argument if I use rm(list=delList, pos=-1) Or with the following error: Error in rm(list = delList, evir = parent.env(environment())) : ... must contain names...
2011 Jan 26
1
Problem with "setMethod" in R package
...hen I try to incorporate the call to setMethod(...) in the package code itself, the only way I get it to work is to include the call in .onLoad(...) or .onAttach(...). This works, but when loading the library I get the messages "creating new generic function for "plot" in ".GlobalEnv", as well as "no definition for class "Rcpp_rothC""... Again, the code works, but the messages let me presume that I add the methods in the wrong way or miss-specify name spaces, class names, or something else. Thank you for your advice. Pascal (The error message and...
2006 Mar 31
3
Function dependency function
...source code to work out all the functions that could possibly be called. When I develop a function and release to production environment (or to some library) then I may need to release other functions I've developed which that function calls. As soon as the function call stack goes outside .GlobalEnv (for example into base) then the search can stop as I'm only interested in functions in .GlobalEnv (my own functions). Also useful would be the reverse function i.e. find all functions which could possibly call the function. This could be used to find functions which are never called and c...
2012 Apr 24
9
Moving from Puppet 0.25 to Puppet 2.6+ : global scope/variables
Hi, I worked with puppet (< 0.25) back in 2008/2009. We were able to deploy 200 servers from scratch and manage them. It worked fine. I''m now with a new customer and I''m pushing Puppet (and I''m also back to puppet on a side project). We''re considering Puppet 2.6 to manage RHEL/CentOS 5 or 6 hosts. I''m "upgrading myself" to Puppet
2005 Apr 14
1
Multiple copies of attached packages
I have noticed that after I ran a batch script multiple times I get multiple copies of a package's name when I call search(). Is this a problem? > search() [1] ".GlobalEnv" "DF" "DF" [4] "DF" "DF" "DF" multiple copies here ... [13] "DF" "DF" "DF" other packages here ... [28] "package:quadprog" &quot...
2018 Mar 04
2
Random Seed Location
The following helps identify when .GlobalEnv$.Random.seed has changed: rng_tracker <- local({ last <- .GlobalEnv$.Random.seed function(...) { curr <- .GlobalEnv$.Random.seed if (!identical(curr, last)) { warning(".Random.seed changed") last <<- curr } TRUE } }) addTaskCallback(rng_t...
2017 Dec 02
2
source files in temp environment
...files often create temporary variables that I don't want to keep around. I could clean up after myself with lots of rm()'s, but that's a pain, and is messy. I'm wondering if one solution might be to source the code in a temporary environment, assign outputs of interest to the .GlobalEnv with <<-, and then delete the environment afterwards. One way to do this: file.r: temp1 = 1 temp2 = 2 desired_var <<- temp1 + temp2 console: temp_e = new.env() source("file.r", local = temp_e) rm(temp_e) It's a bit messy to create and delete environments, so I tried w...
2005 Aug 02
1
Read from data frame, and not from global environment
Dear members, assume given a function of type test<-function(formula, data , w){ ...... glm1<-glm(formula, family=poisson, data=data, weights=w) ...... } and a simple example data frame as test.frame<-data.frame(x=1:10,y=(1:10)*2,a=(1:10)^3). Let us now execute test(y ~ x, test.frame, a ) My question is: What do I have to insert at the first occurance of ..... in the test
2018 Mar 04
0
Random Seed Location
On 04/03/2018 5:54 PM, Henrik Bengtsson wrote: > The following helps identify when .GlobalEnv$.Random.seed has changed: > > rng_tracker <- local({ > last <- .GlobalEnv$.Random.seed > function(...) { > curr <- .GlobalEnv$.Random.seed > if (!identical(curr, last)) { > warning(".Random.seed changed") > last <<- cur...
2014 Jul 08
2
Paquete generado no detectan ambiente particular creado.
Hola Eva. Me alegro de que hayas resuelto el problema! De todas formas, no tendrá algo que ver con los problemas de "globalización" de las variables que ya has tenido en .ChrL.env (hace un par de años, creo recordar)?. Un Saludo, Miguel. -----Mensaje original----- De: r-help-es-bounces en r-project.org [mailto:r-help-es-bounces en r-project.org] En nombre de Eva Prieto Castro
2006 Aug 25
5
Quickie : unload library
Dear list, I know it must be obvious and I did my homework. (In fact I've RSiteSearched with keyword "remove AND library" but got timed out.(why?)....) How do I unload a library? I don't mean getting ride of it permanently but just to unload it for the time being. A related problem : I have some libraries loaded at startup in .First() which I have in .Rprofile. Now, I exited R
2011 Oct 12
2
goofy class question
Dear R People: Here is a really goofy question. I have some objects which have 2 classes: data.frame and ucr. Also, the classes will always be in that order. I have tried all sorts of things, but to no avail. listucrModels <- function(envir=.GlobalEnv, ...) { objects <- ls(envir=envir, ...) if (length(objects) == 0) NULL else objects[sapply(objects, function(.x) "ucr"== (class(eval(parse(text=.x), envir=envir))[2]))] } > listucrModels() [1] NA NA NA NA NA NA NA...
2017 Dec 02
0
source files in temp environment
...mporary variables that I don't want to keep > around. I could clean up after myself with lots of rm()'s, but that's a > pain, and is messy. > > I'm wondering if one solution might be to source the code in a temporary > environment, assign outputs of interest to the .GlobalEnv with <<-, and > then delete the environment afterwards. One way to do this: > > file.r: > temp1 = 1 > temp2 = 2 > desired_var <<- temp1 + temp2 > > console: > temp_e = new.env() > source("file.r", local = temp_e) > rm(temp_e) > > It...