s-news
[Top] [All Lists]

[S] Data manipulation problem

To: <s-news@wubios.wustl.edu>
Subject: [S] Data manipulation problem
From: "Paul Schwarz" <Paul.Schwarz@cornell.edu>
Date: Thu, 22 Jul 1999 17:17:01 -0400
Importance: Normal
Sender: owner-s-news@wubios.wustl.edu
Hello,

I need some help with a data manipulations problem.

I have several data files (dataframes), one for each of 3 sites, with the
following variables/columns:

  plot#, tree#, species, basalarea

In other words, these data are currently organized by each individual tree.

I would like to ultimately manipulate these data into a single
file/dataframe with the following variables:

  site, plot#, species, basalarea

where there is only 1 row for each combination of site, plot, and species.

I'm not at all sure how to manipulate these data efficiently.  tapply() will
easily summarize the individual tree data by plot and species, but each
species is listed a column.  However, I want species as rows and the plot#
replicated for each species.  In case this information is relevant, I'm
trying to organize these data so that I can run a 2-way ANOVA on them using
site and species as the factors.  I'd appreciate any tips or advice that
anyone might have on how to manipulate these data.

Thanks for your time,

-Paul

Paul.Schwarz@Cornell.EDU

-----------------------------------------------------------------------
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] Data manipulation problem, Paul Schwarz <=