search for: abind

Displaying 20 results from an estimated 134 matches for "abind".

Did you mean: bind
2006 Nov 23
2
loading libraries on MPI cluster
...on each node but if we type a function belonging to the loaded package R doesn't find it. > library(snow) # making cluster with 3 nodes > cl <- makeCluster(3, type = "MPI") Loading required package: Rmpi 3 slaves are spawned successfully. 0 failed. #loading library abind on each node > clusterEvalQ(cl,library(abind)) [[1]] [1] "abind" "EMsspir" "mvtnorm" "MASS" "snow" "Rmpi" [7] "methods" "stats" "graphics" "grDevices" "utils"...
2003 Oct 21
5
do.call() and aperm()
...mensional [actually an n-by-n-by ... by-n array]. Neither n nor d is known in advance. I want to bind the elements together in a higher-dimensional array. Toy example follows with d=n=3. f <- function(n){array(n,c(3,3,3))} x <- sapply(1:3,f,simplify=FALSE) Then what I want is ans <- abind(x[[1]] , x[[2]] , x[[3]] , along=4) [abind() is defined in library(abind)]. Note that dim(ans) is c(3,3,3,3), as required. PROBLEM: how do I do tell do.call() that I want to give abind() the extra argument along=4 (in general, I want along=length(dim(x[[1]]))+1)? Oblig Attempt: jj <- func...
2004 Mar 20
0
new version of abind()
There is a new version of the abind package on CRAN (abind_1.1-0). abind() is a multi-dimensional generalization of cbind() and rbind() -- it can bind multiple 2-d matrices into a 3-d array, or bind 3-d arrays together, etc. In this new version the behavior of the function abind() has been enhanced slightly (it can now accept a...
2004 Mar 20
0
new version of abind()
There is a new version of the abind package on CRAN (abind_1.1-0). abind() is a multi-dimensional generalization of cbind() and rbind() -- it can bind multiple 2-d matrices into a 3-d array, or bind 3-d arrays together, etc. In this new version the behavior of the function abind() has been enhanced slightly (it can now accept a...
2008 Oct 28
2
abind
I am trying to combine two arrays with different dimensions into one. For example The first one is 1 2 3 4 5 6 The second one is 7 8 9 10 The resulted one would be like , , 1 1 2 3 4 5 6 , , 2 7 8 9 10 I used abind to do this, but failed. Could somebody please let me know how to do this in R? Thanks so many. Suyan
2005 Apr 21
1
Installing packages from source code
...am using R 2.1.0 and Win NT. Following the Windows toolset section in the manual, I download the tool set package from: http://www.murdoch-sutherland.com/Rtools/tools.zip and unzip under C:\tools I also downloaded Perl (Windows Port) and installed it. I downloaded source code of abind package (abind.1.1-0.tar.gz) to C:\, as an example. 1. I tried to install abind package in Rgui by typing in: install.packages(repos=NULL, pkgs='c:/abind.1.1-0.tar.gz', type='source', lib = 'c:/program files/r/rw2010/library/') Warning message: installation of pack...
2009 Sep 03
5
abind, but on lists?
...data files, I would want to concatenate them into a single list. cbind() doesn't preserve the row names, possibly because the array has three dimensions? > cbind(data1, data2) data1 data2 [1,] List,1002 List,479 [2,] List,8 List,8 [3,] List,8 List,8 Then I looked into abind(), which is even more puzzling: it preserves the names and dimensions correctly, but converts the entries into strings?! > abind(list(data1, data2), along=2, force.array=FALSE) , , 1 [,1] [,2] trials "0" "1" beforeRun "20...
2011 Aug 12
1
install packages from intranet
..."] = "http://localhost" > r["CRANextra"] = "http://localhost/pub/RWin" > options(repos=r) > r ?????????????????????? CRAN?????????????????? CRANextra ???????? "http://localhost" "http://localhost/pub/RWin" > install.packages("abind") Warning: unable to access index for repository http://localhost/bin/windows/cont rib/2.13 Warning: unable to access index for repository http://localhost/pub/RWin/bin/win dows/contrib/2.13 Warning message: In getDependencies(pkgs, dependencies, available, lib) : ? package 'abind' is...
2013 Apr 10
6
means in tables
Hi. I have 2 tables, with same dimensions (8000 x 5). Something like: tab1: V1 V2 V3 V4 V5 14.23 1.71 2.43 15.6 127 13.20 1.78 2.14 11.2 100 13.16 2.36 2.67 18.6 101 14.37 1.95 2.50 16.8 113 13.24 2.59 2.87 21.0 118 tab2: V1 V2 V3 V4 V5 1.23 1.1 2.3 1.6 17 1.20 1.8 2.4 1.2 10 1.16 2.6 2.7 1.6 11 1.37 1.5 2.0 1.8 13 1.24 2.9 2.7 2.0 18 I need generate a table of averages, the
2005 Oct 21
1
Generalised rbind/cbind
Dear list, Is there a generalised form of rbind/cbind for combining matrices/arrays into higher-D structures? ie. if I have: a <- matrix(2,2,2) b <- matrix(3,2,2) how can I get array(rep(c(3,2), each=4), c(2,2,2)) ? It seems like this would be the job of a generalised abind function: abind(a,b, along=1) == rbind(a,b) abind(a,b, along=2) == cbind(a,b) abind(a,b, along=3) ==array(rep(c(3,2), each=4), c(2,2,2)) Thanks, Hadley
2002 Mar 13
1
several bugs (PR#918) lists and matrices
...element. > tmpv ## Both elements are still here. [[1]] [1] "abcd" [[2]] NULL > tmpv[1] <- NULL ## I assigned to the first element. > tmpv ## The second element is gone. [[1]] NULL > ### This time the issue came up in an attempt to make abind work with R. ### abind() is a generalization of rbind and cbind to arrays. ### Tony Plate and I posted it to StatLib in 1996 ### (http://lib.stat.cmu.edu/S/abind). ### I would like you to consider adding abind to R. ### The posted abind doesn't work in R, for the reasons above and due to ### a...
2012 Mar 13
1
Visualising multiple response contingency tables
...q.test()) and then sum up the results, I get the answer I want. Clearly this is cumbersome, which is why I do it in Excel at the moment (I know shame on me). However, I really want to take advantage of the mosaic function in vcd. So what I have to do at the moment is create the tables above and use abind() (package:abind) to bring my two matrices together to form a multidimensional matrix. Example: > gh.abind = abind(g.mtrx,h.mtrx,along=3)> dimnames(gh.abind)=list(Sex=c("F","M"),Responses=c("Yes","No"),Factors=c("A","B"))> gh.abi...
2011 Jan 20
1
syntax for a list of components from a list
I'm attempting to generalise a function that reads individual list components, in this case they are matrices, and converts them into 3 dimensional array. I can input each matrix individually, but want to do it for about 1,000 of them ... This works array2 <- abind(list1[[1]],list1[[2]],list1[[3]],along=3) This doesn't array2 <- abind(list1[[1:3]],along=3) This doesn't either array2 <- abind((list1[[1]]:(list1[[3]]),along=3) Any thoughts how I can make this work for larger numbers? Thanks J =============================== Dr. Jim Maas Unive...
2009 Oct 19
1
rbind to array members‏
(resent as hotmail really cannot format plaintext, but I've just read Tony Plate's message that what I'd like to do might not be possible) > > library(abind) ## array binding I've looked into using abind() but it seems I might not understand it properly. I can build my 2 table array and insert a row into each table using: x <- array(0,c(1,3,2)) x[,,1] <- c(1,2,3) x[,,2] <- c(7,8,8) And I can use rbind() or a...
2009 Oct 18
2
rbind to array members
Hi, I would like to add rows to arbitrary tables within a 3dimensional array. I can directly add data to an existing row of a table: > x <- array(0,c(1,3,2))> x[,,1] <- c(1,2,3) And I can even add a row to the table and assign to another object. > y <- rbind(x[,,1], c(4,5,6)) and 'y' is what I want it to be:> y?? ? [,1] [,2] [,3][1,] ? ?1 ? ?2 ? 3[2,] ? ?4 ? ?5 ? 6 but
2011 Jun 13
1
Composing two n-dimensional arrays into one n+1-dimensional array
If I have 2 n-dimensional arrays, how do I compose them into a n+1-dimension array? Is there a standard R function that's something like the following, but that gives clean errors, handles all the edge cases, etc. abind <- function(a,b) structure( c(a,b), dim = c(dim(a), 2) ) m1 <- array(1:6,c(2,3)) m2 <- m1 + 10 abind(m1,m2) ==> , , 1 [,1] [,2] [,3] [1,] 1 3 5 [2,] 2 4 6 , , 2 [,1] [,2] [,3] [1,] 11 13 15 [2,] 12 14 16 Thanks, -s [[altern...
2008 Oct 16
1
packages in Depends field and NAMESPACES
Must packages in the Depends field of the DESCRIPTION file have NAMESPACES? I haven't seen this explicitly indicated anywhere. I am writing a small package and find that when I add the abind package to the list of the Depends field, I get an error in R CMD check of the build. * checking package name space information ... OK * checking package dependencies ... ERROR Packages required but not available: abind See the information on DESCRIPTION files in the chapter 'Creating R pa...
2006 Sep 01
2
Local library under Windoze.
Continuing to try to customize my environment for using R under Windoze, I experimented with installing a package from CRAN in a local library ``Lib''. I created the directory ``Lib'' in the folder in which R starts, and then executed > install.packages("abind",lib="Lib") Everything went according to form (I got prompted to choose a mirror, etc.) until the end of the show when I got the warning message Warning: unable to move temporary installation 'C:\Documents and Settings\rolf\My Documents\Rstuff\Lib\file5f906952\Lib\file5f906952\...
2011 Dec 13
0
paste0 bug in install.packages() - leopard installer?
Hello, I get the following: > install.packages("abind", repos="http://cran.fhcrc.org", type="source") trying URL 'http://cran.fhcrc.org/src/contrib/abind_1.4-0.tar.gz' Content type 'application/x-gzip' length 19642 bytes (19 Kb) opened URL ================================================== downloaded 19 Kb * i...
2005 Nov 24
2
Fwd: Matrix rotation
...f wine over lunch today... This is > likely to be trivial but I'm struggling to find a more elegant way to > obtain the following matrix rotations: > > > M <- matrix(c(1,0,0,0), ncol=2) > > M > [,1] [,2] > [1,] 1 0 > [2,] 0 0 > > N <- abind(M[2,],M[1,],along=2) > > N > [,1] [,2] > [1,] 0 1 > [2,] 0 0 > > P <- abind(N[2,],N[1,],along=2) > > P > [,1] [,2] > [1,] 0 0 > [2,] 0 1 > > Q <- abind(P[,2],P[,1],along=2) > > Q > [,1] [,2] > [1,]...