[R] scripting qqplot and qqnorm

2011-07-24 Thread Vihan Pandey
Hi all, I am an R newbie, and I have a question about scripting. I have the following lines which I want to put int\ o a script which I can call from the shell of a Mac/Linux machine : myrns <- read.csv(file="/Users/vihan/test.csv",sep="",header=FALSE) qqnorm(myrns) qqline(myrns) This works fine

[R] Doing Mathematica Quantile[] function in R

2012-03-07 Thread Vihan Pandey
Hi all, I am an R newbie trying to do some calculations I do in Mathematica in R on a GNU/Linux system. The main thing I am interested in doing is taking a 0.999 quantile on a data set in a file who's data is normally distributed, say foo.csv. e.g in Mathematica if I have something like this :

[R] fitting a histogram to a Gaussian curve

2012-03-19 Thread Vihan Pandey
Hello, I am trying to fit my histogram to a smooth Gaussian curve(the data closely resembles one except a few bars). This is my code : #!/usr/bin/Rscript out_file = "irc_20M_opencl_test.png" png(out_file) scan("my.csv") -> myvals hist(myvals, breaks = 50, main = "My Distribution",xlab = "My V

Re: [R] fitting a histogram to a Gaussian curve

2012-03-19 Thread Vihan Pandey
s(seq(min(x), max(x), length.out = 300) -> y, dnorm(y, mean(x), > sd(x)), col = 2) > > Hope this helps, > Michael > > On Mon, Mar 19, 2012 at 12:47 PM, Vihan Pandey wrote: >> Hello, >> >> I am trying to fit my histogram to a smooth Gaussian curve(the

Re: [R] fitting a histogram to a Gaussian curve

2012-03-19 Thread Vihan Pandey
od function is nicely behaved. You may need to for harder > distributions. > > Michael > > On Mon, Mar 19, 2012 at 2:54 PM, Vihan Pandey wrote: >> I see, that could be an option, however isn't there a fitting function >> which would do that on given data? >> &g

[R] getting multiple plots on a single plot

2012-03-22 Thread Vihan Pandey
Hi all, I have the following R script : #!/usr/bin/Rscript out_file = "hybrid.pdf" pdf(out_file, height=8.5, width=11) myvalues_1M <- read.csv("hybrid_sims_1M.csv",head=TRUE,sep=",") plot(myvalues_1M$num_sims_per_thread,myvalues_1M$time_per_sim,xlab="Number of Simulations per Thread",ylab="Tim

Re: [R] getting multiple plots on a single plot

2012-03-22 Thread Vihan Pandey
; Michael > > On Thu, Mar 22, 2012 at 3:18 PM, Vihan Pandey wrote: >> Hi all, >> >> I have the following R script : >> >> >> #!/usr/bin/Rscript >> >> out_file = "hybrid.pdf" >> pdf(out_file, height=8.5, width=11)

Re: [R] getting multiple plots on a single plot

2012-03-22 Thread Vihan Pandey
at, labels = labels, ...) : "add" is not a graphical parameter 5: In box(...) : "add" is not a graphical parameter 6: In title(...) : "add" is not a graphical parameter Cheers! - vihan > > HTH > > Chris > On 03/22/2012 03:18 PM, Vihan Pandey

Re: [R] getting multiple plots on a single plot

2012-03-22 Thread Vihan Pandey
On 22 March 2012 21:06, David Winsemius wrote: > > On Mar 22, 2012, at 3:18 PM, Vihan Pandey wrote: > >> Hi all, >> >> I have the following R script : >> >> >> #!/usr/bin/Rscript >> >> out_file = "hybrid.pdf" >> pdf(out_file

[R] histogram break width

2012-03-29 Thread Vihan Pandey
Hi all, I am generating histograms with the following R script : #!/usr/bin/Rscript out_file = "histo.png" png(out_file) scan("values.csv") -> myvalues hist(myvalues, breaks = 50) dev.off() print(paste("Plot was saved in:", getwd())) I want the histogram to have a larger number of breaks, b

[R] Axes value format

2012-05-08 Thread Vihan Pandey
Hi all, I have some graphs where the values on the X and Y axes are by default in exponent form like 2e+05 or 1.0e+07. Is it possible to make them in a more readable form like 10M for 1.0e+07 or 200K for 2e+05? Thanks and Regards, - vihan __ R-help@r-

Re: [R] Axes value format

2012-05-08 Thread Vihan Pandey
On 8 May 2012 19:47, John Kane wrote: > Quite likely, but we need to know what you are doing and what graphics > package you are using. > > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html >  and provide commented, minimal, self-contained, reproducible code. Frightf

Re: [R] Axes value format

2012-05-10 Thread Vihan Pandey
On 08/05/2012, David Winsemius wrote: > > On May 8, 2012, at 2:23 PM, Vihan Pandey wrote: > >> On 8 May 2012 19:47, John Kane wrote: >>> Quite likely, but we need to know what you are doing and what >>> graphics package you are using. >>> >>>

Re: [R] Axes value format

2012-05-10 Thread Vihan Pandey
On 08/05/2012, John Kane wrote: > Actually I meant a working example and some data (See ?dput for a handy way > to supply data) > > It is also a good idea to include the information from sessionInfo() > > > I think David W has a good approach. > > Otherwise you might just want to write the axis y

Re: [R] Axes value format

2012-05-10 Thread Vihan Pandey
- vihan > > A.K. > > > > > > > > - Original Message - > From: Vihan Pandey > To: r-help > Cc: > Sent: Tuesday, May 8, 2012 1:29 PM > Subject: [R] Axes value format > > Hi all, > > I have some graphs where the values on the X and Y axes are by default &