I am trying to add an specific vector of rows to an specific df column, This is what I've done so far:
real_gdp_time_series <- real_gdp_time_series %>%
rbind(growth_pib_real_per_capita = c(-0.006, -0.086)) %>%
rbind(growth_pib_real_per_capita = c('2019-01-01', '2020-01-01'))
And this throws the next error:
Error in as.Date.numeric(value) : 'origin' must be supplied
The desired outcome would look like this:
# año growth_pib_real_per_capita
# ... ...
# 2019-01-01 -0.006
# 2020-01-01 -0.086
data
structure(list(año = structure(c(6940, 8035, 8766, 9496, 10227,
10957, 11688, 12418, 12784, 13149, 13879, 14610, 15340, 16071,
16801, 17532), class = "Date"), growth_pib_real_per_capita = c(-0.221000495330589,
0.00285801450939386, 0.00264240512093975, -0.00299493284604054,
0.00423776690674324, 0.0048819479659131, -8.51835182683933e-05,
0.00670710736839509, 0.010584695348906, 0.00241749748695944,
0.000203934290972816, -0.00298146398803882, 0.00454536882635523,
0.000317493839324935, 0.00399645473642857, 0.00149656209777629
)), class = "data.frame", row.names = c(NA, -16L))