You seem to be looking for 'aperm'.
There is a chapter in 'S Poetry' (available
on http://www.burns-stat.com) that talks
about working with higher dimensional
arrays. I don't think any changes need
to be made for R.
On 02/11/2011 16:16, Simone Salvadei wrote:
Hello,
I'm at the very beginning o
On Nov 2, 2011, at 12:16 PM, Simone Salvadei wrote:
Hello,
I'm at the very beginning of the learning process of this language.
Sorry in advance for the (possible but plausible) stupidity of my
question.
I would like to find a way to permute the DIMENSIONS of an array.
Something that sounds
1+pmax(abs(row(z)-3),abs(col(z)-3))
?row ?col ?pmax for details.
Bert Gunter
Genentech Nonclinical Statistics
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Muhammad Rahiz
Sent: Wednesday, April 14, 2010 9:44 AM
To: r-help@r-p
On Feb 24, 3:57 pm, jdeisenberg wrote:
> Λεωνίδας Μπαντής wrote:
>
> > 1. Suppose I have a<-c(1:10) (or a<-array(c(1:10),dim=c(1,10)))
>
> > and I want to end up with vector b=[0 0 0 0 0 1 1 1 1 1]. i.e. I want to
> > substitute alla elements that are <5 with 0 and >5 with 1.
>
> I think you
2009/2/23 Λεωνίδας Μπαντής :
>
> Hi there,
>
> I am pretty new to R. Actually I started using it yesterday. I have two
> questions:
>
> 1. Suppose I have a<-c(1:10) (or a<-array(c(1:10),dim=c(1,10)))
>
> and I want to end up with vector b=[0 0 0 0 0 1 1 1 1 1]. i.e. I want to
> substitute alla
Λεωνίδας Μπαντής wrote:
>
> 1. Suppose I have a<-c(1:10) (or a<-array(c(1:10),dim=c(1,10)))
>
> and I want to end up with vector b=[0 0 0 0 0 1 1 1 1 1]. i.e. I want to
> substitute alla elements that are <5 with 0 and >5 with 1.
>
I think you mean >=5, not > 5. In that case, try this:
6 matches
Mail list logo