[R] Replicate

Bert Gunter bgunter.4567 at gmail.com
Tue Aug 23 20:26:07 CEST 2016


?rep  (to replicate indices)

plotdat2[rep(1:3,e=100), ]

This seemspretty basic. Have you gone through any R tutorials yet? If
not, please do so before posting further. There are many good ones on
the web.

Cheers,
Bert
Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Tue, Aug 23, 2016 at 10:54 AM, André Luis Neves <andrluis at ualberta.ca> wrote:
> Hi, There!
>
> I have this data frame:
>
>> plotdat2
>   Firmicutes    Lower    Upper fTissue2
> 1   63.48023 59.15983 68.11614   CAECUM
> 2   61.42512 57.24651 65.90875    COLON
> 3   44.68343 41.62523 47.96632    RUMEN
>
>
> How can I replicate each line 100 times?
>
> I`m new in R command line, so sorry if my question is nonsense.
>
> Thanks,
>
> --
> A
> LAN
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list