0
列表有隻有兩列在列表中選擇多個dataframes列
DateTime Value
30-06-2016 100
31-07-2016 200
.
.
.
多個數據幀我只是想從列表中提取列價值。填充代碼對我來說證明是不成功的。我在這裏做錯了什麼?
actual_data <- lapply(test_data, function(df) df[,is.numeric(df)])
> actual_data[[1]]
data frame with 0 columns and 12 rows
謝謝
'lapply(test_data,'[',2)' – Sotos
非常感謝@Sotos。你會解釋這個解決方案嗎? –
試試'test_data [[1]] [1]'或'test_data [[2]] [1]'等等,你就會得到它。提示:看看'['用於索引嗎? – Sotos