Re: [R] Powerful PC to run R

2011-05-13 Thread Hrishi Mittal
-contained, reproducible code. -- Hrishi Mittal Founder, Pretty Graph http://prettygraph.com Make your data sing! London, UK +44 7910 306 977 Sign up to our newsletter for useful and interesting updateshttp://eepurl.com/bqCyj Our blog - http://www.prettygraph.com/blog/ Follow us on Twitter

Re: [R] legend outside plot area

2010-08-15 Thread Hrishi Mittal
Emily, You need to set the xpd parameter to TRUE (using par) and use a negative value for the inset argument in the legend command. For example to place a legend on the right, legend(right,inset=c(-0.3,0),legend=somelegendvector) See ?legend and play around with the values of inset to get an

Re: [R] Plotrix Trick

2010-06-24 Thread Hrishi Mittal
Lorenzo, This is a bit ugly but should work. Instead of using plotrix's show.values, use the text() command: for(i in 1:5) { for(j in 1:5) { text(i-0.5,j-0.5,format(A[6-j,i],digits=3),col=white) } } -- View this message in context:

Re: [R] boxplot width

2010-06-24 Thread Hrishi Mittal
nana, If you save the boxplot as an R object, you can access various parameters of the resulting plot. Since we don't have your data, I'll give you an example with the preloaded ToothGrowth dataset: ToothGrowth-y b-boxplot(y$len~y$dose,xaxt=n) Now, if you type b at the R prompt, you will see

Re: [R] Plotrix Trick

2010-06-24 Thread Hrishi Mittal
Lorenzo, I think your question was already answered by Jan van der Laan - http://r.789695.n4.nabble.com/Plotrix-Trick-tp2265893p2266722.html -- View this message in context: http://r.789695.n4.nabble.com/Plotrix-Trick-tp2267177p2267225.html Sent from the R help mailing list archive at

Re: [R] how to make a barplot similar to Excel’s “clustered column chart”.

2010-06-14 Thread Hrishi Mittal
Josef, I think all you need to do is use the transpose of your data matrix. So if your dataset is called mydata: barplot(t(as.matrix(x)),beside=T) -- View this message in context:

Re: [R] Multi-panel Pie Charts.

2010-03-25 Thread Hrishi Mittal
Hi Jim, what's the tab.title function you are using? - Try http://prettygraph.com Pretty Graph , the easiest way to make R-powered graphs on the web. -- View this message in context: http://n4.nabble.com/Multi-panel-Pie-Charts-tp1687026p1690627.html Sent from the R help mailing list

[R] How to read percentage and currency data?

2010-02-24 Thread Hrishi Mittal
I'm struggling to find any help on this seemingly simple question - how does one read data with percentage (%) or currency (£,$ etc.) signs? When I try to read a data file which has any of those symbols in the data fields, they are read as characters rather than values. Is there a function or

Re: [R] How to read percentage and currency data?

2010-02-24 Thread Hrishi Mittal
Thanks Ista, that's sort of what I'm doing at the moment. But my problem is that I don't always know if the data has such symbols or signs in them. I can do a gsub on the entire dataset but I also need to preserve the currency signs to deal with multiple columns with different currencies. Doing

Re: [R] Odp: How to read percentage and currency data?

2010-02-24 Thread Hrishi Mittal
Petr, I've tried that conversion but I get only rounded integer values. So 585% becomes 6 , 101% becomes 1 etc. I've also tried as.double and as.real but still get the same results. - Try http://prettygraph.com Pretty Graph , the easiest way to make R-powered graphs on the web. -- View

Re: [R] Odp: How to read percentage and currency data?

2010-02-24 Thread Hrishi Mittal
Petr, Removing the % signs by Ista's method works. However as I noted earlier, I was hoping there was a more elegant solution which deals with percentage and currency values without knowing about their presence beforehand. It's a shame that something which Excel deals with trivially is such a

Re: [R] Odp: How to read percentage and currency data?

