insertRows: insert rows as specified positions

View source: R/coor2index.R

insertRowsR Documentation

insert rows as specified positions

Description

Util to insert multiple rows at specified positions in a data.frame, expanding single-row code by user Ari B. Friedman at https://stackoverflow.com/questions/11561856/add-new-row-to-dataframe-at-specific-row-index-not-appendedlooping through new rows

Usage

insertRows(existingDF, newrows, r)

Arguments

existingDF

existing data.frame

newrows

rows to add to existingDF

r

positions in the existing data.frame at which rows are to be inserted; length(r) must equal nrow(newrows), and all indices r<=nrow(existingDF)+1.


raim/segmenTools documentation built on March 20, 2024, 6:23 a.m.