我有一個數據框1488 obs。和400 var。我試圖記錄表中的所有值,然後使用命令rm.outlier使用程序包異常值,我傾向於刪除異常值。唯一的問題是,我得到這個錯誤:rm.outlier函數在data.frame中的錯誤
Error in data.frame(V1 = c(-0.886056647693163, -0.677780705266081, -1.15490195998574, : arguments imply differing number of rows: 1487, 1480, 1481, 1475, 1479, 1478, 1483, 1485, 1484, 1477, 1482, 1469
這是我的代碼:
datalog <- matrix(0,nrow(data),ncol(data))
datalog[,] <- apply(data,2,log10)
datalog[datalog==-Inf] <- 0
datalog <- as.data.frame(datalog, stringsAsFactors=F)
testNoOutliers <- rm.outlier(datalog, fill = FALSE,
median = FALSE, opposite = FALSE)
我的數據: https://skydrive.live.com/redir?resid=CEC7696F3B5BFBC6!341&authkey=!APiwy6qasD3-yGo
感謝所有幫助
歡迎光臨!你的測試日誌功能是什麼? – agstudy
哦,對不起,我在我的東西有不同的名字。只需將testlog重命名爲數據記錄即可。 – crysis405
當我加載你的文件,我有超過1488 obs,我有7968 obs(數字行)!它是正確的數據文件? – agstudy