frame that should be properly formatting with a date index that's properly formatted to be an .xts. However, I cannot complete the conversion to an xts object and receive the following error:
Error in xts(master_zillow5) :
order.by requires an appropriate time-based object
Here is my script. I should have the date index created to then make the index:
master_zillow4[,1] <- as.Date(master_zillow4[,1])
master_zillow5 <- master_zillow4 %>% column_to_rownames(., var = 'Date')
test <- xts(master_zillow5,order.by = index(master_zillow5))
index(test) <- mdy(index(test))
Sample of the masterzillow5 object:
structure(list(`77449` = c(112055.39, 112074.39), `77494` = c(221254.91,
221443.2), `79936` = c(92921.09, 92903.53), `11368` = c(272971.91,
275503.86), `11385` = c(247208.49, 248297.55), `90011` = c(119682.49,
120141.32), `60629` = c(85923.22, 85887.92), `77084` = c(111978.96,
111930.09), `91331` = c(141705.13, 141906.18), `90650` = c(175432.71,
175560.59), ` 8701` = c(154371.71, 155046.85), `11236` = c(202347.35,
203171.26), `90201` = c(151762.67, 151854.87), `92335` = c(109520.6,
110306.38), `11208` = c(169135.26, 169468.6), `10467` = c(151250.38,
152186.03), `11226` = c(227102.62, 228847.7), `78660` = c(181774.38,
182131.03), `92503` = c(158099.49, 158438.13), `90250` = c(193337.36,
193665.76)), row.names = c("2000-01-31", "2000-02-29"), class = "data.frame")
Help is much appreciated!