Ista,
I have looked at the reshape package and have used Âmelt¹ successfully on
simpler tables. I tried it here, but have not been successful. I think I
just need to gain experience. I am loving R and am having a difficult time
with data structure issues.
I am attaching the data set that I
Try this:
cattle - read.csv(http://n4.nabble.com/attachment/1745223/0/CattleGrowth.csv;)
long - reshape(cattle, dir = long, idvar = Steer.ID,
varying = list(grep(Date, names(cattle)), grep(Days,
names(cattle)), grep(Wt,names(cattle
On Tue, Mar 30, 2010 at 9:34 AM, wclapham
Hi Bill,
Here is a reshape package version. The key thing to notice is that you
have multiple pieces of information in your original column names.
These can be split out using the colsplit() function:
# Read in the data
cattle -
I have a data frame that I created using read.table on a csv spreadsheet.
The data look like the following:
Steer.ID stocker.trt Finish.trt Date Days Wt ..
Steer.Id, stocker.trt, Finish.trt are factors-- Date, Days, Wt are data
that are repeated 23 times (wide format).
I want
Hi Bill,
Without an example dataset it's hard to see exactly what you need to
do. But you can get started by looking at the documentation for the
reshape function (?reshape), and by looking at the reshape package.
The reshape package has an associated web page
(http://had.co.nz/reshape/) with
5 matches
Mail list logo