Quantcast
Channel: R - merge two dataframes - Error in sort.list(bx[m$xi]) : 'x' must be atomic for 'sort.list' - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by RomRom for R - merge two dataframes - Error in sort.list(bx[m$xi])...

I think it is because the format of your key dates are not the same in the two data frames, One is a character and the other one is a POSIXctconvert them to the same format and try again.

View Article



Answer by kangaroo_cliff for R - merge two dataframes - Error in...

df2$key_data is of class different to that of df1#df2$key_date <- as.Date(df2$key_date, "%Y-%M-%d")df2$key_date <- as.POSIXct(df2$key_date)mdf <- merge(x = df1, y = df2, by = "key_date", all.x...

View Article

R - merge two dataframes - Error in sort.list(bx[m$xi]) : 'x' must be atomic...

I am trying to merge to dataframe by key_date that set in each of them:> merge <- merge(x = df1, y = df2, by = "key_date", all.x = TRUE)Error:Error in sort.list(bx[m$xi]) : 'x' must be atomic for...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images