Relative Content

Tag Archive for rdataframedata-manipulationreplication

How can I replicate rows in R based on the values of another row?

I am wondering how to write a function to replicate rows based on the value within a column, e.g. if there is a difference of > +-0.1 between one row and the next, that row is replicated so that the row value increases linearly in increments of 0.1 from the first value to the last.