On Oct 11, 2011, at 4:22 PM, Bert Gunter wrote:
Replicate the row indices?
x[rep(seq_len(nrow(x)), k), ]
Or the column indices.
x[ , rep(seq_len(length(x)), k) ]
--
David,
-- Bert
On Tue, Oct 11, 2011 at 12:55 PM, Martin Batholdy
wrote:
Hi,
is there a way to replicate a data.frame
Replicate the row indices?
x[rep(seq_len(nrow(x)), k), ]
-- Bert
On Tue, Oct 11, 2011 at 12:55 PM, Martin Batholdy
wrote:
> Hi,
>
>
> is there a way to replicate a data.frame like you can replicate the entries
> of a vector (with the repeat-function)?
>
> I want to do this:
>
> x <- data.frame(
Hi,
is there a way to replicate a data.frame like you can replicate the entries of
a vector (with the repeat-function)?
I want to do this:
x <- data.frame(x, x)
(where x is a data.frame).
but n times.
And it should be as cpu / memory efficient as possible, since n is pretty big
in my cas
3 matches
Mail list logo