我遇到了错误:插入返回代码时,参数暗示行数不同。
gdf_Google_Close <- data.frame(Date = as.Date(cta5Data$ï..Date, format="%m/%d/%Y"),
Close = cta5Data$Google.Close)
gdf_Amazon_Close <- data.frame(Date = as.Date(cta5Data$ï..Date, format="%m/%d/%Y"),
Close = cta5Data$Amazon.Close)
base_Close <- ggplot(gdf_Google_Close,aes(Date,Close)) +
geom_line(aes(color="Google")) +
geom_line(data=gdf_Amazon_Close, aes(color="Amazon")) +
labs(color="Close")
gdf_Google_Return <- data.frame(Date = as.Date(cta5Data$ï..Date, format="%m/%d/%Y"),
Return = cta5Data$Google.Return)
Error in data.frame(Date = as.Date(cta5Data$ï..Date, format = "%m/%d/%Y"), :
arguments imply differing number of rows: 253, 0