Re: [R] The difference between SAS and R

2013-12-22 Thread peter dalgaard
On 20 Dec 2013, at 18:53 , Kevin Wright kw.s...@gmail.com wrote: SAS uses words. R uses symbols. See this: http://xkcd.com/1306/ (Yes, I know IML uses plenty of symbols. It's just supposed to be funny. And somewhat true.) Actually, R is on par with C++ when it comes to _prefixed_

[R] Season's Greetings (and great news ... )!

2013-12-22 Thread Ted Harding
Greetings All! With the Festive Season fast approaching, I bring you joy with the news (which you will surely wish to celebrate) that R cannot do arithmetic! Usually, this is manifest in a trivial way when users report puzzlement that, for instance, sqrt(pi)^2 == pi # [1] FALSE which is the

[R] Knitr, ggplot and consistent fonts

2013-12-22 Thread Daniel Haugstvedt
Dear R-help I am using Knitr and ggplot to draft an article and have now started to improve on the layout and graphics. So far I have not been able to maintain the same font size for labels in all my figures. My goal is to be able to change the width of the figures while maintaining the same

Re: [R] Possible to vary widths and/or heights of lattice panels?

2013-12-22 Thread Frank Harrell
Thanks very much Rich and Duncan. latticeExtra's resizePanels function was a perfect solution. Frank __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Possible to vary widths and/or heights of lattice panels?

2013-12-22 Thread Duncan Mackay
Frank I forgot about resizePanels but I sometimes have used the old way -- pre latticeExtra to get exactly what I want. I find it is easier to make small changes when trying to get a large number of rows eg (5-7) etc onto a page especially in conjunction with modifying the yaxis labels sensu

[R] How do I separate elements of a vector by comma?

2013-12-22 Thread Patty Haaem
I have a vector like this (this vector is a colomn of a data set): 3 5 2 3 7 4 7 8  8 9 0 1 4 I want to separate elements of the vector by comma like this: 3,5,2,3,7,4,7,8,8,9,0,1,4 How can do this? Thanks. Elham [[alternative HTML version deleted]]

Re: [R] How do I separate elements of a vector by comma?

2013-12-22 Thread arun
Hi, Try: vec1#vector paste(vec1,collapse=,) A.K. On Sunday, December 22, 2013 10:42 AM, Patty Haaem elham_h...@yahoo.com wrote: I have a vector like this (this vector is a colomn of a data set): 3 5 2 3 7 4 7 8  8 9 0 1 4 I want to separate elements of the vector by comma like this:

Re: [R] How do I separate elements of a vector by comma?

2013-12-22 Thread John Kane
paste(xx,,, sep = ) but this coerces the vector to a character vector. John Kane Kingston ON Canada -Original Message- From: elham_h...@yahoo.com Sent: Sun, 22 Dec 2013 07:40:21 -0800 (PST) To: r-help@r-project.org Subject: [R] How do I separate elements of a vector by comma? I

Re: [R] Season's Greetings (and great news ... )!

2013-12-22 Thread Suzen, Mehmet
I wouldn't blame R for floating-point arithmetic and our personal feeling of what 'zero' should be. options(digits=20) pi [1] 3.141592653589793116 sqrt(pi)^2 [1] 3.1415926535897926719 (pi - sqrt(pi)^2) 1e-15 [1] TRUE There was a similar post before, for example see:

Re: [R] Season's Greetings (and great news ... )!

2013-12-22 Thread Bert Gunter
Yes. See also Feigenbaum's constant and chaos theory for the general context. Cheers, Bert On Sun, Dec 22, 2013 at 8:54 AM, Suzen, Mehmet msu...@gmail.com wrote: I wouldn't blame R for floating-point arithmetic and our personal feeling of what 'zero' should be. options(digits=20) pi [1]

Re: [R] seq_len and loops

2013-12-22 Thread William Dunlap
for (i in seq_len(x - 1) + 1) should be efficient and safe. Oops, not safe when x is 0. Also, the '+ 1' should be '+ 1L' to get the same answer as seq_len(x)[-1]. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org

Re: [R] Knitr, ggplot and consistent fonts

2013-12-22 Thread John Kane
Hi Daniel, For some reason I cannot get your example to work. The problem is in the code chunk but I have no idea what is happening. The code is running perfectly in R, itself but LaTeX seems to be choking when it hits the first ggplot statement, that is the one in plot-figHeight= The

Re: [R] Season's Greetings (and great news ... )!

2013-12-22 Thread Ted Harding
Thanks for the comments, Bert and Mehmet! It is of course a serious and interesting area to explore (and I'm aware of the chaos context; I initially got into this areas year ago when I was exploring the possibilities for chaos in fish population dynamics -- and they're certainly there)! But,

Re: [R] Season's Greetings (and great news ... )!

2013-12-22 Thread John Kane
(or whatever the keyboard analogue of that may be) Hands clasped? Fingers interlaced? John Kane Kingston ON Canada -Original Message- From: ted.hard...@wlandres.net Sent: Sun, 22 Dec 2013 18:37:18 - (GMT) To: r-help@r-project.org Subject: Re: [R] Season's Greetings (and

[R] Fwd: Knitr, ggplot and consistent fonts

2013-12-22 Thread Daniel Haugstvedt
I am forwarding to r-help just in case anyone else where wondering or have the same problem running the example. Cheers D -- Forwarded message -- From: Daniel Haugstvedt daniel.haugstv...@gmail.com Date: Sun, Dec 22, 2013 at 11:54 PM Subject: Re: [R] Knitr, ggplot and consistent

Re: [R] Knitr, ggplot and consistent fonts

2013-12-22 Thread Duncan Mackay
Hi Daniel I tried it in Sweave after modifying it for Sweave and a similar thing for Latex but R crashed. I think there is an embedded character/s before the first chunk and in the first chunk. Duncan Duncan Mackay Department of Agronomy and Soil Science University of New England Armidale NSW

[R] 2 factor split and lapply

2013-12-22 Thread Onur Uncu
R Users, I have a data frame which I split using 2 factors using the split function: split(datframe, list(f=factor1, f2=factor2)); I then used lapply to get some summary statistics grouped by factor1 and factor2. I now want to change the appearance of this output. I want to get a 2

Re: [R] 2 factor split and lapply

2013-12-22 Thread Bert Gunter
I believe you missed ?tapply which does what you want I think (in the absence of a reproducible example one cannot be sure). Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And knowledge is certainly not

Re: [R] Fitting particle size analysis data

2013-12-22 Thread PIKAL Petr
Hi Instead of RR function fit-nls(cum~ exp(-((size/r)^gama))*100, data=PSD, start=c(r=80, gama=2)) you need to use equation for lognormal distribution. You can find it on internet http://en.wikipedia.org/wiki/Log-normal_distribution My math skills are not high enough to present canned

Re: [R] Using cbind to merge different variables

2013-12-22 Thread PIKAL Petr
Hi Another option is dat1$Newvar - 1*(rowSums(dat1)0) Regards Petr -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of arun Sent: Friday, December 20, 2013 4:59 PM To: R help Subject: Re: [R] Using cbind to merge different