similar to: Multiple copies of attached packages

Displaying 20 results from an estimated 10000 matches similar to: "Multiple copies of attached packages"

2012 Jun 27
1
If statement - copying a factor variable to a new variable
I need to look through a dataset with two factor variables, and depending on certain criteria, create a new variable containing the data from one of those other variables. The problem is, R keeps making my new variable an integer and saving the data as a 1 or 2 (I believe the levels of the factor). I've tried using as.factor in the IF output statement, but that doesn't seem to work. Any
2005 Apr 21
2
Deciles and R
Hi everyone, I'm a new R user (if this is a really basic question, please do excuse me...) and I'm having some questions regarding a deciles problem. I have a variable which I need to categorize according to its deciles (X). However, this categorization should be made into another variable (call it NewVar). Ex. for the quartiles case (just for the sake of exposition, since I need
2012 Nov 22
1
Efficiently creating/defining new variables transformations
I would like to add an extension to the current name of a variable to create a new variable that is its sqrt transform. Each piece of the equation below works independently, but the left side definition fails on run. I also tried creating the variable name first, but ended up with an object that toString() did not fix. Better ideas? Example 1
2007 Feb 01
2
Losing factor levels when moving variables from one context to another
Hi, there I'm currently trying to figure out how to keep my "factor" levels for a variable when moving it from one data frame or matrix to another. Example below: vec1<-(rep("10",5)) vec2<-(rep("30",5)) vec3<-(rep("80",5)) vecs<-c(vec1, vec2, vec3) resp<-rnorm(2,15) dat<-as.data.frame(cbind(resp, vecs))
2004 Apr 14
2
attaching data.frame/list within a function
I'm trying to find a good way of attaching a list within a function such that the attached variables (the list's members) precede the global environment (.GlobalEnv) in the search list. Here is a non-working example using attach(), which hopefully explains better what I'm trying to do: > foo <- function(x=0, input=list(a=10)) { + attach(input) + on.exit(detach(input)) +
2011 Jan 04
1
Go from CALLINGout to just CALLING
Hello list, how can I go from CALLINGout to just CALLING ? I've tried : exten => s,n,Set(newVAR=${CUT(CALLINGout,,3)}) or exten => s,n,Set(newVAR=$[CUT(CALLINGout,,3)]) But no result : [Jan 4 11:10:12] -- Executing [s at from-S:34] NoOp("SIP/s2-0000003b", "newVAR=") in new stack Asterisk 1.6.10 here. Kind regards, Jonas. -------------- next part
2004 Sep 22
1
attaching to position 1
If an attempt is made to attach to position 1, it appears to work (not even a warning) but in fact it doesn't work as many would expect. "search" thinks that it gets placed in position 2, but nothing is actually there (according to "ls"). This is guaranteed to be confusing (and annoying) to people who are used to attaching to position 1 in S-PLUS. I'm not clear on
2003 Oct 13
1
AGI solution to Grandstream BT102 call waiting problem
I'm trying to fix a problem with the GrandStream Budgetone 102. I've been reading the source code, mailing lists and other resources. Here's the scenario and the approach I have been pursuing. I'm having some problems with the AGI calls and I hope someone can give me some clarification. PSTN <---> T1,PRI * <---> Grandstream BT 102 (12)
2009 Nov 05
2
Active bindings in attached environments
Hi, I was wondering if this is expected behavior for active bindings in attached environments, or if this is a bug: > e <- new.env() > makeActiveBinding('x',function() 'foo',e) > ls(e) [1] "x" > attach(e) > search() [1] ".GlobalEnv" "e" "package:graphics" [4] "package:grDevices"
2013 Jan 15
1
Removing an attached object
Dear All, I am a bit confused, I attached my data frame using 'attach(DATA)' Then I removed it using 'rm(DATA)' But for some reason it is still at position 2 at the search path search() [1] ".GlobalEnv" "DATA" "package:foreign" [4] "package:stats" "package:graphics" "package:grDevices" [7]
2003 Feb 21
1
require vs library
There seems to be a widespread assumption that the way for package foo to require package bar is via `require(bar)'. It isn't! That returns a logical which is in the vast majority of cases unchecked. So if the package is really required, the code will fail without a warning if the package is unavailable. You may as well call library() and let it do the checking. (In a few cases you
2006 Jul 11
2
detach
We try the following: search() as.Date(1) zoo:::as.Date.numeric under three circumstances: 1. on a fresh session 2. after issuing library(zoo) noting that as.Date.numeric is provided by zoo 3. after detaching zoo as.Date(1) fails on #1 but succeeds in #2 and #3. Should it not fail in #3 since zoo was detached? Is this how its supposed to work? (Note that entering zoo:::as.Date.numeric at
2006 May 24
5
Joining variables
Hello, If I have two variables that are factors or characters and I want to create a new variable that is the combination of both what function can I use to accomplish this? Ex. Var1 Var2 SA100055113 19851113 And I want NewVar SA10005511319851113 Thanks in advance. Cameron Guenther, Ph.D. Associate Research Scientist FWC/FWRI, Marine Fisheries Research 100 8th Avenue S.E. St.
2005 Apr 27
3
Time series indexes
I tried to assign values to specific elements of a time series and got in trouble. The code below should be almost self-explanatory. I wanted to assign 0 to the first element of x, but instead I assigned zero to the second element of x, which is not what I wanted. Is there a function that will allow me to do this without going into index arithmetic (which would be prone to errors)? FS >
2003 Apr 22
2
Handling of upper/lowercase in package names (PR#2816)
Hi, This is (presumably?) a bug in R 1.7.0 under Windows. I have not tested it on other systems. Attachment of packages is case sensitive but not library(), resulting in multiple loadings of the same package if the library name is spelled differently. The following example loads the `tools' package, once as `tools' and once as `Tools'. This behavior is the same with all packages and
2000 Jun 02
1
problem loading packages (PR#559)
Dear R team, I had a strange problem that appeared suddenly, and which I'd like to to mention in case it is of interest (although I suspect that I may have unwittingly done something dumb: if so please accept my apology) > library(ctest) ## or any package other than "oz" that I tried Error in as.character(table) : Object ".Dyn.libs" not found > traceback() [1]
2000 Sep 05
2
how to detach a library?
Dear R-users, What command do I need to use to detach a library? (without restart the R session). Thanks, Agus -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To:
2009 Feb 27
1
Large 3d array manipulation
I have a large 3 dimensional array of size (243,246,768) The first dimension is Rows, second is columns and the third is Time. So for each row and column, I want to calculate the mean of time steps 1:8, 2:9, 3:10 and so on and assign the values to a new array. For this I am using the following script. for(i in 1:243) { for(j in 1:246) { for(k in 1:768) { newVar[i,j,k] <- mean(
2010 Nov 15
2
Trying to understand the search path and namespaces
Hi all, I'm trying to understand how the search path and namespaces interact. For example, take the devtools package which suggests the testthat package. Here's what the search path looks like after I load each of those packages: > library(devtools) > search() [1] ".GlobalEnv" "package:devtools" "package:stats" [4]
2023 Apr 04
2
on lexical scoping....
obviously, everyone has different opinions on what's useful but I always found this document quite helpful. I think, in the past, someone said that there are some incorrect statements in but I'm not sure what they are. https://askming.github.io/study_notes/Stats_Comp/Note-How%20R%20searches%20and%20finds%20stuff.html On Tue, Apr 4, 2023 at 7:06?PM Bert Gunter <bgunter.4567 at