Skip to content
Prev 366672 / 398502 Next

can this be simplified with purrr:map or mapply?

If you want to use purrr, you could do

fil <- paste0("data",2004:2014,".txt")
map_df(fil, read.table, .id = "fil")

to get everything in one data frame (I assume all files have the same
structure)

HTH
Ulrik
On Wed, 18 Jan 2017 at 16:10 PIKAL Petr <petr.pikal at precheza.cz> wrote: