- 1. Replicating the rows of a table n times each (score: 1)
- Author: "Tzamouranis, Ioannis C" <Ioannis.Tzamouranis@constellation.com>
- Date: Wed, 10 May 2006 18:00:41 -0400
- Other than looping to produce this, is there a way to replicate the rows of a table n times each so that a table such as: 1 2 3 4 A B C D 5 6 7 8 a b c d become 1 2 3 4 1 2 3 4 1 2 3 4 A B C D A B C
- /archives/html/s-news/2006-05/msg00039.html (7,594 bytes)
- 2. Re: Replicating the rows of a table n times each (score: 1)
- Author: "Christos Hatzis" <christos@nuverabio.com>
- Date: Wed, 10 May 2006 18:16:07 -0400
- This works in R - don't have S-Plus loaded any more: df <- rbind(1:4,LETTERS[1:4],5:8,letters[1:4]) df[ rep(c(1:nrow(df)),each=3), ] -Christos --Original Message-- From: s-news-owner@lists.biostat.wu
- /archives/html/s-news/2006-05/msg00040.html (8,816 bytes)
- 3. Replicating the rows of a table n times each (score: 1)
- Author: "Tzamouranis, Ioannis C" <Ioannis.Tzamouranis@constellation.com>
- Date: Thu, 11 May 2006 07:52:22 -0400
- Thanks to all the folks that pointed out easy ways to do this. The question was: Other than looping to produce this, is there a way to replicate the rows of a table n times each so that a table such
- /archives/html/s-news/2006-05/msg00042.html (14,038 bytes)
This search system is powered by
Namazu