2010-02-24 Thread Hrishi Mittal
Petr and Rob, I apologise for complicating my question further. Having more than one currency in the same column is no doubt inconsistent. For now, I'm happy to have a solution for reading single currencies or percentage values in separate columns. I will use string replacement until I can think

Re: [R] scatterplots in car package

2010-02-23 Thread Hrishi Mittal
Robert, It seems that the scatterplot() command is starting a new graphics device. You could use the base plot command to achieve the same results including the non-parametric fit (scatterplot() uses a lowess fit): #First it's important to save the distributions as objects, otherwise rnorm()

Re: [R] axes limits in do3d

2010-02-23 Thread Hrishi Mittal
What is your dataset? Can you provide a sample? Also, what errors or warnings do you get when you run your command? - Try http://prettygraph.com Pretty Graph , the easiest way to make R-powered graphs on the web. -- View this message in context:

Re: [R] table data as input to the function

2010-02-23 Thread Hrishi Mittal
Hi chinna, Welcome to the forum and thanks for asking questions. You may not realise this but the questions you ask and the answers people provide here may help a lot of people later on. I have learnt a lot about R simply by searching the older posts on this forum. So, it is important that you

Re: [R] colour highlighting inputs and outputs in the R terminal?

2010-02-23 Thread Hrishi Mittal
Liviu, if you use Emacs + ESS, that provides colour highlighting. You can also have a script file alongside so that you have a saved command history in an R source file. See http://ess.r-project.org/ to get started. - Try http://prettygraph.com Pretty Graph , the easiest way to make

Re: [R] export tables to Excel files

2010-02-23 Thread Hrishi Mittal
Richard, is it possible to use RExcel under Linux, not to interface with Excel of course but to read and write Excel files? - Try http://prettygraph.com Pretty Graph , the easiest way to make R-powered graphs on the web. -- View this message in context:

Re: [R] Re : how to plot select points in preexisting persp plot

2010-02-22 Thread Hrishi Mittal
Preeti, Could you please post a sample of your data and all the code? It is hard to answer your question without knowing what coords and act are - Try http://prettygraph.com Pretty Graph , the easiest way to make R-powered graphs on the web. -- View this message in context:

Re: [R] adding infrequent date labels to x-axis

2010-02-22 Thread Hrishi Mittal
Hi emorway, It seems to me that all you need is one command: plot(as.Date(cropped.cast1$date,%Y-%m-%d),cropped.cast1$Frac_ET_Satsfd_mean) - Try http://prettygraph.com Pretty Graph , the easiest way to make R-powered graphs on the web. -- View this message in context:

Re: [R] adding infrequent date labels to x-axis

2010-02-22 Thread Hrishi Mittal
Hi emorway, You are right. I tried the command only with one year's data, in which case it plots month names as labels. But for multiple years, the labels become years. I found this old post useful - http://n4.nabble.com/Month-tick-marks-on-a-plot-td879121.html#a879121. Picking the code from the

Re: [R] relative file path

2010-02-22 Thread Hrishi Mittal
There was a brief discussion about this on stackoverflow - http://stackoverflow.com/questions/1815606/rscript-determine-path-of-the-executing-script. - Try http://prettygraph.com Pretty Graph , the easiest way to make R-powered graphs on the web. -- View this message in context:

Re: [R] tickmarks with time in dotplots

2010-02-22 Thread Hrishi Mittal
Thanks Phil, I was also trying to get at something like that but couldn't quite figure it out as quickly. Mikkel, I guess for your specific example you would need to define ticks like this: ticks = seq(min(C$Time),max(C$Time),by='30 min') - Try http://prettygraph.com Pretty Graph , the

Re: [R] How to change a venn command into a named object that can be plotted like a lattice object

2010-02-22 Thread Hrishi Mittal
George, Unless, Venn Diagrams are produced as lattice objects, I don't think you can save them to modify or update later on. However, if you are just looking for a shortcut to avoid calling the plotting function again and again you could use the recordPlot() and replayPlot() functions. Add this

