Language: R Data: from "Yahoo! Finance"
I am trying to delete 100 rows of data from a stock price dataset and then I want to plot the "Close" column. I expect to see a straight line inside the graph(for the missing values area). When I am running the following code, I get the below error message.
CODE:
library(quantmod)
alt.data.AMZN <- getSymbols("AMZN", from="2010-12-31", to="2013-12-31", auto.assign = FALSE)
class(alt.data.AMZN)
head(alt.data.AMZN)
plot(alt.data.AMZN$AMZN.Close)
#Deleting a few rows of data from the xts object.
data.missing <- alt.data.AMZN[c(-400:-500),]
head(data.missing)
plot(data.missing$AMZN.close) #This is where I get the error
Error message**: Error in plot.window(...) : need finite 'xlim' values In addition: Warning messages: 1: In min(x) : no non-missing arguments to min; returning Inf 2: In max(x) : no non-missing arguments to max; returning -Inf 3: In min(x) : no non-missing arguments to min; returning Inf 4: In max(x) : no non-missing arguments to max; returning -Inf