Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
t12つのフィールドnamesと。を持つデータフレームがありrollnoます。行名がであるデータフレームを生成したいnames。Rでこれを行うにはどうすればよいですか?
t1
names
rollno
あなたはそのようなことをすることができます:
a <- data.frame(name=c("A", "B"), b=1:2) b <- data.frame(a=1:2, b=1:2) row.names(b) <- a$name