• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Combine portion of multiple rows into 1 column - repeating first portion of row

Waterouzel

New Member
OK,

I have a data set that looks like this:


Day,Month,Year,Site,Species,1,2,3,4,5,6,7,100

23,3,2011,A,QUGA,0,2,5,9,1,0,3,1

24,3,2011,B,JUDE,3,5,6,8,3,9,4,5


So for every sample date (a row), 100 trees were measured (each row representing a single day at a single site). But the 100 trees are recorded in the row. I need a column that represents tree # (1-100) and a column for each individual trees measurement AND have the other unique info for that sampling occasion - Date, site, species, etc - repeated for each of the 100 trees sampled on that day.


I need to do this in excel (or R).

Thanks
 
Hi,

In your sample data set, you appear to have the tree numbers in columns with the date specific data. Are you looking for something else in your result set?


To clarify your request, could you post a sample result set, using the sample data set?


-Sajan.
 
Back
Top