Re: [R] ggplot2 facet_wrap problem

2008-12-03 Thread ONKELINX, Thierry
can be extracted from a given body of data. ~ John Tukey -Oorspronkelijk bericht- Van: stephen sefick [mailto:[EMAIL PROTECTED] Verzonden: woensdag 3 december 2008 1:09 Aan: ONKELINX, Thierry CC: hadley wickham; R-help Onderwerp: Re: [R] ggplot2 facet_wrap problem If you look at the TSS

Re: [R] merging data.frames columnwise (rbind with different variables, lengths)

2008-12-11 Thread ONKELINX, Thierry
Dear Stefan, Why not use merge() if you want to merge two datasets? ;-) df1 <- data.frame(A = c(1,2), B = c("m","f"), C = c("at home", "away")) df2 <- data.frame(A = c(2), C = c("at home")) merge(df1, df2, all = TRUE) HTH, Thierry --

Re: [R] how to merge list of dataframes?

2008-12-15 Thread ONKELINX, Thierry
Try do.call("rbind", aa) HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel biometrie, methodologie en kwaliteitszorg / Section biometrics, methodolog

[R] Prediction intervals for zero inflated Poisson regression

2008-12-16 Thread ONKELINX, Thierry
Dear all, I'm using zeroinfl() from the pscl-package for zero inflated Poisson regression. I would like to calculate (aproximate) prediction intervals for the fitted values. The package itself does not provide them. Can this be calculated analyticaly? Or do I have to use bootstrap? What I tried u

Re: [R] Reimplement order somehow

2007-10-03 Thread ONKELINX, Thierry
You're sorting characters in the PHP script instead of numbers! sort(as.character(o)) in R will yield the same results as you PHP script does. Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Res

Re: [R] A rebel boxplot question

2007-10-04 Thread ONKELINX, Thierry
Merge both datasets into one with a grouping variable. Then have a look at the ggplot2 package. library(ggplot2) dataset <- data.frame(Month = factor(rep(1:12, 20)), Value = c(rnorm(120) + 1:12, rnorm(120) + 12:1), Group = gl(2, 120, labels = LETTERS[1:2])) ggplot(dataset, aes(x = Month, y

Re: [R] A rebel boxplot question

2007-10-04 Thread ONKELINX, Thierry
not say. ~William W. Watt A statistical analysis, properly conducted, is a delicate dissection of uncertainties, a surgery of suppositions. ~M.J.Moroney > -Oorspronkelijk bericht- > Van: ONKELINX, Thierry > Verzonden: donderdag 4 oktober 2007 17:55 > Aan: '[EMAIL PROTECT

Re: [R] How to remove legend?

2007-10-08 Thread ONKELINX, Thierry
Try somelike this library(ggplot2) dow <- data.frame(dayofweek = factor(1:7), p = runif(7), w = c(0, 1, 1, 1, 1, 1, 0)) sc <- scale_fill_continuous() sc$legend <- FALSE qplot(dayofweek, p, data=dow, geom="bar", xlab="Day", ylab="Arrival Rate", main="Spam by Weekday", fill=w) + sc HTH, Thierry -

Re: [R] How to remove legend?

2007-10-08 Thread ONKELINX, Thierry
lijk bericht- > Van: Christoph Krammer [mailto:[EMAIL PROTECTED] > Verzonden: maandag 8 oktober 2007 14:35 > Aan: ONKELINX, Thierry; r-help@r-project.org > Onderwerp: RE: [R] How to remove legend? > > Hello Thierry, > > thanks for your fast response. > >

Re: [R] semivariogram

2007-10-08 Thread ONKELINX, Thierry
Have a look at the gstat package and it's documentation. Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel biometrie, methodologie en kwaliteitszorg / Sec

Re: [R] A rebel boxplot question

2007-10-09 Thread ONKELINX, Thierry
Sorry, but I can't help you with your problem isntalling ggplot2. I'm a WinXP user and have no experience with R on Linux. Maybe Hadley Wickam could help you out on this one. Cheers, Thierry ir. Thierry Onkelinx Insti

Re: [R] One pdf file with plots and text output

2007-10-17 Thread ONKELINX, Thierry
I use Sweave for this kind of purposes. HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel biometrie, methodologie en kwaliteitszorg / Section biomet

Re: [R] One pdf file with plots and text output

2007-10-17 Thread ONKELINX, Thierry
at they do not say. ~William W. Watt A statistical analysis, properly conducted, is a delicate dissection of uncertainties, a surgery of suppositions. ~M.J.Moroney > -Oorspronkelijk bericht- > Van: Rainer M Krug [mailto:[EMAIL PROTECTED] > Verzonden: woensdag 17 oktober 2007 11

Re: [R] One pdf file with plots and text output

2007-10-17 Thread ONKELINX, Thierry
> Verzonden: woensdag 17 oktober 2007 14:17 > Aan: ONKELINX, Thierry > CC: r-help > Onderwerp: Re: [R] One pdf file with plots and text output > > I am getting somewhere - but running system("pdflatex > GrowthAll") fails, as it does not find sweave.sty. I already &g

Re: [R] shading of curves with polygon

2007-10-29 Thread ONKELINX, Thierry
If min and max are two vectors with values on the y-axis and x is a vector of the values on the x-axis, then you need. x <- 1:50 z <- matrix(rnorm(100), ncol = 2) mini <- apply(z, 1, min) maxi <- apply(z, 1, max) plot(x, maxi, ylim = range(c(mini, maxi)), type = "l") lines(x, mini) polygon(c(x, r

Re: [R] plot for binomial glm

2007-10-29 Thread ONKELINX, Thierry
Tom, Allow me to give a few comments. x <- c(x=(rep(33:55,1))) #Is a very uggly way to write x <- 33:55 #This (untested) code will probably generate a smooth plot too. Maybe it's not the plot that you intended to create. I'm just guessing as I can not reproduce your code (because I don't have

Re: [R] cumsum

2007-11-05 Thread ONKELINX, Thierry
apply(matrix, 2, cumsum) ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel biometrie, methodologie en kwaliteitszorg / Section biometrics, methodology and quality

Re: [R] ggplot2 facets as rows and columns

2007-11-08 Thread ONKELINX, Thierry
You could work around it like this. n <- length(levels(TDBU$system)) rows <- ceiling(sqrt(n)) TDBU$rows <- ceiling(as.numeric(TDBU$system) / rows) TDBU$cols <- (as.numeric(TDBU$system) - 1) %% rows ggplot(TDBU,aes(x=x))+geom_histogram(aes(y=..density..))+ geom_density() + facet_grid(rows ~ cols)

<    2   3   4   5   6   7