olumn at
the end labeled "x" with the frequency of each unique row.
Once you get this you can convert to a list, manipulate, etc. I am
sure that there exist faster/better methods.
Best,
Jay
On Dec 21, 2007 5:03 PM, Louis Martin wrote:
> Hi,
>
> I have a matrix of duplicate
Hi,
I have a matrix of duplicate rows. How to output a list the unique rows with
their count? I have used "unique" to have the unique rows, but can't produce
the occurences of each unique row.
Thanks
Louis
-
[[alternative HTML version de
a Australia
e: [EMAIL PROTECTED]
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Louis Martin
Sent: Friday, 21 December 2007 11:37 AM
To: R-help@r-project.org
Subject: [R] using apply to loop
Hi,
I am running the following loop, but it takes hours to
Hi,
I am running the following loop, but it takes hours to run as n is big. Is
there any way "apply" can be used? Thanks.
### Start
nclass <- dim(data)[[2]] - 1
z <- matrix(0, ncol = nclass, nrow = nclass)
n <- dim(data)[[1]]
x <- c(1:nclass)
# loop starts
for(loop in 1:n) {
: a data.frame with nrow = 1 ; ncol = t
with t > z
Thanks
Louis martin
-
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEAS
5 matches
Mail list logo