2012-10-26 4 views
1

내가 데이터 프레임 다음 한 단일 목록으로 결합 :R은 dataframe의 모든 값을 추출하고

 1 ABCA8 ATRX ADAM32 ANK2 CDH9 C11orf30 ANO3CKAP2L CCBL2 

것은 도와주세요 :

 PD4115a PD4088a PD4192a  
    1 ABCA8 ATRX  ADAM32  
    2 ANK2 CDH9  C11orf30 
    3 ANO3 CKAP2L CCBL2  

내가 원하는 것은 결합 된 모든 값 목록입니다 data.frames이의 "진짜"특별한 종류이기 때문에 나 그와 나는 R.에서 멍청한 놈에게

많은 감사

답변

2

오전 목록에서 다음과 같이 을 사용할 수 있습니다.

df <- data.frame(A=letters[1:3], B=letters[4:6], stringsAsFactors = FALSE) 
unlist(df) 
# A1 A2 A3 B1 B2 B3 
# "a" "b" "c" "d" "e" "f" 

## To help understand why it works, here are a few ways to see the sense 
## in which data.frames are lists 
is.list(df)   # Ask R 
typeof(df)   # Check the storage mode 
class(unclass(df)) # Strip off the "data.frame" class attribute 
관련 문제