Analyze Stock Price Data in R