r - Convert the data frame to time series- Error NROW(x) must match length(order.by) -


while converting data frame timeseries facing following error:

code:

tszillowdata <-xts(zillowdata[,2:length(zillowdata)],                    order.by=as.date(as.character(zillowdata$time.line),                                     format='%m/%d/%y')) 

error:

error in xts(zillowdata[, 2:length(zillowdata)], order.by = as.date(as.character(zillowdata$time.line),  :    nrow(x) must match length(order.by) 

code:

tszillowdata <-xts(zillowdata[,-1],                    order.by=as.date(as.character(zillowdata$time.line),                                     format='%m/%d/%y')) 

error:

error in xts(zillowdata[, -1], order.by = as.date(as.character(zillowdata$time.line),  :    nrow(x) must match length(order.by) 

can me in converting this?
have attached snapshot of how data frame looks: data-frame picture


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -