Re: [R] [R-sig-ME] Xy plot help

2012-04-29 Thread Hugo . Mildenberger
On Sun, 29 Apr 2012 11:27:06 -0700 (PDT) arun wrote: > I tried to get xyplot shrink fit for my mixed model._ But, the mixed model > line is not seen in the graph. > I would like to know if there is anything wrong with my code. Typo? Try panel.abline(fixef(fm1),... or panel.abline(ff), ... __

[R] zoo arithmetics

2011-10-23 Thread Hugo Mildenberger
Dear list members, what is the reason that one obviously can't do arithmetic operations on zoo members with different index positions? > require(zoo) > z <- zoo(c(1,1,1),order.by=c(1,2,3)) > z 1 2 3 1 1 1 > z[1] + z[1] 1 2 > z[1:2] + z[1:2] 1 2 2 2 > z[1] +

Re: [R] connecting R and PostgreSQL

2011-06-29 Thread Hugo Mildenberger
Marie, you did not say if you work on Windows or Unix. The manual from google belongs to the R package RpostgreSQL. This package makes use the native PostgreSQL driver. As I read the documentation, the package's DBI interface must be somehow binary compatible with the Postgres version installed. I

Re: [R] Help with lmer

2011-06-26 Thread Hugo Mildenberger
Sophie, sorry for any possibly duplicate email, my email client currently does not work correctly. I understand this snapshot as being a subset of your data only. But I do miss the factor "Sitename", which appears in your lmer model as a random factor. Also, by looking at the subset, "Presenceb

Re: [R] Need help on a R script part

2011-06-26 Thread Hugo Mildenberger
algorithms. Best regards Hugo Mildenberger On Saturday 25 June 2011 15:55:51 Duncan Murdoch wrote: > On 11-06-25 11:33 AM, Mike Miller wrote: > > I'm curious about what would cause this (see below), if it isn't a joke. > > Is it possible that it didn't look ridiculo

Re: [R] Need help on a R script part

2011-06-25 Thread Hugo Mildenberger
Lusk, if I were in your business, I would tackle such a problem with help from a little formatting ... e1=x1-mean(x1) e2=x2-mean(x2) n1=length(x1) n2=length(x2) N=(n1 + n2) nu2=sum( c( ( x1 -mean(x1) )^2 , ( x2-mean(x2) )^2 ) )/N ss=c(e1,e2) b3=N*sum(ss^4)/(sum( ss^2)^2)

Re: [R] On .. glibc detected home/sguha/lib64/R/bin/exec/R: realloc(): invalid next size: 0x000000000209e210 ***

2011-06-25 Thread Hugo Mildenberger
Saptarshi, if you look at the sheer number of shared libraries involved, heap corruption may have happened due to errors in any of these. Finding the reason for such problems is usually difficult, but almost impossible without a reproducible example. If you could boil it down to a minimal exam

Re: [R] Help with lmer

2011-06-24 Thread Hugo Mildenberger
Sophie, I'm myself quite new to linear mixed effect models, but "PresenceAbsence" sounds like a binary response variable. So wouldn't be m1<-lmer(Presencebsence~Habitatype*Width+(1|Sitename),familiy=binomial) the first thing to try? There is also a special mailing list for linear - mixe

Re: [R] How to capture console output in a numeric format

2011-06-24 Thread Hugo Mildenberger
One possibility involves applying a regular expression via gsub: as.numeric(gsub("^\\[1\\] ","",fvals)) On Friday 24 June 2011 14:39:31 Ravi Varadhan wrote: > Hi, > > I would like to know how to capture the console output from running an > algorithm for further analysis. I can capture thi

Re: [R] gcc-4.5.2 and install.packages("glmnet")?

2011-06-24 Thread Hugo Mildenberger
That problem is at least two-fold: 1. A failing heuristic in glmnet/configure.in 2. glmnet/src/glmnet/src/newGLMnet_f.f90 does not compile. Several problems: - gfortran does not recognise lines starting with [c|C] comments - starting at line 517, a line

Re: [R] Rmpi fails to install

2011-06-17 Thread Hugo Mildenberger
Juergen, > I try to install Rmpi as root with install.packages("Rmpi"). > It fails with: > ... I encountered a similar problem with openmpi-1.5.3 and Rmpi_0.5-9.tar.gz. The reason was an unchecked call to dlopen("libmpi.so.0"). At least openmpi-1.5.3 does not provide "libmpi.so.0" anymore. T

Re: [R] Rmpi installation

2011-06-16 Thread Hugo Mildenberger
w if this has to be considered a bug or a feature. Kind regards Hugo > Best wishes > > Kristian > > > > > > > > > Am 15.06.11 19:25 schrieb "Hugo Mildenberger" unter > : > > >Dear Kristian, > > > > please run exactly &

Re: [R] Rmpi installation

2011-06-15 Thread Hugo Mildenberger
> > Not sure if this makes any sense? > > > Best wishes > > Kristian > > > Dr. Kristian Unger > > > Arbeitsgruppenleiter Integrative Biologie / Head of Integrative Biology > Group > Abteilung für

Re: [R] Rmpi installation

2011-06-15 Thread Hugo Mildenberger
on. > > Best wishes > > Kristian > > > Dr. Kristian Unger > > > Arbeitsgruppenleiter Integrative Biologie / Head of Integrative Biology > Group > Abteilung für Strahlenzytogenetik / Research Unit of Radiation > Cytogenetics > > Te

Re: [R] Rmpi installation

2011-06-15 Thread Hugo Mildenberger
cking for main in -lmpi... no > libmpi not found. exiting... > ERROR: configuration failed for package ‘Rmpi’ > * removing ‘/usr/local/lib64/R/library/Rmpi’ > > > Best wishes > > Kristian > > > Dr. Kristian Unger > > > A

Re: [R] Rmpi installation

2011-06-15 Thread Hugo Mildenberger
Hmm, looks like there was a trailing blank after the backslash and before end of line, resulting in --with-Rmpi-libpath possibly not recognised: > \--with-Rmpi-libpath=/usr/lib64/mpi/gcc/openmpi/lib64 \ I also doubt there is real need to escape newlines within a string. But another possib

Re: [R] predictive logistic model cell-biology, non-dichotomous data

2011-06-14 Thread Hugo Mildenberger
Andreas, the jpg files you linked below do not exist, but if all you need for the moment is a predictive model and graphical displays of the fitted model and the calibrated sample data, then the R - package "calib" will do it very well. Usage is very simple. Best, Hugo On Tuesday 14 June 201

Re: [R] R-2.10.1 to R-2.13.0

2011-05-26 Thread Hugo Mildenberger
Ogbos, I don't use Ubunto too, but X-11 headers should be installable running apt-get xorg-dev and/or (possibly) apt-get libx11-dev xlibs-dev Best On Thursday 26 May 2011 16:13:36 Duncan Murdoch wrote: > On 26/05/2011 10:05 AM, ogbos okike wrote: > > Hi Dunc

Re: [R] Processing large datasets

2011-05-25 Thread Hugo Mildenberger
With PostgreSQL at least, R can also be used as implementation language for stored procedures. Hence data transfers between processes can be avoided alltogether. http://www.joeconway.com/plr/ Implemention of such a procedure in R appears to be straighforward: CREATE OR REPLACE FUNCTION

Re: [R] source and localhost

2011-05-21 Thread Hugo Mildenberger
Thomas, your example works with R-2.13.0 and Apache running on Gentoo. You may try to use "http://127.0.0.1:5984/path/fn.R";, just to exclude that this problem has anything to do with name resolution. Best Hugo > Dear List, > > I have problems with the function source() using a > url of the k

Re: [R] Loop stopping after 1 iteration

2011-05-18 Thread Hugo Mildenberger
William, num_obs obviously isn't a vector, therefore length(num_obs) will evaluate to one. Hence your for loop control part will expand to for (i in 1:1) while it should probably read: for (i in 1:num_obs) Best Hugo On Wednesday 18 May 2011 17:18:15 armstrwa wrote: > Hi all

Re: [R] Dotplot (package Hmisc) with groups: colours and symbols

2011-05-11 Thread Hugo Mildenberger
Hello Esther, you left out the ellipsis argument (...) to the panel function. That argument serves a placeholder for the rest of the parameters you did not want to name and pass explicitely. If you don't pass the ellipsis to panel.Dotplot, all unnamed parameters will get default values. You can

Re: [R] Insert variable in RMySQL-Statement

2011-02-09 Thread Hugo Mildenberger
This should be much faster: idx <- c(1,2,3) res <- dbGetQuery(con,paste("select * from db where id in (",paste(idx,collapse=","),")",sep="")); print(res); On Wednesday 09 February 2011 14:13:17 Hugo Mildenberger wrote: > Arne, > &g

Re: [R] Insert variable in RMySQL-Statement

2011-02-09 Thread Hugo Mildenberger
Arne, there might be faster or more elegant solutions, but this is a possibility: for ( a in values ) { Temp <- dbGetQuery(con, paste("select * from db where id = ",a,sep=""))); print(Temp); } There must be also a way to make use of the "in" - operator: "select * from db wher

