Import & Merge Multiple CSV Files in R (Example) | dplyr, plyr & readr Packages | How to Load & Read

Поделиться
HTML-код
  • Опубликовано: 6 ноя 2024

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

  • @amane49
    @amane49 10 месяцев назад +1

    Another amazing to the point video !! Easy to follow, logical and very helpful!

    • @matthias.statisticsglobe
      @matthias.statisticsglobe 10 месяцев назад

      What a great and motivating comment! Thank you very much for your support!

  • @krono32
    @krono32 4 месяца назад

    This helped me with a project. Thank you!

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

    Thx, this help me so much, greetings from Colombia

    • @matthias.statisticsglobe
      @matthias.statisticsglobe Год назад

      That's great to hear, thank you so much for the positive feedback, Daniel! Greetings back from Germany

  • @Sara-LeeRamsawak-s6x
    @Sara-LeeRamsawak-s6x 9 месяцев назад

    Thanks so much, this is very helpful. What does this row of code do? --> data_all_df <- as.data.frame(data_all) # Convert tibble to data.frame

    • @Ifeanyi.StatisticsGlobe
      @Ifeanyi.StatisticsGlobe 9 месяцев назад

      Hi User-MV. Yes, as.data.frame( ) converts a tibble into a dataframe. You can confirm this by running str( ) on the new converted dataframe object. I hope this helps!

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

    how to add new column in combined data describing the each DataName where do those data belong?

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

      Hello!
      Please see the following R code. Where I defined a special function that reads the CSV elements and retrieves the source name using the gsub function (statisticsglobe.com/sub-gsub-r-function-example) and then creates a source_name column using the mutate function (statisticsglobe.com/r-mutate-transmute-functions-dplyr-package).
      library("dplyr")
      library("plyr")
      library("readr")
      # Function to read each CSV file and add a source column
      read_csv_with_source

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

    Thanks. Could you also show how to merge multiple .txt files excluding headers and get the resultant output in .txt?

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

      Hello Vishakha,
      Would you like to implement something like this?
      data1