error merging excel sheets (due to dates?!)

Hello dear community,

I'm happy for all the help I already got. I'm new to R and got stuck merging my excel sheets

merging all files (!= means not equal to)

df_long <- sapply(OLPPMS_ST_list, read_excel, simplify=FALSE) %>% bind_rows(.id = "File_ID") %>% filter(Mens_Start!="M4")

New names:

  • `` -> ...89
  • `` -> ...90
  • `` -> ...91
  • `` -> ...92
  • `` -> ...93
  • ...
    Error: Can't combine /Users/laurapetri/Desktop/OLPPMS_analyzes/dataset_OLPPMS/1002_modified_20200219_rm_20200318_mr.xlsx$date <datetime> and /Users/laurapetri/Desktop/OLPPMS_analyzes/dataset_OLPPMS/1348_modified_200612_ah_200615_bb.xlsx$date .
    Run rlang::last_error() to see where the error occurred.
    In addition: Warning messages:
    1: In read_fun(path = enc2native(normalizePath(path)), sheet_i = sheet, :
    Expecting numeric in CF27 / R27C84: got a date
    2: In read_fun(path = enc2native(normalizePath(path)), sheet_i = sheet, :
    Expecting numeric in CF28 / R28C84: got a date
    3: In read_fun(path = enc2native(normalizePath(path)), sheet_i = sheet, :
    Expecting numeric in CF39 / R39C84: got a date
    4: In read_fun(path = enc2native(normalizePath(path)), sheet_i = sheet, :
    Expecting numeric in CF63 / R63C84: got a date

I don't understand the errors, is there a problem that I have dates in my lists?

Thank you very much in advance!
Cheers Laura

Excel says the data is a date.
But I guess there is something wrong. Are ALL the data in that column dates? In both this sheets?

Thanks for the fast answer!

I read in 150 files. 3 out of about 40 columns include dates "submit date" "startdate" "date stamp"

I suspect it's date stamp. And that may be the issue... The space..? Janitor clean names may be your friend.

For this kind of code, I'd want to merge file by file. Because 150 loads will be a pain if it breaks at 120, then 121, then 122 etc... Especially if it's a slow loader.

So I'd ditch all the supply for now and load the two filenames given into myDataA and myDataB and merge with bind_rows as you have.

If they fail. Then look at A and B for the column (?date) and see what is wrong...

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.