Re: [R] R² for non-linear model

2011-03-16 Thread Alexx Hardt
Am 16.03.2011 19:11, schrieb Joshua Wiley: (Are fortunes determined by voting? There is precedence for seconding desired fortunes at least) Wait, what do you mean by fortune? Is there a statistics-quote-package-something for the unix shell program 'fortune' ? If so, I want want want!

Re: [R] R² for non-linear model

2011-03-16 Thread Alexx Hardt
Am 16.03.2011 19:34, schrieb Anna Gretschel: Am 16.03.2011 19:21, schrieb Alexx Hardt: And to be on-topic: Anna, as far as I know anova's are only useful to compare a submodel (e.g. with one less regressor) to another model. thanks! i don't get it either what they mean by fortune... It's

[R] Setting the language of Rs error messages

2011-03-13 Thread Alexx Hardt
Hi, My R has been installed on a Ubuntu linux computer in Germany. The error messages I get are in German, for example: In min(magnitudes) : kein nicht-fehlendes Argument für min; gebe Inf zurück I would like those to be displayed in English, for pasting them into google. I tried searching

Re: [R] Setting the language of Rs error messages

2011-03-13 Thread Alexx Hardt
Am 13.03.2011 15:13, schrieb Richard M. Heiberger: Sys.setenv(LANG=EN) Thanks, this is exactly what I was looking for. Can I somehow configure R to set this variable to EN whenever I start it? __ R-help@r-project.org mailing list

[R] Creating a .png with just an expression() in it

2011-03-04 Thread Alexx Hardt
Hey, I'm trying to create an image file with the results of a regression analysis. In TeX, the line would be something like: $ size = 0.34 + 4.3 var_1 $ Can I create a plot window with just this line in it? I tried playing around with plot.new() or dev.new(), but didn't really find something

[R] Passing par()-parameters to many plot()s in a function

2010-12-03 Thread Alexx Hardt
Hi, I am implementing a function which generates about 10 .pdf plots in the current directory. I need the graphic to fit into a LaTeX-Presentation-slide, so the outer margin should be removed (this is the way to do it, right?): I am having trouble finding out where to put the par command(s).

Re: [R] Passing par()-parameters to many plot()s in a function

2010-12-03 Thread Alexx Hardt
Am 03.12.2010 20:31, schrieb Duncan Murdoch: On 03/12/2010 12:22 PM, Alexx Hardt wrote: Hi, I am implementing a function which generates about 10 .pdf plots in the current directory. I need the graphic to fit into a LaTeX-Presentation-slide, so the outer margin should be removed

Re: [R] sum in vector

2010-11-14 Thread Alexx Hardt
Am 14.11.2010 13:02, schrieb lgpeco: hy guys i have one question :) i have two vectors markets and price market- c(1, 5, 7, 9, 9, 6, 5, 4, 4, 3, 1, 2, 1) price- c(100, 20, 30, 10, 50, 23, 23, 33, 96, 6, 4, 38, 96) i would like sum prices: market 1: (100+4+96), market 2: (38),..., market 9:

[R] as.matrix behaves weird

2010-11-14 Thread Alexx Hardt
Hi, can someone tell me why x is still a 2x1-matrix in the last step? x - 1:2 x [1] 1 2 t(x) [,1] [,2] [1,]12 x - as.matrix(x,ncol=2) x [,1] [1,]1 [2,]2 I figured out that if I use x - matrix(x,ncol=2), instead of as.matrix(), it works fine. What exactly is the

[R] how to store a vector of vectors

2010-11-13 Thread Alexx Hardt
Hi, I'm trying to write a function to determine the euclidean distance between x (one point) and y (a set of n points). How should I pass y to the function? Until now, I used a matrix like that: | [,1] [,2] [,3] [1,] 0 2 1 [2,] 1 1 1 | Which would pass the

Re: [R] how to store a vector of vectors

2010-11-13 Thread Alexx Hardt
Am 13.11.2010 14:39, schrieb Sarah Goslee: I at least would need to see an actual example of your code to be able to answer your question. My function: norm - function(x,y){ sqrt( rowSums( (x-y)^2 ) ) } y - matrix( c( 1,1,1, 2,3,4), nrow=2, byrow=TRUE) x - c(1,1,1)

Re: [R] what does SEXP in R internals stand for

2010-11-13 Thread Alexx Hardt
Am 13.11.2010 14:50, schrieb John Fang: Hi all, Is there any one that would give an explanation on the abbreviation SEXP used in R internals to represent a pointer to a data structure? Thanks! S-Expression, I believe: http://en.wikipedia.org/wiki/S-expression Best wishes, Alex

Re: [R] how to store a vector of vectors

2010-11-13 Thread Alexx Hardt
Am 13.11.2010 15:48, schrieb Sarah Goslee: You are assuming that R is using row-major order for recycling elements, when in fact it is using column- major order. It doesn't show up in the first case, because all the elements of x are identical Oops. Mental note made. norm- function(x,