% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/merge_df.R
\name{merge_df}
\alias{merge_df}
\title{Horizontally Stack Data Frames with Different # of Observations}
\usage{
merge_df(..., simplify = 1)
}
\arguments{
\item{...}{vectors, matrices or data frames}

\item{simplify}{= 0 not to convert the result to a matrix if possible.}
}
\value{
A data frame or matrix
}
\description{
Horizontally Stack Data Frames with Different # of Observations
}
\details{
Using the data frames in the example section, the core part is:\cr
\code{ res <- merge( data.frame(A1m,id=1:nrow(df1m))
               , data.frame(A2m,id=(1:nrow(df2m))), by="id" ,all=1) }\cr

\cr
If simplify=1 is give, if possible, the result will be converted to
a matrix.
}
\examples{
# no overlapping col names
merge_df( x=1:2, y=1:5, z=1 )

# overlapping col names
A <- demomat(5,4,3,cnroot="V")
A1 <- A[,,1]; A2 <- A[,,2]; A3 <- A[,,3]
A1m <- A1[1:3,1,drop=0]; A2m <- A2[1:2,1:2]; A3m <- A3[1:3,1:3];
merge_df( A1m, A2m, A3m )

}