Re: [R] Finding non-normal distributions per row of data frame?

2011-02-04 Thread Hugo Mildenberger
Danny, sounds like you already have a certain idea how a 'nugget' distribution could look like. Maybe you also could intentionally produce some experimental data having such distributions, harvest the related patterns from the microarray and then apply a method as it was described in http://ww

Re: [R] Fitting ELISA measurements "unknowns" to 4 parameter logistic model

2011-02-01 Thread Hugo Mildenberger
Hello Chris, You may also use the R-package "calib". Hugo On Tuesday 01 February 2011 17:08:13 Christopher Anderson wrote: > Hello, > > I am trying to fit my Elisa results (absorbance readings) to a standard > curve. To create the standard curve model, I performed a 4-parameter > logistic fi

Re: [R] using gsarima package with R

2011-01-23 Thread Hugo Mildenberger
On Sunday 23 January 2011 20:52:21 nandan amar wrote: > I am trying to use function garsim from package gsarima. > I can download gsarima package from > http://cran.fyxm.net/web/packages/gsarima/index.html for linux. > But how I can add it to R. > For example by entering R CMD INSTALL /pat

Re: [R] Debian ?Ubuntu version of latest R using synaptic in Ubuntu 10.10

2011-01-22 Thread Hugo Mildenberger
Ajay, you may try to run R as root while updating packages. Some packages insist to install in directories writeable only by root. On Saturday 22 January 2011 07:50:10 Ajay Ohri wrote: > Dear List > > I use synaptic to download R on my Ubuntu 10.10. It seems latest version of > R on Ubuntu i

