I have a routine that the goal will always be the same; Every day it should read a xlsx
file with all prices (historical series), pull a given site from the prices referring to the last update date, merge these two data into a single data.frame (in order to update the last one given) and then transform it into an excel file. Although the part of webscrappe is ready, I am having difficulty joining the two data.frames.
My tables look like this:
head(df.temp)
Data 2 3
<NA> codigo codigo
<NA> nome1 nome2
2012-01-01 480 330
... ... ...
2017-10-03 480 330
E:
itens2
Data 2 3
2017-04-10 400 300
When I use the function df.melt <- bind_rows(df.temp, itens2)
, the R returns:
Error in bind_rows_(x, .id) :
Can not automatically convert from character to numeric in column "2".
Both tables are data.frames. How to solve?
The end goal would be a table like this:
Data 2 3
<NA> codigo codigo
<NA> nome1 nome2
2012-01-01 480 330
... ... ...
2017-10-03 480 330
2017-04-10 400 300