Re: [R] summary per group

2012-01-02 Thread Petr PIKAL
Hi > > > Hi > > > > > > > > Hello, > > > > > > I know that it'll be quite easy to do what I want but somehow I am lost > > as > > > I am new to R. I want to get summary results arranged by groups. In > > detail > > > I'd like get the number (levels) of Species per Family like for this > >

[R] An R interface to Model Building

2012-01-02 Thread Brett Magill
Hello all, To anyone who is interested, I'm trying to learn a bit more about developing applications in R with user interfaces. I've been playing around with gWidgets to develop a model building interface. I'd appreciate any comments, suggestions, or guidance on how to better structure my R code

Re: [R] Is it possible to "right align" text in R graphics?

2012-01-02 Thread Majid Einian
> Incidentally, gMail (on Windows) correctly rendered the Hebrew > ("Shalom Olam"), so it would seem that this probably is a plotting > issue rather than an OS issue I tested a Persian text with this kind of parentheses in linux and windows, and it seem it is indeed an OS issue. The text renders

Re: [R] About source()

2012-01-02 Thread Rolf Turner
On 03/01/12 17:02, Li SUN wrote: Hello, I am a beginner to the R language and find it fantastic and well-designed, quite different from other programming languages. What a refreshingly sensible attitude!!! :-) This is the first time I post on the r-help mailing list. In invoking the funct

Re: [R] Changing X axis of ggplot

2012-01-02 Thread Joshua Wiley
Hi Aren, Could you perhaps send us the output of: dput(dallas[1:40, "offense_hour", drop = FALSE]) I believe your problem, but getting it to work in ggplot2 will be easiest working with your actual data (or a bit of it anyway). for ggplot2 specific questions, you might also checkout: groups.goo

[R] About source()

2012-01-02 Thread Li SUN
Hello, I am a beginner to the R language and find it fantastic and well-designed, quite different from other programming languages. This is the first time I post on the r-help mailing list. In invoking the function source(filename), it seems that the filename has to exist in the current working d

[R] Biglm source code alternatives (E.g. Call to Fortran)

