Re: [R] Reg: To change the x axis label in ts.plot function

2022-12-24 Thread Jim Lemon
Hi Upananda, 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 price<-c(seq(60,25,length.out=25),seq(25,70,length.out=54))+rnorm(79) pricet <- ts(price, start =

Re: [R] Reg: To change the x axis label in ts.plot function

2022-12-24 Thread CALUM POLWART
https://stackoverflow.com/questions/49679699/time-series-plot-change-x-axis-format-in-r Is as good a solution as possible using ts I think. On Sat, 24 Dec 2022, 18:58 Upananda Pani, wrote: > Dear All, > I have the data set with daily dates (5-days trading in a week) and price > data. I want

[R] Reg: To change the x axis label in ts.plot function

2022-12-24 Thread Upananda Pani
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

Re: [R] difference between script and a function....

2022-12-24 Thread akshay kulkarni
Dear Ivan, Thanks a lot.! Thanking you, Yours sincerely, AKSHAY M KULKARNI From: Ivan Krylov Sent: Saturday, December 24, 2022 9:27 PM To: akshay kulkarni Cc: R help Mailing list Subject: Re: [R] difference between script and a

Re: [R] difference between script and a function....

2022-12-24 Thread Ivan Krylov
On Sat, 24 Dec 2022 15:47:14 + akshay kulkarni wrote: > How do you debug if there is an error, particularly if I run the > script from the BASH prompt? Post-mortem debugging for non-interactive R scripts can be enabled by setting options(error = quote(dump.frames("A_SUITABLE_FILE_NAME",

Re: [R] difference between script and a function....

2022-12-24 Thread akshay kulkarni
dear Ivan, Thanks for the reply. One last question: 1. How do you debug if there is an error, particularly if I run the script from the BASH prompt? The closest I have come to debugging a script is when I source the script in Rstudio. There everything is intiutive...but

Re: [R] difference between script and a function....

2022-12-24 Thread Ivan Krylov
On Sat, 24 Dec 2022 14:54:52 + akshay kulkarni wrote: > If there is some error in the script, the error will be output to > the stdout? Or to the file that it creates for saving the output of > the script? When using Rscript: to stderr, to be precise. When using R CMD BATCH: to the Rout

Re: [R] difference between script and a function....

2022-12-24 Thread akshay kulkarni
Dear Simmons, Thanks a lot. One more question: 1. If there is some error in the script, the error will be output to the stdout? Or to the file that it creates for saving the output of the script? Thanking you, Yours sincerely, AKSHAY M KULKARNI

Re: [R] difference between script and a function....

2022-12-24 Thread Andrew Simmons
1. The execution environment for a script is the global environment. Each R script run from a shell will be given its own global environment. Each R session has exactly one global environment, but you can have several active R sessions. 2. Using return in a script instead of a function will throw

[R] difference between script and a function....

2022-12-24 Thread akshay kulkarni
Dear members, I will be running scripts automatically in RHEL with crontab. I want to know the differences between running a script and a function. in particular: 1. An execution environment will be created for the function. what about a script? Is the