Error in refreshTime(list(stock1, stock2)) : All the series in pData must contain data for a single day

Hello, I am a basic beginner in R. I'm trying to perform codes below. However ı am taking error like "Error in refreshTime(list(stock1, stock2)) : All the series in pData must contain data for a single day". Is there anybody who can tell the reason of this error. Thank you in advance.

data("sample_tdata");
data("sample_qdata");
#We assume that stock1 and stock2 contain price data on imaginary stocks:
stock1 = sample_tdata$PRICE;
stock2 = sample_qdata$BID;
#Previous-tick aggregation to one minute:
mPrice_1min = cbind(aggregatePrice(stock1),aggregatePrice(stock2));
#Refresh time aggregation:
mPrice_Refresh = refreshTime(list(stock1,stock2))

I think we need a FAQ: How to do a minimal reproducible example ( reprex ) for beginners

A handy way to supply some sample data is the dput() function. In the case of a large dataset something like dput(head(mydata, 100)) should supply the data we need.

Is it possible you included data for more thwn one day ?

No. Because this dataset is already embedded in Rstudio. All codes are taken from here http://highfrequency.herokuapp.com/. I would like to repeat it but I encountered this kind of error.

Thank you so much. Im going to try in this way :+1:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.