[R] placing a text in the corner of a plot

2008-07-29 Thread Jörg Groß
Is there an easy way to add a text into an R-plot and place it in the upper left corner? Like that: | (a) | | | | | |

Re: [R] placing a text in the corner of a plot

2008-07-29 Thread Jorge Ivan Velez
Dear Jörg, Perhaps, plot(1:10) legend(topleft,c(Your text here),pch=1) See ?legend and ?text for more information. HTH, Jorge On Tue, Jul 29, 2008 at 6:04 PM, Jörg Groß [EMAIL PROTECTED] wrote: Is there an easy way to add a text into an R-plot and place it in the upper left corner?

Re: [R] finding a faster way to do an iterative computation

2008-07-29 Thread Moshe Olshansky
Try abs(outer(xk,x,-)) (see ?outer) --- On Wed, 30/7/08, dxc13 [EMAIL PROTECTED] wrote: From: dxc13 [EMAIL PROTECTED] Subject: [R] finding a faster way to do an iterative computation To: r-help@r-project.org Received: Wednesday, 30 July, 2008, 4:12 AM useR's, I am trying trying to

Re: [R] R command history -- can it be like Matlab's?

2008-07-29 Thread losemind
Prof Brian Ripley wrote: A patch to do this was posted on 2007-09-29 by Glenn Davis. Some people not addicted to Matlab find the behaviour very inconvenient and prefer the getline/readline behaviour (triggered by ^R/^S) of Rterm and R on Unixen. On Tue, 29 Jul 2008, losemind wrote:

Re: [R] placing a text in the corner of a plot

2008-07-29 Thread Jörg Groß
legend(topleft,c(Your text here),pch=1) Thanks! But is it possible to get rid of the legend-box and the box-shadow? I don't find an argument in the manual for that. Am 30.07.2008 um 00:08 schrieb Jorge Ivan Velez: Dear Jörg, Perhaps, plot(1:10) legend(topleft,c(Your text

Re: [R] Legality Question about R's Open Source GNU GPL License

2008-07-29 Thread David Henderson
Hi All: I know this has been discussed at length already, but 1) I get R-Help in digest and didn't see this until 3am Pacific time this morning, and 2) We, REvolution, have been discussing this as of late. I thought I would pass on some of the knowledge we have recently obtained vis a

Re: [R] Help interpreting density().

2008-07-29 Thread Bill.Venables
In general there is no relation. The output of density gives you something you can plot, essentially. So the x-values are simply a series of points covering the range of the density and the y values are the ordinates at those abscissae. try plot(density(rnorm(1000)^2))) for example. Bill

Re: [R] Chi-square parameter estimation

2008-07-29 Thread Moshe Olshansky
If v is your vector of sample variances (and assuming that their distribution is chi-square) you can define f(df) - sum(dchisq(v,df,log=TRUE)) and now you need to maximize f, which can be done using any optimization function (like optim). --- On Sat, 26/7/08, Julio Rojas [EMAIL PROTECTED]

Re: [R] placing a text in the corner of a plot

2008-07-29 Thread Rolf Turner
On 30/07/2008, at 10:47 AM, Jörg Groß wrote: legend(topleft,c(Your text here),pch=1) Thanks! But is it possible to get rid of the legend-box and the box-shadow? I don't find an argument in the manual for that. You explicitly said that you *wanted* a box!!! But be that

Re: [R] placing a text in the corner of a plot

2008-07-29 Thread Ben Tupper
On Jul 29, 2008, at 6:47 PM, Jörg Groß wrote: legend(topleft,c(Your text here),pch=1) Thanks! But is it possible to get rid of the legend-box and the box-shadow? I don't find an argument in the manual for that. Hi, The documentation for the argument is right there - but as always it

[R] correlation between matrices - both with some NAs

2008-07-29 Thread rcoder
Hi everyone, I'm having trouble applying the Cor() function to two matrices, both of which contain NAs. I am doing the following: a-cor(m1, m2, use=complete.obs) ... and I get the following error message: Error in cor(m1, m2, use = complete.obs) : no complete element pairs Does anyone

Re: [R] rollapply() opertation on time series

2008-07-29 Thread rcoder
Hi Gabor, Thanks for your reply. Assuming I have a time series that is ready made (i.e. not constructed it using a zoo function) will the procedure below still retain the dates in the matrix? Thanks, rcoder quote author=Gabor Grothendieck rollapply along an index: library(zoo) z -

[R] rolling regression between adjacent columns

2008-07-29 Thread rcoder
Hi everyone, I am trying to apply linear regression to adjacent columns in a matrix (i.e. col1~col2; col3~col4; etc.). The columns in my matrix come with identifiers at the top of each column, but when I try to use these identifiers to reference the columns in the regression function using

Re: [R] Legality Question about R's Open Source GNU GPL License

2008-07-29 Thread Gad Abraham
If your legal department is still concerned, have them look at the license in Java. It most likely is GPL (unless you have a special commercial version of Java installed) and thus makes any Java program you create subject to the GPL in Java due to the JIT compiler used in Java. If your legal

