• 0 views
•
link
How to subset same data from 2 data.frame
I am working on 2 data.frame and i want to subset same datas. I tried to use merge function but it gave me error like <0 rows> (or 0-length row.names).
x= data.frame(
ID = c("abc", "def", "genone", "gentwo", "unc"),
a = c("kerem", "fuat", "sinan", "suat", "anp"),
b = c("lml", "jhkj", "jk", "kjhk", "mkmkk"),
c = c("eee", "ttt", "hhh", "mmm", "kkk")
)
y= data.frame(
ID = c("genone","gentwo","genthree","genfourth","genfive"),
a = c("fuat", "suat", "mert", "mehmet", "ali"),
b = c("irem", "melisa", "cansu", "aslı", "fatma"),
c = c("aaa", "bbb", "ccc", "ddd", "fff")
)
merge(x,y)
I wrote these but it gave same error. <0 rows> (or 0-length row.names).
• 799 views
•
link
0 answers
No answers yet.
Log in to answer this question.