While Eric's solution should work for your case, here is a slightly more general version where the number of replications is dependent on a column in the data frame. In the example, the number of replications required is the ceiling of the number of 30 day intervals between start date and end date, which are already available in the data frame. The key function is f - this takes a row index (of df) and replicates as many times as determined by the value in the column num_int for that row. To modify f, you need to replace num_int by the appropriate column name in your data set. f is then mapped to each row number of df and the replicated indices are stored in rowindex_rep as a vector. The final step is to subset df which repeats the rows appropriately.