On Sep 15, 2010, at 7:40 PM, Dennis Murphy wrote:
Hi:
Try something like this:
ind <- as.matrix(expand.grid(rownames(U), colnames(U)))
Uempty[ind] <- U[ind]
ind should be a two column matrix of (row, col) indices. Then just
replace
the values of Uempty associated with those indices with th
Hi:
Try something like this:
ind <- as.matrix(expand.grid(rownames(U), colnames(U)))
Uempty[ind] <- U[ind]
ind should be a two column matrix of (row, col) indices. Then just replace
the values of Uempty associated with those indices with the corresponding
entries of U.
HTH,
Dennis
On Wed, Sep
Hi Nicolas,
Try (untested):
with(pop, table(factor(xloc, levels = 1:20), factor(loc, levels = 1:25)))
HTH,
Jorge
On Wed, Sep 15, 2010 at 7:31 PM, Nicolas Gutierrez <> wrote:
> Hi All,
>
> Im trying to superimpose (or "add") two matrices:
>
> 1. resulting from a table function with frequenci
Hi All,
I’m trying to superimpose (or "add") two matrices:
1. resulting from a table function with frequencies:
> U=table(pop$xloc, pop$yloc))
14 15 16 17 18 19 20 21 22
5 0 0 0 0 0 0 0 0 0
7 0 0 0 0 0 0 0 0 0
8 0 0 0 0 0 0 0 0 0
9 0 0 0 0 0
4 matches
Mail list logo