Re: [R] [HELP] Setting plot colors such that category/color mapping persists across plots

2014-06-27 Thread Ista Zahn
In ggplot2 you can create a named vector of colors and use scale_fill_manual, like this: TestData <- data.frame(rep(c("A","B","C","D","E","F"), each=10), rep(1:10, 6), rnorm(6, 60, 10)*rep(1:10, 6)) names(TestData) <- c("category", "timeline", "rollup") library(ggplot2) catlevels <- levels(Test

Re: [R] Generate data follows space-time clustered inhomogeneous Poisson point process in 3D space

2014-06-27 Thread Jeff Newmiller
Please read the Posting Guide mentioned at the bottom of this out any other email on this list. You have repeatedly abused this list this week. - posting in HTML - cross-posting to multiple lists - duplicate posts - off-topic subjects You have not been getting much response due to this behavior,

[R] Generate data follows space-time clustered inhomogeneous Poisson point process in 3D space

2014-06-27 Thread Ferra Xu
I'd like to know how can I generate a data set for space-time clustered  inhomogeneous Poisson processin a 3D space without having any previous data in R? Actually I need to generate points in a rectangle cube, and these points are not uniformly distributed in space (they show clusters). Thanks,

Re: [R] [HELP] Setting plot colors such that category/color mapping persists across plots

2014-06-27 Thread Jim Lemon
On Thu, 26 Jun 2014 07:34:15 PM Kellyn Wolff wrote: > Hi all, > > I'm creating a set of stacked bar charts, where each bar is colored by > a category. The problem I'm having is that a given category is being > represented by different colors across plots (category A might be red > in one plot a

[R] ggplot2 - change title and size of legends - time series.

2014-06-27 Thread Eduardo M. A. M. Mendes
Hi I am trying to understand how to use ggplot2 to plot multiple time-series in one single graphics. In order to do so, I have modified the example given at http://docs.ggplot2.org/current/guide_legend.html to use my own data. Here is the script so far # Script for plotting all variables rm

[R] ggplot2 - change title and size of legends - time series.

2014-06-27 Thread Eduardo M. A. M. Mendes
Hi I am trying to understand how to use ggplot2 to plot multiple time-series in one single graphics. In order to do so, I have modified the example given at http://docs.ggplot2.org/current/guide_legend.html to use my own data. Here is the script so far # Script for plotting all variables rm

[R] standard error of survfit.coxph()

2014-06-27 Thread array chip
Hi, can anyone help me to understand the standard errors printed in the output of survfit.coxph()? time<-sample(1:15,100,replace=T) status<-as.numeric(runif(100,0,1)<0.2) x<-rnorm(100,10,2) fit<-coxph(Surv(time,status)~x)     ### method 1 survfit(fit, newdata=data.frame(time=time,status=status

Re: [R] graph

2014-06-27 Thread Greg Snow
Or densityplot(~mu, dat, group=gp, auto.key=TRUE) which will be more like the matplot result. On Thu, Jun 26, 2014 at 6:46 PM, Duncan Mackay wrote: > As Greg has listed lattice > > Here are ways in lattice > > quick 1 panel > library(lattice) > densityplot(~ mu1+mu2+mu3+mu4) > > dat = data.fram

Re: [R] Simple permutation question

2014-06-27 Thread David Reiner
Just for reference, I like package iterpc, because it allows one to get one permutation or combination at a time. You can get all if you like, but for large N, it is sometimes better to iterate through the results to avoid creating a large object. Also, getall function returns a matrix so you don

Re: [R] Data Frame Members

2014-06-27 Thread Sarah Goslee
I'm not sure what you mean by members. Some options: colnames(yourdf) str(yourdf) summary(yourdf) You would probably benefit from reading the Intro to R that came with your R installation. Sarah On Fri, Jun 27, 2014 at 8:53 AM, Robert Sherry wrote: > Suppose that a data frame has been created

Re: [R] regular expression help

2014-06-27 Thread arun
Hi, You may try: test[!grepl("(?<=AARSD1)[-\\d]", test, perl=T)] A.K. On Friday, June 27, 2014 6:43 AM, C Lin wrote: Hi Duncan, Thanks for trying to help. Sorry for not being clear. The string I'd like to get is 'AARSD1' It can be followed or preceded by white space or // or nothing so, fro

[R] Data Frame Members

2014-06-27 Thread Robert Sherry
Suppose that a data frame has been created by the user. Perhaps it has been created using the library quantmod. Is there any command to find out what the members of the data frame is? Thanks Bob __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] regular expression help

2014-06-27 Thread C Lin
Thank you all for your help. Bill, thanks for making it compact and I did mean any amount of whitespace. To break it down, so I know why this pattern work: The first parenthesis means that before AARSD1 it can be ^: begins with nothing |: or //: double slash or [[:space:]]+: one or more whitespac

Re: [R] AICc in MuMIn package

2014-06-27 Thread Kamil Bartoń
On 2014-06-27 11:00, r-help-requ...@r-project.org wrote: Date: Thu, 26 Jun 2014 15:12:08 +0200 > From: Carlos Bautista Le?n > To: r-help@r-project.org > Subject: [R] AICc in MuMIn package Hello, I am modelling in glmmADMB count data (I??m using a negative binomial distribution to avoid possit

[R] Réponse automatique

2014-06-27 Thread j . boutet
Bonjour, Je suis absent jusqu'au 4 août prochain. En cas d'urgence, merci de contacter Francis Meunier, directeur-adjoint : f.meunier - at - conservatoirepicardie.org J. Boutet > From: r-help-requ...@r-project.org > Subject: R-help Digest, Vol 136, Issue 27 > Date: Fri, 27 Jun 2014 12:0

Re: [R] Stringr / Regular Expressions advice

2014-06-27 Thread Sarah Goslee
Hi, It's a good idea to copy back to the list, not just to mo, to keep the discussion all in one place. On Thursday, June 26, 2014, VINCENT DEAN BOYCE wrote: > Sarah, > > Great feedback and direction. Here is the data I am working with*: > > > dput(head(data_log, 20)) > > structure(list(x_readi

Re: [R] regular expression help

2014-06-27 Thread William Dunlap
You can use parentheses to factor out the common string in David's pattern, as in grep(value=TRUE, "(^|//|[[:space:]]+)AARSD1($|//|[[:space:]]+)", test) (By 'whitespace' I could not tell if you meant any amount of whitespace or a single whitespace character. I use '+' to match one or more whit

[R] Localization of R script output

2014-06-27 Thread Sigbert Klinke
Hi, I have written some R scripts for a server which display the result on a webpage. I would like to localize the output to the webpage depending on the users choice. Therefore I prepared some po files. Exist some possibility to utilize the gettext command of R? As far as I see I can not set the