0
데이터 프레임은 1209 열 및 27900 행입니다.R 데이터 프레임의 각 행에서 중복을 제거하십시오.
각 행에 대해 중복 값이 열 주위에 분산되어 있습니다. 데이터 프레임을 transposing하고 컬럼을 제거하려고했습니다. 그러나 그것은 추락합니다. 나는 전치 후
내가 사용 :
for(i in 1:ncol(df)){
#replicate column i without duplicates, fill blanks with NAs
df <- cbind.fill(df,unique(df[,1]), fill = NA)
#rename the new column
colnames(df)[n+1] <- colnames(df)[1]
#delete the old column
df[,1] <- NULL
}
하지만 그 결과 지금까지.
누구나 아이디어가 있는지 알고 싶습니다.
최고