2012-01-02 Thread hardworker
Hi everyone, I have been looking at the Bigglm (Basically does Generalised Linear Models for big data under the Biglm package) command and I have done some profiling on this code and found that to do a GLM on a 100mb file (9 million rows by 5 columns matrix(most of the numbers were either a 0,1 or

[R] Options for generating editable figures?

2012-01-02 Thread Allen McBride
Hello all, I'm using R to produce figures for people who want to be able to edit the figures directly, and who use PowerPoint a lot. I use a Mac, and I'd appreciate any advice about how to approach this. Here's what I've come up with so far: 1) I can use xfig() and then ask them to install I

Re: [R] Changing X axis of ggplot

2012-01-02 Thread Hasan Diwan
Aren, On 2 January 2012 19:34, Aren Cambre wrote: > I am making a plot using this: > p <- ggplot(dallas, aes(x = offense_hour)) + geom_bar() + coord_polar() > The plot shows up fine, but the X axis labels are 0.0 through 1.0. How > do I convert this to 0:00 through 23:59 (or whatever may be > appr

[R] nls and rbinom function: step factor 0.000488281 reduced below 'minFactor' of 0.000976562

2012-01-02 Thread G Vishwanath
I  am trying to learn nls using a simple simulation. I assumed that the binomial prob varies linearly as 0.2 + 0.3*x in  x {0,1}, and the objective is to recover the known parameters a=0.2, b=0.3 ..data frame d has 1000 rows... d$x<-runif(0,1)               d$y<-rbinom(1000,1,0.2+0.3*d$x)  tab

Re: [R] Is using glht with "Tukey" for lme post-hoc comparisons an appropriate substitute to TukeyHSD?

2012-01-02 Thread Richard M. Heiberger
glht is probably what you should be using. Both TukeyHSD and glht give essesntially identical confidence intervals for the example in ?glht. What aren't you satisfied with? amod <- aov(breaks ~ tension, data = warpbreaks) confint(glht(amod, linfct = mcp(tension = "Tukey"))) TukeyHSD(amod) On Mon

[R] Changing X axis of ggplot

2012-01-02 Thread Aren Cambre
Thanks to Joshua Wiley for turning me on to ggplot2. I am making a plot using this: p <- ggplot(dallas, aes(x = offense_hour)) + geom_bar() + coord_polar() Dallas is a data frame, and offense_hour is a column with chron objects from the chron library. In this case, the chron object was created wi

[R] [newbie] pager for large matrix?

2012-01-02 Thread Tom Roche
summary: I'd like a tool to use within an R session (better yet an ESS buffer) that would * (minimally) allow me to page (à la `less`) a large sparse matrix * (preferably) page row-wise (i.e., show all values for row=1 before proceeding to row=2) details: Apologies if this is a FAQ, but I di

Re: [R] where to ask questions regarding package=ncdf?

2012-01-02 Thread David William Pierce
On Mon, Jan 2, 2012 at 6:08 PM, Tom Roche wrote: > > Should one ask questions relating to the R package 'ncdf' here? or > look for a more netCDF-oriented (but probably less R-oriented) list? > Hi Tom, you can ask here and I can give a shot at answering them (I'm the author of the ncdf and ncdf4

[R] where to ask questions regarding package=ncdf?

2012-01-02 Thread Tom Roche
Should one ask questions relating to the R package 'ncdf' here? or look for a more netCDF-oriented (but probably less R-oriented) list? Why I ask: I'm relatively new to R, which I've only used in the past for graphics. I'm trying to learn R as an alternative to manipulating netCDF files with NCO

Re: [R] Conditionally adding a constant

2012-01-02 Thread jim holtman
If you are worried about an NA in the first, then use the following: > y <- c(NA, 1, 2, NA, 4, NA) > y <- na.locf(y, na.rm = FALSE) > y [1] NA 1 2 2 4 4 > y <- na.locf(y, fromLast = TRUE) > y [1] 1 1 2 2 4 4 > On Mon, Jan 2, 2012 at 5:07 PM, Joshua Wiley wrote: > Good points, Rui. > > On M

[R] Is using glht with "Tukey" for lme post-hoc comparisons an appropriate substitute to TukeyHSD?

2012-01-02 Thread Anne Aubut
Hello, I am trying to determine the most appropriate way to run post-hoc comparisons on my lme model. I had originally planned to use Tukey HSD method as I am interested in all possible comparisons between my treatment levels. TukeyHSD, however, does not work with lme. The only other c

[R] tm.plugin.sentiment

2012-01-02 Thread Adedoyin-Olowe Mariam
Hello, Can you please, as a matter of urgency, tell me which R version support tm.plugin.sentiment  and how I can install the package in R studio. I use window 7. Thanks. [[alternative HTML version deleted]] __ R-help@r-project.org mailing lis

Re: [R] Very strange function() behaviour.

2012-01-02 Thread iliketurtles
Hi Bert, Sorry for the sub-par post.. again. I've revamped my OP, I hope it's sufficient now. Thank you. - Isaac Research Assistant Quantitative Finance Faculty, UTS -- View this message in context: http://r.789695.n4.nabble.com/as-formula-with-either-lapply-or-for-loop-tp4252877p425

Re: [R] Conditionally adding a constant

2012-01-02 Thread Joshua Wiley
Good points, Rui. On Mon, Jan 2, 2012 at 12:48 PM, Rui Barradas wrote: > Hello again, > > I believe we are all missing something. Isn't it possible to have NAs as the > first values of 'y'? > And isn't it also possible to have x[1] > 3? Theoretically, yes, in the OPs data, maybe? If the data is

Re: [R] Create variable with AND IF statement

2012-01-02 Thread David Winsemius
On Jan 2, 2012, at 4:22 PM, David Stevens wrote: Could it be NO. You are not reading the documentation for "if" carefully enough, despite several efforts to point you in the right direction. You cannot make literal transliterations of SPSS syntax work in the manner you imagine. -- Dav

Re: [R] Conditionally adding a constant

2012-01-02 Thread Rui Barradas
Hello again, I believe we are all missing something. Isn't it possible to have NAs as the first values of 'y'? And isn't it also possible to have x[1] > 3? Here is my point (I have changed function 'f2' to predict for such cases, 'f1' is rubbish) # Rui f3 <- function(x, y){ inx <- which(

Re: [R] find inflexion point of discrete value list with R

2012-01-02 Thread Ben Bolker
On 12-01-02 04:09 PM, David Winsemius wrote: > > On Jan 2, 2012, at 11:49 AM, Ben Bolker wrote: > >> Jonas Stein jonasstein.de> writes: >> >>> >>> i have a list of values like this >>> >>> x y >>> 1 3 >>> 2 2 >> >> [snip] >> >>> >>> and need the inflexion [sic] points (and all max and min). >>>

Re: [R] Create variable with AND IF statement

2012-01-02 Thread David Stevens
Could it be if(variable1.fac == 0 & variable2.num == 0) {variable3 = 1} # brackets {} aren't strictly required for a one liner. if(variable1.fac == 0 & variable2.num >= 0) {variable3 = 2} # brackets {} aren't strictly required for a one liner. if(variable1.fac == 1 & variable2.nu

Re: [R] Creating ZOO Matrix from Data Frame

2012-01-02 Thread Rich Shepard
On Mon, 2 Jan 2012, Gabor Grothendieck wrote: Assuming you need a separate column for each site see the read.zoo split= argument. An example is here: http://r.789695.n4.nabble.com/building-time-series-zoo-its-from-a-data-frame-tp2240349p2240814.html I created a new data frame for a single s

Re: [R] find inflexion point of discrete value list with R

2012-01-02 Thread David Winsemius
On Jan 2, 2012, at 11:49 AM, Ben Bolker wrote: Jonas Stein jonasstein.de> writes: i have a list of values like this x y 1 3 2 2 [snip] and need the inflexion [sic] points (and all max and min). Is there a nice way to get the local max, min and inflexion points? diff(y) gives you t

Re: [R] quadratic programming-maximization instead of minization

2012-01-02 Thread Ken Hutchison
I don't have experience with this in R and I'm not sure I understand the question that well but maybe something like nearPD()? Ken Hutchison On Jan 2, 2012, at 6:36 AM, riccardo24 wrote: > Hi, I need to maximize a quadratic function under constraints in R. > For minimization I used solve.QP

Re: [R] Create variable with AND IF statement

2012-01-02 Thread MacQueen, Don
I usually do this kind of thing like this: variable3 <- rep(1,length(variable1.fac)) variable3[ variable1.fac == 0 & variable2.num >= 1 ] <- 2 variable3[ variable1.fac == 1 & variable2.num == 0 ] <- 3 variable3[ variable1.fac == 1 & variable2.num >= 1 ] <- 4 This approach is easy to read and unde

Re: [R] Base function for flipping matrices

2012-01-02 Thread Hadley Wickham
> Your request is reminding me of the analysis of aray functions in Philip S > Abrams dissertation > http://www.slac.stanford.edu/cgi-wrap/getdoc/slac-r-114.pdf > AN APL MACHINE > > The section that starts on page 17 with this paragraph is the one that > immediately applies > > C. The Standard Form

Re: [R] Conditionally adding a constant

2012-01-02 Thread jim holtman
Here is a way of doing it without loops: > df <- data.frame(x = c(1,2,3,4,5), y = c(10,20,30,NA,NA)) > > require(zoo) # need na.locf to fix the NAs > > # replace NA with preceeding values > df$y <- na.locf(df$y) > df x y 1 1 10 2 2 20 3 3 30 4 4 30 5 5 30 > > # assuming that you want to increm

Re: [R] Conditionally adding a constant

2012-01-02 Thread Joshua Wiley
Here is another approach. Probably with some thought and fingerwork, rle() could be used to avoid the while loop, but that should only slow things down if there are long runs of NAs --- there can be a lot of NAs as long as they are spaced apart and it should still be quite efficient. f <- functio

Re: [R] clear plot linear mixed model

2012-01-02 Thread Christof Kluß
Am 02-01-2012 10:54, schrieb ken knoblauch: Christof Kluß email.uni-kiel.de> writes: lme<- lme(conc ~ name/time - 1, random=conc~time|nr,method="ML",data=measurements) see plot.augPred in the nlme package thx, but how to set "primary"? I always get the error plot(augPred(lme)) augPre

Re: [R] Remove me from the mailing list

2012-01-02 Thread Uwe Ligges
On 02.01.2012 18:53, Danai Katsande wrote: Dear Sir/Madam, Please kindly remove me from the mailing list as I no longer intend to receive emails from R help. Best [[alternative HTML version deleted]] __ R-help@r-project.org mailing list ht

Re: [R] Base function for flipping matrices

2012-01-02 Thread Claudia Beleites
Hadley, I started to throw some functions that I needed to be extended to arrays together as package arrayhelpers. If you consider that a good home for the new functions, they would be more than welcome. Currently I have the package at r-forge, but I wouldn't mind github, either (so far I just us

Re: [R] Remove me from the mailing list

2012-01-02 Thread Danai Katsande
Dear Sir/Madam, Please kindly remove me from the mailing list as I no longer intend to receive emails from R help. Best [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEA

Re: [R] Base function for flipping matrices

2012-01-02 Thread Richard M. Heiberger
Hadley, Your request is reminding me of the analysis of aray functions in Philip S Abrams dissertation http://www.slac.stanford.edu/cgi-wrap/getdoc/slac-r-114.pdf AN APL MACHINE The section that starts on page 17 with this paragraph is the one that immediately applies C. The Standard Form for Se

Re: [R] summary per group

2012-01-02 Thread David Winsemius
On Jan 2, 2012, at 11:14 AM, Johannes Radinger wrote: Thank you Petr, that is exactly what I was looking for... no I played a little bit around with that because I want to create a summary with FAM as a grouping variable. Beside the number of unique SPEC per FAM also want to get their

Re: [R] find inflexion point of discrete value list with R

2012-01-02 Thread Ben Bolker
Ben Bolker gmail.com> writes: > > Jonas Stein jonasstein.de> writes: > [snip] > [snip] > sign(s2y)[which(dy==0)] ## test for max/min/saddle oops, obviously this should be sign(d2y)[which(dy==0)] __ R-help@r-project.org mailing list https

Re: [R] find inflexion point of discrete value list with R

2012-01-02 Thread Ben Bolker
Jonas Stein jonasstein.de> writes: > > i have a list of values like this > > x y > 1 3 > 2 2 [snip] > > and need the inflexion points (and all max and min). > Is there a nice way to get the local max, min and inflexion points? diff(y) gives you the first difference, the analogue of the

[R] Creating ZOO Matrix from Data Frame

2012-01-02 Thread Rich Shepard
I believe that I have a basic understanding of zoo and how to use read.zoo on a text file, What I have not seen in the zoo help files and vignettes is how to convert a data frame to a zoo matrix for irregular time series analyses. An example data frame is structured like this: str(burns.cast

Re: [R] Display number in currency notation with commas

2012-01-02 Thread Pete Brecknock
eigenvalet wrote > > How can I display a number as currency including a $ sign and commas? > > -- > View this message in context: > http://r.789695.n4.nabble.com/Display-number-in-currency-notation-with-commas-tp4253460p4253460.html > Sent from the R help mailing list archive at Nabble.com. > >

Re: [R] summary per group

2012-01-02 Thread Johannes Radinger
Original-Nachricht > Datum: Mon, 2 Jan 2012 14:29:07 +0100 > Von: Petr PIKAL > An: "Johannes Radinger" > CC: r-help@r-project.org > Betreff: Re: [R] summary per group > Hi > > > > > Hello, > > > > I know that it'll be quite easy to do what I want but somehow I am lost > a

Re: [R] Smoothing spline with smoothing parameters selected by "generalized maximum likelihood"

2012-01-02 Thread Simon Wood
something like library(mgcv) gam(y~s(x,k=50),method="REML") is one option for spline smoothing y w.r.t. x and choosing the smoothing parameter by GML (GML and REML do the same thing). On 18/12/11 12:26, ali_protocol wrote: Hi there, How may I smooth spline two vectors with the smoothing

Re: [R] syntax for reading into R

2012-01-02 Thread Barry Rowlingson
On Mon, Jan 2, 2012 at 3:54 PM, Barry Rowlingson wrote: >  That looks suspiciously like a chunk of a GPX format file - GPS > tracks, that kind of thing. Am I right? > > If so, then get the rgdal package, and read it in. You'll end up with > a spatial data frame of some kind from which you can get

Re: [R] Create variable with AND IF statement

2012-01-02 Thread David Winsemius
On Jan 2, 2012, at 10:42 AM, David Winsemius wrote: On Jan 2, 2012, at 4:11 AM, Richard Kolodziej wrote: Hello, I'm using SPSS at work but really would like to switch to R. Right now I'm trying to learn R in reproducing calculations I did with SPSS but am stuck with something that is qu

Re: [R] syntax for reading into R

2012-01-02 Thread Barry Rowlingson
On Mon, Jan 2, 2012 at 3:31 PM, Marion Wenty wrote: . >   >    387 >    2012-01-01T15:32:03Z >    9 >   >   >    381 >    2012-01-01T15:32:34Z >    9 >   > ... > > now we would like to create a text file looking like the following, in > order to being able to read it into R afterwards. > > -> > >

Re: [R] Create variable with AND IF statement

2012-01-02 Thread ONKELINX, Thierry
Dear Richard, You can do this with some nested ifelse statements. Assuming variable2.num has only positive integers and variable1.fac is only 0 or 1 Variable3 <- ifelse(variable1.fac == 0, ifelse(variable2.num == 0, 1, 2), ifelse(variable2.num == 0; 3; 4)) A more fancy solution as.numeric(fac

[R] Display number in currency notation with commas

2012-01-02 Thread eigenvalet
How can I display a number as currency including a $ sign and commas? -- View this message in context: http://r.789695.n4.nabble.com/Display-number-in-currency-notation-with-commas-tp4253460p4253460.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] Create variable with AND IF statement

2012-01-02 Thread David Winsemius
On Jan 2, 2012, at 4:11 AM, Richard Kolodziej wrote: Hello, I'm using SPSS at work but really would like to switch to R. Right now I'm trying to learn R in reproducing calculations I did with SPSS but am stuck with something that is quite simple and comprehensible in SPSS-Syntax: IF (var

Re: [R] Very strange function() behaviour.

2012-01-02 Thread Bert Gunter
(To me, anyway) Incoherent. Reproducible code needed. -- Bert On Mon, Jan 2, 2012 at 1:59 AM, iliketurtles wrote: > Sorry if there's an easy answer to this problem, but here goes.. > * > INTRODUCTION & CONTEXT* > > I'm creating a function where the number of entries in the lm(y~...) > varies

[R] Predicting multiple responses

2012-01-02 Thread Momop Momop
I have question related to predicting mutiple response sequences and am not sure how to go about it. I have a training set of classifiers say T0, T1..TN and am trying to predict a sequence of results (say a timeseries), say R0, R1...Rx (R0, R1.etc may or may not be independent). How does one go

Re: [R] sm.density.compare - a lot of curves

2012-01-02 Thread Jorge I Velez
Hi Przemek, Take a look at ?sm.density.compare : you forgot to include the "group" argument in your call. Try require(sm) rno1 = rnorm(1000) rno2 = rnorm(1000) g <- rep(c(1, 2), each = 1000) y <- c(rno1, rno2) sm.density.compare(y, g, model = 'equal') HTH, Jorge.- On Mon, Jan 2, 2012 at 7:00

[R] Conditionally adding a constant

2012-01-02 Thread vioravis
I am trying to add a constant to the previous value of a variable based on certain conditions. Maybe there is a simple way to do this that I am missing completely. I have given an example below: df <- data.frame(x = c(1,2,3,4,5), y = c(10,20,30,NA,NA)) > df x y 1 1 10 2 2 20 3 3 30 4 4 NA 5 5

[R] syntax for reading into R

2012-01-02 Thread Marion Wenty
dear users, we have got the following question: we have got a text-file looking like this: ... 387 2012-01-01T15:32:03Z 9 381 2012-01-01T15:32:34Z 9 ... now we would like to create a text file looking like the following, in order to being able to read it into

[R] find inflexion point of discrete value list with R

2012-01-02 Thread Jonas Stein
i have a list of values like this x y 1 3 2 2 3 3 4 4 5 5 6 4 7 3 8 2 9 3 and need the inflexion points (and all max and min). Is there a nice way to get the local max, min and inflexion points? kind regards, -- Jonas Stein __ R-help@r-project.org

Re: [R] matrix position to list of coordinates

2012-01-02 Thread Willi Richert
Hi Ana, most probably this is one of the more ugly solutions: > d=dim(A) > d [1] 2 4 > cbind(rep(1:d[1], each=d[2]), rep(1:d[2], d[1])) [,1] [,2] [1,]11 [2,]12 [3,]13 [4,]14 [5,]21 [6,]22 [7,]23 [8,]24 Thanks, wr * Ana [2012

[R] quadratic programming-maximization instead of minization

2012-01-02 Thread riccardo24
Hi, I need to maximize a quadratic function under constraints in R. For minimization I used solve.QP but for maximization it is not useful since the matrix D of the quadratic function should be positive definite hence I cannot simply change the sign. any suggestion ? thanks -- View this message i

Re: [R] Conditionally adding a constant

2012-01-02 Thread Rui Barradas
Hello, I believe this works. f1 <- function(x){ for(i in 2:length(x)) x[i] <- ifelse(x[i-1] > 3, x[i-1] + 2, x[i]) x } f2 <- function(x){ for(i in 2:length(x)) x[i] <- ifelse(is.na(x[i]) & (x[i-1] > 3), x[i-1] + 2, x[i]) x } df <- data.frame(x = c(1,2,3,4,5), y

[R] Display warning when embedded data file is loaded

2012-01-02 Thread Hintzen, Niels
Dear all, I would like to show a warning when a data file, that is embedded in the package, is loaded. I have so far not been able to find any manual or mailing list going on about that. In code example: library("myPackage") data("myData") # Now I want a warning containing info about this lo

Re: [R] matrix position to list of coordinates

2012-01-02 Thread Willi Richert
Hi Ana, > d=dim(A) > d [1] 2 4 > cbind(rep(1:d[1], each=d[2]), rep(1:d[2], d[1])) [,1] [,2] [1,]11 [2,]12 [3,]13 [4,]14 [5,]21 [6,]22 [7,]23 [8,]24 Thanks, wr * Ana [2012-01-01 23:21:12 +0100]: > How can I extract a list of

[R] Create variable with AND IF statement

2012-01-02 Thread Richard Kolodziej
Hello, I'm using SPSS at work but really would like to switch to R. Right now I'm trying to learn R in reproducing calculations I did with SPSS but am stuck with something that is quite simple and comprehensible in SPSS-Syntax: IF (variable1.fac = 0 AND variable2.num = 0) variable3=1. IF (variabl

[R] Very strange function() behaviour.

2012-01-02 Thread iliketurtles
Sorry if there's an easy answer to this problem, but here goes.. * INTRODUCTION & CONTEXT* I'm creating a function where the number of entries in the lm(y~...) varies. i.e. depending on the function input I want lm(y~x1+x2+x3), sometimes I'll want lm(y~x1) only, et cetera. I've completed this

[R] Break Points

2012-01-02 Thread Ayanendu Sanyal
Respected Sir I fitted that model... lnrpe= a+bt and conducted sup F test since autocorelation is present in the data and AIC as you mentioned might not Is it OK... Since I am not well versed with time series econometrics can you please tell me if the work is now correct or not -- Please h

[R] sm.density.compare - a lot of curves

2012-01-02 Thread przemek
Dear all, Let say I have a sets of numbers: rno1 = rnorm(1000) rno2 = rnorm(1000) If I write request as follow: sm.density.compare (rno, rno3, xfit=min(rno), max(rno2)) why I receive a lot of curves in my plot, while I have only two data sets? regards Przemek -- View this message in context:

Re: [R] Percentage scale on y-axis

2012-01-02 Thread David Winsemius
On Jan 2, 2012, at 10:10 AM, David Winsemius wrote: On Jan 2, 2012, at 4:31 AM, Öhagen Patrik wrote: Seasonal Greetings! I am trying to plot a simple survival curve using; plot (survfit (Surv(d01,cens) ,conf.type="none" ),xlab="Time",ylab="Survival") That does not look like a valid surv

Re: [R] Percentage scale on y-axis

2012-01-02 Thread David Winsemius
On Jan 2, 2012, at 4:31 AM, Öhagen Patrik wrote: Seasonal Greetings! I am trying to plot a simple survival curve using; plot (survfit (Surv(d01,cens) ,conf.type="none" ),xlab="Time",ylab="Survival") That does not look like a valid survival formula to me but maybe I'm insufficiently exper

Re: [R] bmp() shifts the image (Windows XP)

2012-01-02 Thread Ben Tupper
Hi, On Jan 2, 2012, at 7:00 AM, William Simpson wrote: > Duncan, I checked out as.raster as you suggested. However, I can't > find info on how to display and save a raster object. What a raster > object is eludes me. These were fruitless > ?as.raster > ?grDevices > library(help="grDevices") > ?wi

Re: [R] bmp() shifts the image (Windows XP)

2012-01-02 Thread William Simpson
I have figured out what I wanted to do using pixmap. Pixmap writes .pgm files which I will batch convert to .bmp using Irfanview. Thanks for your help. Cheers, Bill On 1/2/12, William Simpson wrote: > Duncan, I checked out as.raster as you suggested. However, I can't > find info on how to displ

Re: [R] Base function for flipping matrices

2012-01-02 Thread Hadley Wickham
> But if not,  it seems to me that it should be added as an array method > to ?rev with an argument specifying which indices to rev() over. Yes, agreed. Sometimes arrays seem like something bolted onto R that is missing a lot of functionality. Hadley -- Assistant Professor / Dobelman Family Ju

Re: [R] summary per group

2012-01-02 Thread Sarah Goslee
Hi, On Mon, Jan 2, 2012 at 8:08 AM, Johannes Radinger wrote: > Hello, > > I know that it'll be quite easy to do what I want but somehow I am lost as I > am new to R. I want to get summary results arranged by groups. In detail > I'd like get the number (levels) of Species per Family like for this

Re: [R] summary per group

2012-01-02 Thread Petr PIKAL
Hi > > Hello, > > I know that it'll be quite easy to do what I want but somehow I am lost as > I am new to R. I want to get summary results arranged by groups. In detail > I'd like get the number (levels) of Species per Family like for this dataset: > > SPEC <- factor(c("a","a","b","b","c","

Re: [R] R report generator (for Word)?

2012-01-02 Thread Erich Neuwirth
A little bit more information about SWord: It is similar to SWeave in the sense that one writes text and R code in one document, and the toolchain then replaces the R code by the results produced by running the R code. In SWeave, this produces a new file which then can processed by TeX. In SWord,

[R] summary per group

2012-01-02 Thread Johannes Radinger
Hello, I know that it'll be quite easy to do what I want but somehow I am lost as I am new to R. I want to get summary results arranged by groups. In detail I'd like get the number (levels) of Species per Family like for this dataset: SPEC <- factor(c("a","a","b","b","c","c","c","d","e","e","e",

Re: [R] R report generator (for Word)?

2012-01-02 Thread ONKELINX, Thierry
Dear Michael, Our current work flow is to use Sweave and LaTeX. If Word output is needed we convert the LaTeX files to html using htlatex (installed with MikTex). Those html files can be opened with ms word. Best regards, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek /

[R] Rycas help

2012-01-02 Thread Troels Ring
Dear friends, can I use Ryacas to solve the two equations X = a/(a+b) Y = (a+b)^2*(a+b+1)/(a*b) subject to a>0 and b>0 ? I'm on windows using latest R Best wishes Troels Ring Nephrology Aalborg, Denmark Jeg bruger BullGuard til at holde min computer ren. Prøv BullGuard gratis: www.bullguard.com

[R] calibration curve for glmnet object

2012-01-02 Thread David A.
Hi, I created a logistic regression model using the glmnet package. This model is of class "glmnet" or "lognet". I wanted to plot a calibration curve for this model using the calibrate() function from rms package, but the objects used are different, rms requires a fit from lrm(). Is there anot

Re: [R] bmp() shifts the image (Windows XP)

2012-01-02 Thread William Simpson
Duncan, I checked out as.raster as you suggested. However, I can't find info on how to display and save a raster object. What a raster object is eludes me. These were fruitless ?as.raster ?grDevices library(help="grDevices") ?windows ?savePlot x<-as.raster(matrix(runif(n*n),nrow=n)) How to d

[R] .Rprofile and help startup

2012-01-02 Thread William Simpson
Today I wanted to get R help to start up in text mode under Windows XP. I had my own notes on how to do that. The method described there didn't work. I checked on R-help. No helpful messages on the subject. Therefore I post here in the hope that it helps someone else (or myself, when I forget and s

Re: [R] R report generator (for Word)?

2012-01-02 Thread David Scott
The html route is one I have used quite a lot, but rather than R2HTML I far prefer hwriter. I have spent some time on enhancing hwriter and you can find my hwriterPlus on R-forge. It has fairly extensive examples and a vignette in the inst directory. I am still working on some improvements to t

Re: [R] Cran package directory 404 error since 30th December

2012-01-02 Thread Graham Smith
Thanks Brian, The short answer is that this needs someone in Vienna to fix (people do > have vacations and take weekends off), and that the web/packages directory > is pure sugar: the packages are still there, the check results are there > ... just the summary pages are missing and they are access

Re: [R] R report generator (for Word)?

2012-01-02 Thread Paul
On 01/01/12 15:50, Michael wrote: Happy New Year all! I am looking for a good solution for keeping record of my experiments - could you please help me? My work is about analysing data... My current work-flow: 1. Everyday my bosses give me some small steps/tasks for analysing data - which are p

Re: [R] clear plot linear mixed model

2012-01-02 Thread ken knoblauch
Christof Kluß email.uni-kiel.de> writes: > I would like to plot the regression lines of a model like > > lme <- lme(conc ~ name/time - 1, > random=conc~time|nr,method="ML",data=measurements) > > Ideally a seperate plot for each regression line (respectively name) and > seperate colors for the

Re: [R] R on Android

2012-01-02 Thread Andreas Borg
Ken Hutchison schrieb: If stranded on a desert island and getting R fully functional on Droid would save you, I'd advise looking for food; else be prepared to name your phone Wilson. Ken Hutchison I propose to add that to fortunes :-D Andreas Borg -- Andreas Borg Abteilung M

[R] clear plot linear mixed model

2012-01-02 Thread Christof Kluß
Hi, first a happy new year ;) I would like to plot the regression lines of a model like lme <- lme(conc ~ name/time - 1, random=conc~time|nr,method="ML",data=measurements) Ideally a seperate plot for each regression line (respectively name) and seperate colors for the measurements (nr). H

[R] Percentage scale on y-axis

2012-01-02 Thread Öhagen Patrik
Seasonal Greetings! I am trying to plot a simple survival curve using; plot(survfit(Surv(d01,cens) ,conf.type="none" ),xlab="Time",ylab="Survival") I would be interested in a percentage scale on the y-axis. How do I achieve sucha scale? Thank you in advance!

Re: [R] Cran package directory 404 error since 30th December

2012-01-02 Thread Prof Brian Ripley
On 02/01/2012 08:17, Graham Smith wrote: I have been getting a object not found error trying to access the CRAN package directory since the 30th December. I have tried several mirrors with the same error. A search here only shows a single question on this from anyone else (on the 30th December) w

Re: [R] bmp() shifts the image (Windows XP)

2012-01-02 Thread William Simpson
Thanks Duncan for your help. Bill On 1/1/12, Duncan Murdoch wrote: > On 12-01-01 9:05 AM, William Simpson wrote: >> When using bmp() under Windows XP, I find that the saved image is a >> shifted version of the correct image. Try this: > > The image() function isn't designed to be able to do pixel

[R] Cran package directory 404 error since 30th December

2012-01-02 Thread Graham Smith
I have been getting a object not found error trying to access the CRAN package directory since the 30th December. I have tried several mirrors with the same error. A search here only shows a single question on this from anyone else (on the 30th December) which wasn't answered. I am surprised that