Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7808549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:10:00+00:00 2026-06-02T03:10:00+00:00

I have around 100 csv files with common headers, which i want to merge.

  • 0

I have around 100 csv files with common headers, which i want to merge. The headers are “Lat”, “Long” and “value”. I am trying to merge all the csv files such that the output would be

"Lat" "Lon" "Value1" "Value2"..."Value 100" 

Lat and Lon columns are identical for all of the csv files. Merging two files is easy

merge(data.frame1, data.frame2, by=c('Lat','Lon'))

However, I tried the following code which didnt work:

file_list <- list.files(~/source)   
list_of_files <- lapply(file_list, read.csv)  
m1 <- merge_all(list_of_files, by=c("Lat","Lon"), all=TRUE)  

which throws the error

Error in merge.data.frame(dfs[[1]], Recall(dfs[-1]), all = TRUE, sort = FALSE,  : 
  formal argument "all" matched by multiple actual arguments.  

Can anyone help me in this regard.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T03:10:02+00:00Added an answer on June 2, 2026 at 3:10 am

    You can use Reduce and the plain merge:

    m1 <- Reduce(function(old, new) { merge(old, new, by=c('Lat','Lon')) }, list_of_files)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have about 20 .csv files which are around 100-200mb each. They each have
I have around 100 rows of text that I want to tokenize, which are
We have around 100 database migration files. Many of them make schema changes which
I have a list of around 100 files form which I wanted to read
I have around 100 PNGs (that I created) that I want to create an
I have some 50 pages of html which have around 100-plus rows of data
I have a huge ASPX web form which has around 100 fields which need
I have a table with around 100,000 rows at the moment. I want to
So, I have a database with around 100 audit tables and I want to
I'm currently have around 100 rows in a table on my website, which include

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.