1
I have a routine that the goal will always be the same; Every day it should read a file xlsx
with all prices (historical series), pull from a given site the prices referring to the last update date, put together these two data in a single data.frame (in order to update the last data) and later turn it into an excel file. Although the webscrappe part is ready, I’m having a hard time putting the two dates together..
My tables are like this:
head(df.temp)
Data 2 3
<NA> codigo codigo
<NA> nome1 nome2
2012-01-01 480 330
... ... ...
2017-10-03 480 330
And:
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".
the two tables are data.frames. How to solve?
the ultimate 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
Whenever possible, share a part of your database with us. Choose a few lines from it and enter the result of the command
dput(MeuBancoDeDados)
. This will make life much easier for those who are willing to help, as it will not be necessary to create a special data set to try to solve the problem. Maybe this is why Gabe was unable to answer this question.– Marcus Nunes