zipFastener | R Documentation |
Combine rows or columns of two dataframes in an alternating manner
zipFastener(df1, df2, along = 2)
df1 |
A first dataframe. |
df2 |
A second dataframe with the same dimensions as |
along |
|
A dataframe with combined rows (or columns) of df1 and df2.
Mark Heckmann
# data frames equal dimensions
df1 <- plyr::rdply(3, rep('o',4))[ ,-1]
df2 <- plyr::rdply(3, rep('X',4))[ ,-1]
zipFastener(df1, df2)
zipFastener(df1, df2, 2)
zipFastener(df1, df2, 1)
# data frames unequal in no. of rows
df1 <- plyr::rdply(10, rep('o',4))[ ,-1]
zipFastener(df1, df2, 1)
zipFastener(df2, df1, 1)
# data frames unequal in no. of columns
df2 <- plyr::rdply(10, rep('X',3))[ ,-1]
zipFastener(df1, df2)
zipFastener(df2, df1, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.