R rbind Function


rbind() function combines vector, matrix or data frame by rows.

rbind(x1,x2,...)
x1,x2:vector, matrix, data frames


data1.csv:


data2.csv:


Read in the data from the file:
>x <- read.csv("data1.csv",header=T,sep=",")
>x2 <- read.csv("data2.csv",header=T,sep=",")

>x3 <- rbind(x,x2)
>x3
   Subtype Gender Expression
1        A      m      -0.54
2        A      f      -0.80
3        B      f      -1.03
4        C      m      -0.41
5        D      m       3.22
6        D      f       1.02
7        D      f       0.21
8        D      m      -0.04
9        D      m       2.11
10       B      m      -1.21
11       A      f      -0.20

The column of the two datasets must be same, otherwise the combination will be meaningless.