insertRow | R Documentation |
This function adds a row to a df
insertRow(data, newrow, r)
data |
the input dataframe |
newrow |
a vector be added as a row, must be the same length as the number of coloumns in data. |
r |
the row index where the new row will be added into the dataframe. |
df<-data.frame(a=c(1,3,4,5),
b=c("a","c","d","e"),
c=c("z","x","w","u"))
df_1<-insertRow(data=df,
newrow=c(2,"b","y"),
r=2)
df_1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.