[R] Reg: To change the x axis label in ts.plot function
drj|m|emon @end|ng |rom gm@||@com
Sat Dec 24 23:18:34 CET 2022
First, the date sequence you are using doesn't match the dates you
specify in your post. The code below may give you what you want:
# make up some prices
pricet <- ts(price, start = as.Date("2020-01-27"),end=as.Date("2021-07-26"),
On Sun, Dec 25, 2022 at 5:58 AM Upananda Pani <upananda.pani using gmail.com> wrote:
> Dear All,
> I have the data set with daily dates (5-days trading in a week) and price
> data. I want to change the x axis labels to the plot. I am using ts.plot
> function to plot my data. My data spans from 2020-01-27 to 2021-07-30. I
> want to change it to D-M-Y first. Then I want to show all the dates with a
> one week gap in my x-axis label.
> The following code I am using:
> pricet <- ts(price, start = c(2020, 27), frequency = 260)
> Please advise me how to achieve the desired result. I have attached my data
> and the plot which I am currently getting with ts.plot.
> With sincere regards,
> Upananda Pani
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help