Re: [R] How to reverse the axis direction in log plot?

2010-02-08 Thread Hrishi Mittal
plot(1:10,1:10,log='xy',xlim=c(10,1)) - Try http://prettygraph.com Pretty Graph , the easiest way to make R-powered graphs on the web. -- View this message in context: http://n4.nabble.com/How-to-reverse-the-axis-direction-in-log-plot-tp1473161p1473176.html Sent from the R help mailing

Re: [R] yeroon.net/ggplot2 web application v0.11

2009-12-07 Thread Hrishi Mittal
Wow, this is really cool Jeroen! Jeroen Ooms-3 wrote: A new version of the ggplot2 web application is available at http://www.yeroon.net/ggplot2. New features include 1D geom’s (histogram, density, freqpoly), syntax mode (by clicking the tiny arrow at the bottom), and some additional

Re: [R] R CMD BATCH continue after an error in the script

2009-12-05 Thread Hrishi Mittal
Fabio, If you're not using the nls() function's result, then why don't you comment it out from the script? That way, there will be no error and the script will work fine. Please post your script if you need further help. Veronesi, Fabio wrote: Hi, I have a problem with R CMD BATCH,

Re: [R] R script From PHP

2009-12-02 Thread Hrishi Mittal
I agree with Romain that you should probably try and get Rserve to work as that is a much better way. However, to get your commandline version working, I suggest you use the Rscript comman instead of a bash script. So let's say you save your R script as a myscript.R file. Then do:

Re: [R] Calling R (GNU R) functions from Common Lisp, how?

2009-12-02 Thread Hrishi Mittal
RCL looks promising - http://common-lisp.net/project/rcl/ For quick and short calls to R, you can always use the system commands in CL to call R CMD or Rscript. tsunhin wong wrote: Hi Lisp users, I'm a user of both Common Lisp and R (GNU R). I found R has a rich collection of

Re: [R] Replying to Posts Within Same Thread

2009-12-02 Thread Hrishi Mittal
I use Nabble which it has a reply button and seems to work fine. The old version was very slow but the new one is fast. Peter Dalgaard wrote: Charlotte Maia wrote: On 12/2/09, John Sorkin jsor...@grecc.umaryland.edu wrote: I don't know what you are doing wrong because I don't know exactly

Re: [R] R script From PHP

2009-12-01 Thread Hrishi Mittal
Hi Amrit, I believe you can you use the PHP system command to call Rscript or R CMD. I don't know much PHP but this page might be useful - http://php.net/manual/en/function.system.php. You might also want to look at rapache - http://biostat.mc.vanderbilt.edu/rapache/ Good luck with your

Re: [R] Learning R

2009-11-30 Thread Hrishi Mittal
These are some good resources for learning R: Quick-R - http://www.statmethods.net/ From Data to Graphics - http://zoonek2.free.fr/UNIX/48_R/03.html UCLA Resources to help you learn and use R - http://www.ats.ucla.edu/stat/r/ Good luck! -- View this message in context:

Re: [R] Histogram and Density on the the same graph

2009-11-30 Thread Hrishi Mittal
Trafim, If you are plotting more than one variables on the same plot e.g. by using the lines() or points() function, then the limits of the X and Y axes are set based on the first variable you plot. So, you would have to set the xlim and ylim to the limits of the variable with the widest range,

Re: [R] How do I change the colour and format for the trelli plot ?

2009-11-19 Thread Hrishi Mittal
Add col=i in the histogram call. -- View this message in context: http://old.nabble.com/How-do-I-change-the-colour-and-format-for-the-trelli-plot---tp26418382p26421302.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] How do I change the colour and format for the trelli plot ?

2009-11-19 Thread Hrishi Mittal
To have a different colour for each histogram. Wasn't that your question? Sorry if I misunderstood. Did you try it? ychu066 wrote: what is that ? Hrishi Mittal wrote: Add col=i in the histogram call. -- View this message in context: http://old.nabble.com/How-do-I-change