s-news
[Top] [All Lists]

[S] summary stack data frame

To: s-news@wubios.wustl.edu
Subject: [S] summary stack data frame
From: Winson Taam <taam@Oakland.edu>
Date: Wed, 23 Feb 2000 16:17:12 -0500 (EST)
Sender: owner-s-news@wubios.wustl.edu
I appreciate the responses from B.Ripley, B.Biggerstaff,
P.Joyet,Z.T.Taylor,A.Liaw,P.Chartraw, and A.Sinclair.
You all point to essentially the same solution.

tmp is a data frame. To replicate its rows 3 times,

nr <- nrow(tmp)
newtmp <- tmp[ rep(1:nr, rep(3,nr)), ]

However, the row names of newtmp are not sequence of
number from 1 to 3*nr.

To stack the entire data frame 3 times,

newtmp2 <- tmp[ rep(1:nr, 3), ]

Same warning on the row names.

Thank you for all your help.

Winson Taam
Department of Math. & Stat.
Oakland University
Rochester, MI 48309

tel: 248-370-3438


-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>
  • [S] summary stack data frame, Winson Taam <=