Try this:
> sign(ifelse(abs(k)<=1.5, 0, k))
C1 C2 C3 C4
A 0 0 0 0
B 1 0 0 0
C 0 -1 0 0
D -1 1 -1 -1
On Sun, May 22, 2016 at 2:00 PM Adrian Johnson
wrote:
> Hi group:
> I am having difficulty with if else condition. I kindly request some help.
>
> I have a matrix k
>
> > k
>
Use 'replicate.'
> replicate(n1, mean(rnorm(n2, mean, sd)))
Will compute return a column vector of length n1, each entry of which is
the mean of n2 random normal variables with mean and sd specified by the
arguments of rnorm.
On Mon, May 23, 2016 at 10:25 AM Nicoletta Sabov
wrote:
> Hi ther
2 matches
Mail list logo