Re: [R] Colors in Sweave

2008-07-29 Thread Duncan Murdoch
On 27/07/2008 3:10 PM, Stephen Tucker wrote: Hi list, I was using Sweave and was wondering if anyone has had any luck changing the font colors of the code chunks. For instance, in my .Rnw preample I tried including: === \usepackage[usenames]{colors} \definecolor{darkred}{rgb}{0.545,0,0}

Re: [R] Legality Question about R's Open Source GNU GPL License

2008-07-29 Thread Gad Abraham
Gad Abraham wrote: If your legal department is still concerned, have them look at the license in Java. It most likely is GPL (unless you have a special commercial version of Java installed) and thus makes any Java program you create subject to the GPL in Java due to the JIT compiler used in

Re: [R] Legality Question about R's Open Source GNU GPL License

2008-07-29 Thread David Henderson
Hello Gad: On Jul 29, 2008, at 4:41 PM, Gad Abraham wrote: If your legal department is still concerned, have them look at the license in Java. It most likely is GPL (unless you have a special commercial version of Java installed) and thus makes any Java program you create subject to the

Re: [R] table questions

2008-07-29 Thread Ted Harding
On 29-Jul-08 16:28:26, Edna Bell wrote: Hi again! Suppose I have the following: xy - round(rexp(20),1) xy [1] 0.1 3.4 1.6 0.4 1.0 1.4 0.2 0.3 1.6 0.2 0.0 0.1 0.1 1.0 2.0 0.9 2.5 0.1 1.5 0.4 table(xy) xy 0 0.1 0.2 0.3 0.4 0.9 1 1.4 1.5 1.6 2 2.5 3.4 1 4 2 1 2 1 2

[R] how to get the position of a vector-value

2008-07-29 Thread Jörg Groß
I am searching for a way to get nearest position of a number in a vector from a search-value. So perhaps if I have this vector: 1.0 1.2 1.4 1.6 1.8 2.0 I want to get the position of a special number. with match(1.4 ,x), I get 3 for position three. But now I want the nearest number

Re: [R] rollapply() opertation on time series

2008-07-29 Thread Gabor Grothendieck
methods(rollapply) shows which classes have rollapply methods. On Tue, Jul 29, 2008 at 5:48 PM, rcoder [EMAIL PROTECTED] wrote: Hi Gabor, Thanks for your reply. Assuming I have a time series that is ready made (i.e. not constructed it using a zoo function) will the procedure below still

Re: [R] rolling regression between adjacent columns

2008-07-29 Thread Gabor Grothendieck
Read the last line of every message to r-help. On Tue, Jul 29, 2008 at 6:15 PM, rcoder [EMAIL PROTECTED] wrote: Hi everyone, I am trying to apply linear regression to adjacent columns in a matrix (i.e. col1~col2; col3~col4; etc.). The columns in my matrix come with identifiers at the top of

Re: [R] finding a faster way to do an iterative computation

2008-07-29 Thread dxc13
Thank you to all who applied. These all seem to work the way I want them to. The outer function seems really useful, I probably could use that for a lot of my work. Thanks! Rolf Turner-3 wrote: On 30/07/2008, at 6:12 AM, dxc13 wrote: useR's, I am trying trying to find out if there

Re: [R] how to get the position of a vector-value

2008-07-29 Thread jim holtman
?findInterval x - c(1.0,1.2,1.4,1.6,1.8,2.0) findInterval(1.4,x) [1] 3 findInterval(1.5,x) [1] 3 findInterval(10,x) [1] 6 On Tue, Jul 29, 2008 at 8:32 PM, Jörg Groß [EMAIL PROTECTED] wrote: I am searching for a way to get nearest position of a number in a vector from a search-value. So

Re: [R] Is there a better way to check if an element of a list exists than using match on names?

2008-07-29 Thread jim holtman
Is this what you want: var3 %in% names(ipf) [1] FALSE var1 %in% names(ipf) [1] TRUE On Tue, Jul 29, 2008 at 6:20 PM, [EMAIL PROTECTED] wrote: Hello R mailing list Is there a better way than this to see if an element exists *within* a list object : #generate file.txt using current

Re: [R] R command history -- can it be like Matlab's?

2008-07-29 Thread Spencer Graves
Regarding dubuggers, RSiteSearch(debug, fun) produced 183 hits for me just now. The first two reference a debug package, while the third describes the debug function in the base package. The debug{base} function is great, but not as good as the Matlab debugger. The debug package

[R] Repeated Measure ANOVA-Old question

2008-07-29 Thread ctu
Hi R users, I google the website and I found that there are three ways to perform repeated measure ANOVA: aov, lme and lmer. http://www.mail-archive.com/[EMAIL PROTECTED]/msg58502.html But the questions are which one is good to use and how to do post-hoc test? I use the example that is

<    1   2