Skip to contents

stm_stack_rows() combines multiple data frames or vectors by row binding them together using rbind().

Usage

stm_stack_rows(...)

Arguments

...

Data frames, matrices, or vectors to be combined as rows.

Value

A data frame or matrix resulting from row-wise binding of the input data.

Details

This function stacks the provided data frames, matrices, or vectors as rows using the rbind() function. The resulting object is returned as a data frame or matrix.

Examples

A <- matrix(1:4, ncol = 2, byrow = TRUE)
print(A)
#>      [,1] [,2]
#> [1,]    1    2
#> [2,]    3    4
B <- matrix(5:8, ncol = 2, byrow = TRUE)
print(B)
#>      [,1] [,2]
#> [1,]    5    6
#> [2,]    7    8
stm_stack_rows(A, B)
#>      [,1] [,2]
#> [1,]    1    2
#> [2,]    3    4
#> [3,]    5    6
#> [4,]    7    8