df <- data.frame(a = 1:2, b = letters[1:2])
df[rep(seq_len(nrow(df)), each = 2), ]
More Related Contents:
- Compare two data.frames to find the rows in data.frame 1 that are not present in data.frame 2
- For each row in an R dataframe
- How to append rows to an R data frame
- Removing specific rows from a dataframe
- Deleting every n-th row in a dataframe
- Select the row with the maximum value in each group
- Create a sequential number (counter) for rows within each group of a dataframe [duplicate]
- Extracting specific columns from a data frame
- Find indices of duplicated rows [duplicate]
- How to drop columns by name in a data frame
- How do I extract a single column from a data.frame as a data.frame?
- How to assign a unique ID number to each group of identical values in a column [duplicate]
- Rename multiple columns by names
- Named List To/From Data.Frame
- Call apply-like function on each row of dataframe with multiple arguments from each row
- How to add a row to a data frame in R?
- Subtract a column in a dataframe from many columns in R
- Converting a data frame to xts
- Interpolate NA values in a data frame with na.approx
- How to subset data in R without losing NA rows?
- How to delete columns that contain ONLY NAs?
- Using grep to help subset a data frame
- How to sort a data frame by date
- Randomly insert NAs into dataframe proportionaly
- R: Split unbalanced list in data.frame column
- Should I use a data.frame or a matrix?
- Split dataframe using two columns of data and apply common transformation on list of resulting dataframes
- Add an image to a table-like output in R
- Shifting a column down by one
- Identifying where value changes in R data.frame column