Re: [R] adding copies of rows toa data frame based upon start and end dates

2010-10-28 Thread Joshua Wiley
Dear Grant, This is far from the prettiest solution, but: ## Your sample data tmp <- structure(list(ID = 1001:1007, GRID = c(1L, 1L, 1L, 1L, 1L, 1L, 1L), FOOD = c(0L, 0L, 0L, 0L, 0L, 0L, 0L), WB1 = c(319L, 659L, 325L, 322L, 654L, 301L, 349L), WB2 = c(999L, 671L, 662L, 655L, 899L, 651L, 669L), S =

[R] adding copies of rows toa data frame based upon start and end dates

2010-10-28 Thread Grant Gillis
Hello All and thanks in advance for any advice. I have a data frame with rows corresponding radio-collared animals (see sample data below). There is a start date (DATESTART), and end date (DATEEND), and the number of days on air (DAYSONAIR). What I would like to do is add a column called DATE to