Extracting outputs from lapply to a dataframe

前端 未结 4 1188
[愿得一人]
[愿得一人] 2020-12-30 02:25

I have some R code which performs some data extraction operation on all files in the current directory, using the following code:

files <- list.files(\".\         


        
4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-30 02:48

    Try this if results were your list:

    > as.data.frame(do.call(rbind, results))
    
         V1   V2
    1  amer 14.5
    2  appl 14.2
    3  brec 13.1
    4  camb 13.5
    ...
    

提交回复
热议问题