Meine Fragen ist, wie zwei oder mehr Datenrahmen in System R verbinden können?Join zwei oder mehr Datenrahmen in System R
Zum Beispiel:
Ich habe zwei Datenrahmen:
zuerst:
x y z
1 3 2 4
2 4 5 7
3 5 6 8
Sekunde:
x y z
1 1 1 1
2 4 5 7
Ich brauche dies:
x y z
1 3 2 4
2 4 5 7
3 5 6 8
4 1 1 1
5 4 5 7
I versucht, für jeden Vektor zu verwenden, anzuhängen, wie folgt aus:
für (i in 1: Länge (erstes)) {
mix[[i]]<-append(first[i], second[i])}
f < -do.call (rbind, Mischungs)
Aber es hat nicht funktioniert, wie ich gebraucht habe. Ich habe meine Matrix nicht bekommen, ich habe eine andere Struktur.
Verwandte Fragen: http://stackoverflow.com/questions/2851327/r-converting-a-list-of-data-frames-into-one-data-frame, http://stackoverflow.com/questions/ 2209258/merge-mehrere-data-frames-in-ein-daten-frame-mit-einer-schleife, http://stackoverflow.com/questions/1299871/how-to-join-data-frames-in-r- innen-außen-links-rechts, http://stackoverflow.com/questions/2392915/recombining-a-list-of-data-frames-into-a-einzel-data-frame, ... –