Re: [R] User input in R program

2011-01-21 Thread Hugo Mildenberger
Hello Christian, for an example of interacting with graphic output, just run example(getGraphicsEvent) However, on X11, that feature had ceased to work since a pre-release of R-2.12 if Cairo support was enabled at compile time. The reason for this defect had already been documented in R's

Re: [R] "cannot allocate vector of size ..." in RHLE5 PAE kernel

2011-01-19 Thread Hugo Mildenberger
Dear Mauricio, what I do not understand at all is the message: > Error: cannot allocate vector of size 476.2 Mb Have you tried to allocate a big matrix in between, whith the R - statement not being shown in the output? Probably not. If not, your local R version is buggy for sure. The test shows

Re: [R] "cannot allocate vector of size ..." in RHLE5 PAE kernel

2011-01-19 Thread Hugo Mildenberger
> I got the following warning: > memorytest.c: In function ‘main’: > memorytest.c:5: warning: return type of ‘main’ is not ‘int’ > Is this important ? Hello Mauricio, No, your gcc version is unduly puristic here. The traditional return type of the main function in "C" should be "int", and i

Re: [R] Time and xts

2011-01-18 Thread Hugo Mildenberger
Nicos, there are certainly better / faster methods to compare a time range which I simply don't know of, but the condensed code below should do it. Your main problem was that you can't compare time(x) to 7:55, since the latter expression denotes a sequence from 7 to 55 in R. Consequently, such

Re: [R] How to still processing despite bug errors?

2011-01-17 Thread Hugo Mildenberger
Altay, simply run your tests under control of an exception handler: help(try) help(tryCatch) On Monday 17 January 2011 22:05:07 Altay wrote: > Hi, everybody. > > I am working processing EEG data from 1000 pacients. I have a specific > syntax to perform the Spectral Analysis and a loop to

Re: [R] "cannot allocate vector of size ..." in RHLE5 PAE kernel

2011-01-17 Thread Hugo Mildenberger
Mauricio, I tried your matrix allocation on Gentoo-hardened 32 and 64 bit systems. Both work ok, using R-2.11.1 and R-2.12.2 respectively, and both use a recent 2.6.36 kernel revision. This is from the 32 bit system with 512 MB physical memory: >system("free") total

Re: [R] a remove question

2011-01-16 Thread Hugo Mildenberger
How about ls(pattern="NY") #rm(list=ls(pattern="NY")) On Sunday 16 January 2011 22:08:16 Erin Hodgess wrote: > Dear R People: > > I have the following: > > > ls(pattern="NY*") > [1] "CRAN_df" "CRAN_df0" "CRAN_df1" "CRAN_mat" "CRAN_sp" > [6] "CRAN_spdf1" "CRAN_spdf2

Re: [R] rootogram for normal distributions

2011-01-16 Thread Hugo Mildenberger
Thank you very much for your qualified answers, and also for the link to the Tukey paper. I appreciate Tukey's writings very much. Looking at the lattice code (below), a possible implementation might involve binning, not so? I see a problematic part here: xx <- sort(unique(x)) Unique cer

Re: [R] xyplot: modify axis tick marks

2011-01-16 Thread Hugo Mildenberger
Using lattice and the rainfall$Time series as proposed below by Dennis gives also a nice result: rainfall$Time <- seq(from = as.Date('1993-01-01'), to = as.Date('2007-12-01'), by = 'month') xyplot(rainfall~Time,data=rainfall,type=c("g","p","l","smooth")) On

[R] rootogram for normal distributions

2011-01-16 Thread Hugo Mildenberger
Using R-2.12.1 and latticeExtra-0.6-14, I would like to understand why a rootogram displaying samples from the Poisson distribution looks like I expected it, whereas a rootogram using the normal distribution does not: library(latticeExtra) rootogram(~rpois(1000, lambda = 50), dfun = function(x)