Loading Multiple Excel Files into R

Поделиться
HTML-код
  • Опубликовано: 10 май 2021
  • How to load multiple excel files into R using a combination of list.files, map_df, and read_excel.

Комментарии • 12

  • @lukeward1403
    @lukeward1403 Год назад +1

    Hi thank you for the tutorial It was very helpful, quick question, how would this work if one of the excel say "file 2" had multiple sheets of data within it?

  • @ChristopherFNeto
    @ChristopherFNeto 2 года назад

    Thank you, very helpful video. Is there a reason why you broke out the concat into a different step instead of using the 'full.names = TRUE' argument for list.files?

  • @danielchapilliquen6777
    @danielchapilliquen6777 Год назад

    Hello i got an error at the moment to upload the data into R. This mentions that there is an error in Error in utils::unzip(zip_path, list = TRUE). The source is xlsx.

  • @thissatori
    @thissatori Год назад

    Great video thank you!
    Quick question, if my files are UTF-8, how can i tell it the character encoding? I have a bunch of UTF-8 CSVs and I cannot find the answer anywhere...

    • @dataanalyticswizardry8085
      @dataanalyticswizardry8085  Год назад

      You can specify the encoding as shown below. Hope this helps.
      map_df(files, read_csv, locale = locale(encoding = 'UTF-8'))

  • @lixinli3858
    @lixinli3858 7 месяцев назад

    Great video! I have a question: how can I create the data_source column with the name of each file (instead of file1, file2, etc)?

    • @dataanalyticswizardry8085
      @dataanalyticswizardry8085  7 месяцев назад +1

      It is possible. I manually typed the file names vector as an example. You can replace this step with a way to retrieve the file names that you have and then assign it to the files using the names(files) as I show with the file names that you retrieved.

  • @18_avishkar_hande19
    @18_avishkar_hande19 2 года назад

    great video ! but my code runs into an error :cannot allocate vector of size 10.1 mb

    • @dataanalyticswizardry8085
      @dataanalyticswizardry8085  2 года назад

      Hi, if you have a lot of processes running, then closing some of those might help. Can you try doing garbage collection before you run the code that I showed?
      Just execute the following command:
      gc( )
      Also, you can check the memory limit that R is allowed to handle using the following command:
      memory.limit()
      If possible, increase it as such:
      memory.limit(size = 1800)

  • @ankursrivastava7160
    @ankursrivastava7160 Год назад

    Hi Sir got my data loaded but is it same as data framing?