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 elements that are 5 with 0 and 5 with 1.
Λεωνίδας Μπαντής 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:
b -
2009/2/23 Λεωνίδας Μπαντής bleonida...@yahoo.gr:
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
On Feb 24, 3:57 pm, jdeisenberg catc...@catcode.com 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
4 matches
Mail list logo