search for: object2

Displaying 20 results from an estimated 41 matches for "object2".

Did you mean: objects
2006 Aug 05
1
formating for dist function
Hi there I have a list that looks like this object1 object1 78 object1 object2 45 object1 object3 34 object1 object4 45 object2 object2 89 object2 object3 32 object2 object4 13 but i want to create a matrix like this in order to use the dist function of R object1 object2 object3 object4 object1 78 45 34 45...
2009 Jul 30
3
Looping through R objects with $ operator and tags
Hi all, Suppose I want to set the values in a column to the log of the values of another column like so: object$LogDist <- log10(object$Distance) How do I loop through the objects if I have object1, object2, etc to perform this function? object1$LogDist <- log10(object1$Distance) object2$LogDist <- log10(object2$Distance) object3$LogDist <- log10(object3$Distance) I was trying to use the assign and paste functions like so: for (i in c(1:10)) assign(paste("object",i,"$LogDist...
2018 Mar 20
0
Struggling to compute marginal effects !
In that case, I can't work out why the first model fails but not the second. I would start looking at "Data" to see what it contains. if: object2 <- polr(Inc ~ Training ,Data,Hess = T,method = "logistic" ) works, the problem may be with the "Adopt" variable. Jim On Tue, Mar 20, 2018 at 10:55 AM, Willy Byamungu <wmulimbi at email.uark.edu> wrote: > Sorry, do not read "Inc_reliable_fromNTA" I did a...
2002 Apr 12
1
Problems with memory
...#39;m using the R under the emacs (ESS-5.1.20) and it is started by the command: Rterm --min-vsize=10M --max-vsize=100M --min-nsize=500k --max-nsize=1M I've been had problems when executing a loop like: attach("data.Rdata") for (i in 1:n) { object1<-fun1(data...) object2<-fun2(...object1) object3<-fun3(...object2) object4[,i]<-fun4(...object3) rm("object1","object2","object3") } After few interactions it stops with the message: "Error: cannot allocate vector of size 7890 Kb In addition: Warning...
2006 Jan 10
2
Transactions with multiple databases
hi, i have problem with transactions and multiple databases. Object1 and Object2 are two different models/databases with different connections, when i use only one model: Object1.transaction do object1.value1 = "123456" object1.save do_some_error end it''s ok, error is produced, nothing is commited and database is unchanged. when i use 2 models, d...
2001 Nov 19
2
Vectors of objects...
...hould have read. This is a simpler case of what I posted on Friday. I am trying to build something in R that resembles an array of structures in C. > # Create some simple objects (ordinarily objects generated by a function) > object <- list(a="test", b=c(1.0,2.0,3.0,4.0)) > object2 <- list(a="test2", b=c(2.0,4.0,6.0,8.0)) > # Create a vector of length 2 > mega <- 1:2 At this point I want to insert object 1 into the first element of the vector 'mega' and object 2 into the second element. > mega[[1]] <- object Error: more elements supplied...
2011 Oct 28
3
program never enters browser mode when I add browser()
Dear All I have a program that breaks at the following lines of code: bigfunction = { ... object1 = myfunction(x) object2 = strsplit(object1, ",")[[1]] ... } where myfunction is defined elsewhere outside of bigfunction. The error I get is "error in strsplit() -- object1 not found". However, when I insert browser() into my code so that the above reads, bigfunction = { ... browser() object1...
2009 Jun 15
1
Create R object
...st(a1=matrix(rnorm(4),2,2), a2=matrix(rnorm(4),2,2),a3=matrix(rnorm(4),2,2)). Here I only use three elements for illustration, and in fact the length of lst, n, is unknown in advance. I want to define an object for each element of this lst, and the objects have names like "object1", "object2",...,"objectn". I could use a loop like the following: for (i in 1:length(lst)){ assign(paste("object",i,sep=""),lst[[i]]) } I wonder if there's a way to avoid this loop? 2. I want to validate whether all of the "object"s have the same dimension...
2003 Feb 17
2
returning argument names
...ot; construct, how can I get the function to return the names of the items which were the arguments of the function as part of the function's output? This is easily done where there is a fixed number of arguments: e.g: aa<-c(1,2,3,4,5) bb<-c(6,7,8,9,10) argument.out<-function(object1,object2){ name1<-deparse(substitute(object1)) name2<-deparse(substitute(object2)) output<-c(name1,name2) return(output) } argument.out(aa,bb) How can I produce a similar results from a function where there is an indeterminate number of arguments i.e: argument.list<-function(object,...){ Any...
2008 Sep 09
1
write dataframes
...if I write str(object1), I see this, data.frame': 47 obs. of 3 variables: $ ORF : Factor w/ 245 levels "YAL038W","YAL054C",..: 10 19 38 39 44 45 50 51 59 60 ... $ mRNA : num 0.891 1.148 1.202 1.479 1.445 ... $ Protein: num 1.230 1.288 1.175 0.724 0.851 .. str(object2) 'data.frame': 21 obs. of 3 variables: $ ORF : Factor w/ 245 levels "YAL038W","YAL054C",..: 11 25 40 55 66 78 104 119 141 153 ... $ mRNA : num 0.794 0.741 0.676 1.047 0.912 ... $ Protein: num 0.427 0.363 0.468 0.501 0.661 ... using the column $ORF from ea...
2010 Aug 03
2
multiple R sessions from one working directory using GNU screen
Dear all, I am using GNU screen to run multiple R sessions from one working directory in order to split task, however I noticed that dataset is not synchronized e.g. if I have two sessions R1 and R2, and I remove an object from R1, R2 doesn't change as expected or change at random. I have tried to save.image(), q() and then restart both sessions, but it does not help. Any suggestions?
2007 Mar 09
4
How to create a list that grows automatically
...or anything) which grows automatically as more elements are put into it. What I want to find is something equivalent to an ArrayList object of Java language. In Java, I can do the following thing: // Java code ArrayList myArray = new ArrayList(); myArray.add("object1"); myArray.add("object2"); .... // End of java code Thanks in advance. Young-Jin Lee [[alternative HTML version deleted]]
2007 Mar 09
4
How to create a list that grows automatically
...or anything) which grows automatically as more elements are put into it. What I want to find is something equivalent to an ArrayList object of Java language. In Java, I can do the following thing: // Java code ArrayList myArray = new ArrayList(); myArray.add("object1"); myArray.add("object2"); .... // End of java code Thanks in advance. Young-Jin Lee [[alternative HTML version deleted]]
2010 Mar 18
1
Rcmdr plugins produce error
...Plugin.TeachingDemos FWIW, I'm on Windows XP with R version 2.10.1 R Commander Version 1.5-4. Other than reporting this behavior, I was wondering if anyone knew how to restart Rcmdr (minus plugins) without having to restart RGUI? Rob Baer > Commander() Warning in if (where < 1) rbind(object2, object1) else rbind(object1[1:floor(where), : the condition has length > 1 and only the first element will be used Warning in 1:floor(where) : numerical expression has 2 elements: only the first used Warning in (floor(where) + 1):n : numerical expression has 2 elements: only the first us...
2008 Sep 16
2
casting a character vector as an object
Greetings, I need to compare the ratios of vector sizes like this: length(object1) / length(object2) I have many vector objects to compare, so I would like to do it in a loop. I created a loop like this: mat1 <- matrix() for (i in 1:6) { for (j in 1:6) { mat1[i,j] <- length( paste("object",i,sep="")) / (paste("object",j,sep="&qu...
2019 Nov 14
2
samba-tool ldapcmp without --filter errors out.
...md/__init__.py", line 186, in _run ??? return self.run(*args, **kwargs) ? File "/usr/lib/python3/dist-packages/samba/netcmd/ldapcmp.py", line 957, in run ??? if b1.diff(b2): ? File "/usr/lib/python3/dist-packages/samba/netcmd/ldapcmp.py", line 781, in diff ??? if object1 == object2: ? File "/usr/lib/python3/dist-packages/samba/netcmd/ldapcmp.py", line 549, in __eq__ ??? return self.cmp_attrs(other) ? File "/usr/lib/python3/dist-packages/samba/netcmd/ldapcmp.py", line 590, in cmp_attrs ??? if isinstance(self.attributes[x], list) and isinstance(other.attribu...
2008 Apr 08
2
Problem with NA data when computing standard error
Hey, I want to compute means and standard errors as two tables like this: se<-function(x)sqrt(var(x)/length(x)) object1<-as.data.frame.table(tapply(Data[Year=="1999"],na.rm=T,list(Group[Year=="1999"],Season[Year=="1999"]),mean)) object2<-as.data.frame.table(tapply(Data[Year=="1999"],na.rm=T,list(Group[Year=="1999"],Season[Year=="1999"]),se)) Part of the data is labeled as NA, therfore the na.rm=T. I succeed in creating the table for the means, but not for the standard errors. The message is "...
2006 Mar 09
2
How do I get an array of object ids?
If a = object, then a[:id] => 11 (ie, the primary key value of object. But if bs = [ object1, object2], then bs.each { |b| = b[:id] } => bs What I want is an array of the object ids? Suggestions?
2011 Jun 17
1
Rcmdr Plugin error
Dear R People: (particularly those who have build Rcmdr Plugin packages): I'm building a new Plugin and keep getting the following error: Error in if (is.null(where) || where >= n) rbind(object1, object2) else if (where < : missing value where TRUE/FALSE needed Error in library(RcmdrPlugin Have any of you run into this, please? I feel like I've seen it before but can't find the solution. Thanks, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sc...
2012 Feb 24
1
remove multiple objects starting with same name
Hi, I'm trying to figure out syntax R function rm() needs to remove all objects starting with same name. For example, if I have object1, object2, object3, i want to do an operation similar to UNIX rm object* Thanks. -- View this message in context: http://r.789695.n4.nabble.com/remove-multiple-objects-starting-with-same-name-tp4418694p4418694.html Sent from the R help mailing list archive at Nabble.com.