similar to: proposal for

Displaying 20 results from an estimated 40000 matches similar to: "proposal for"

2003 Oct 28
2
proposal for "strict" versions of subsetting operators
I'd like to propose adding "strict" versions of the subsetting operators "[", "[[", and "$" to the R language. These strict versions would be intended for use in programming rather than in interactive use. They do not perform any form of partial string matching or opportunistic simplification such as dimension dropping by default. They allow more
2005 May 06
0
(PR#7824) handling of zero and negative indices in
I've put this in (with some different wording). Although S blithely accepts mis-dimensioned index matrices I agree this is wrong and have made it an error. On Fri, 29 Apr 2005 tplate@acm.org wrote: > This message contains a description of what looks like a bug, examples > of the suspect behavior, a proposed change to the C code to change this > behavior, example of behavior with
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 list as the first argument, removing the need to use do.call()
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 list as the first argument, removing the need to use do.call()
2005 Feb 17
1
Subsetting using dimnames on S4 array-based class
Hello, I did send this message to r-help and got no reply, no I am resubmitting here in case this was a bit too specific for the other list. Many thanks, Iago From: Iago Mosqueira <imosqueira@suk.azti.es> To: r-help@stat.math.ethz.ch Subject: Subsetting using dimnames on S4 array-based class
2003 Oct 21
5
do.call() and aperm()
Hi everyone I've been playing with do.call() but I'm having problems understanding it. I have a list of "n" elements, each one of which is "d" dimensional [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 <-
2011 Dec 31
2
Very strange function() behaviour.
Hi, R newb here. I've coded a function that inputs N dimensional array(s) [or class=numeric if it's dim=1] of coefficients and tstats, where dim(coef_matrix)=dim(tstat_matrix), it will then output a same dimension matrix of coefficients pasted to tstats in brackets pasted to significance stars. If I go straight to the code INSIDE the function, it works 100% as it's supposed to. The
2008 Jul 11
1
Subsetting an array by a vector of dimensions
Hi Is it possible to subset an n-dimensional array by a vector of n dimensions? E.g. assume I have > x <- array(1:24, dim=2:4) > x[1,1,2] [1] 7 > dims <- c(1,1,2) I would like a function that I can supply x and dims as parameters to, and have it return 7. Also, I would like to do something like: > x[1,1,] [1] 1 7 13 19 > dims2<- c(1,1,NA) And have a function of x and
2004 Oct 01
2
multiple dimensional diag()
Hi I have two arbitrarily dimensioned arrays, "a" and "b", with length(dim(a))==length(dim(b)). I want to form a sort of "corner-to-corner" version of abind(), or a multidimensional version of blockdiag(). In the case of matrices, the function is easy to write and if a=matrix(1,3,4) and b=matrix(2,2,2), then adiag(a,b) would return: [,1] [,2] [,3] [,4] [,5]
2019 Oct 30
0
head.matrix can return 1000s of columns -- limit to n or add new argument?
>>>>> Gabriel Becker >>>>> on Tue, 29 Oct 2019 12:43:15 -0700 writes: > Hi all, > So I've started working on this and I ran into something that I didn't > know, namely that for x a multi-dimensional (2+) array, head(x) and tail(x) > ignore dimension completely, treat x as an atomic vector, and return an > (unclassed)
2005 Feb 11
0
Subsetting using dimnames on S4 array-based class
Hello, I am encountering some problems when overloading the "[" operator for a new S4 class based on array. This is an example class definition: setClass("foo", representation("array"), prototype(array(NA, dim=c(3,3)), dimnames=list(age=1:3, year=10:12)) ) And this the corresponding setMethod with print estatements to see what is being passed:
2005 Jan 21
6
dim vs length for vectors
Hi all, I'm not sure if this is a feature or a bug (and I did read the FAQ and the posting guide, but am still not sure). Some of my students have been complaining and I thought I just might ask: Let K be a vector of length k. If one types dim(K), you get NULL rather than [1] k. Is this logical? Here's the way I explain it (and maybe someone can provide a more accurate
2024 Feb 08
1
Is simplify2array working for dimension > 2?
Jean-Claude: Well, here's my "explanation". Caveat emptor! Note that: "simplify2array() is the utility called from sapply() when simplify is not false" and > sapply(a, I, simplify = "array") [,1] [,2] [1,] list,2 list,2 [2,] list,2 list,2 So it seems that simplify2array() is not intended to operate in the way that you expected, i.e. that recursive
2007 Apr 27
1
Inflate/Expand/Resize an array
Gudday, I've had a good look everywhere trying to figure out how to do this, but I'm afraid I can seem to find an answer anywhere - maybe its because I'm not using the right terms, or maybe its because I'm a dummy. But unfortunately, I am not completely and utterly stuck. Here's the problem: I have two large, six dimensional arrays that I would like to add together. Lets call
2018 Jul 08
0
Testing for vectors
Hadley, On Sat, Jul 7, 2018 at 1:32 PM, Hadley Wickham <h.wickham at gmail.com> wrote: > On Sat, Jul 7, 2018 at 1:50 PM, Gabe Becker <becker.gabe at gene.com> wrote: > > Hadley, > > > >> > >> I was thinking primarily of completing the set of is.matrix() and > >> is.array(), or generally, how do you say: is `x` a 1d dimensional > >>
2006 Jun 09
1
Idempotent apply
Dear all, I have been working on an idempotent version of apply, such that applying a function f(x) = x (ie. force) returns the same array (or a permutation of it depending on the order of the margins): a <- array(1:27, c(2,3,4)) all.equal(a, iapply(a, 1, force)) all.equal(a, iapply(a, 1:2, force)) all.equal(a, iapply(a, 1:3, force)) all.equal(aperm(a, c(2,1,3)), iapply(a, 2, force))
2019 Oct 31
2
head.matrix can return 1000s of columns -- limit to n or add new argument?
On 10/30/19 04:29, Martin Maechler wrote: >>>>>> Gabriel Becker >>>>>> on Tue, 29 Oct 2019 12:43:15 -0700 writes: > > > Hi all, > > So I've started working on this and I ran into something that I didn't > > know, namely that for x a multi-dimensional (2+) array, head(x) and tail(x) > > ignore dimension
2001 Jul 10
0
speeding up aperm/ adding repmat
Hi, I have noticed that aperm is very slow, and I wondered if there was a way of speeding it up. Let me tell you a bit about the context of my problem, because perhaps I shouldn't be using aperm at all. The context is probabilistic inference in graphical models. One of the most fundamental operations is two compute an element-wise multiplication of two arrays of different sizes, say A and B.
2017 Jun 01
0
Reversing one dimension of an array, in a generalized case
Thanks to all for responses/. There was a question of exactly what was wanted. It is the generalization of the obvious example I gave, >>> junk1 <- junk[, rev(seq_len(10), ] so that junk[1,1,1 ] = junk1[1,10,1] junk[1,2,1] = junk1[1,9,1] etc. The genesis of this is the program is downloading data from a variety of sources on (time, altitude, lat, lon) coordinates, but all
2009 Nov 09
1
multiple tests: t-statistic for vectors in 4-dimensional array
Hi everyone, I created a four dimensional vector (dim (128,128,1,8)). This third dimension is necessary for another function somewhere. Now I'd like to perform a t-test on every vector of length 8 in my array on the fourth dimension. I'd like to obtain a new array of three dimensions with dimensions 128x128x1 with all these test statistics. I tried this with a double loop: A <-