[R] Problem in Saving Workspace

2007-10-17 Thread amna khan
Hi Sir When I close R console and save work space then the following message appears Error in gzfile(file, "wb") : unable to open connection In addition: Warning message: cannot open compressed file '.RDataTmp' in: gzfile(file, "wb") How to deal with this? Regards -- AMINA SHAHZADI Department o

[R] How to speed up multiple for loop over list of data frames

2007-10-17 Thread Dieter Best
Hi there, I have a multiple for loop over a list of data frames for ( i in 1:(N-1) ) { for ( j in (i+1):N ) { for ( p in 1:M ) { v_i[p]= alist[[p]][i,"v"] v_j[p]= alist[[p]][j,"v"] } rho_s = cor(v_i, v_j, method =

[R] How to save association rules generated by arules package

2007-10-17 Thread Ashish Jha
Hi, I have been able to generate association rules for Market Basket Analysis using the following codes: *** library("arules") rules <- read.csv("write1.csv",na.strings=c("

Re: [R] Problem with saving pdf file graphics in R-2.6.0

2007-10-17 Thread Peter Dalgaard
John Wilkinson wrote: > Error: Invalid font type > In addition: Warning messages: > 1: font family not found in PostScript font database > 2: font family not found in PostScript font database > > > Yes. Cause, workarounds, and a note that it is fixed in R-patched is here: http://tolstoy.n

Re: [R] problem with RCurl 0.8-1 installation on Debian Etch

2007-10-17 Thread Christian Kohler
Hi Dirk, thanks a lot for your quick replay. Now, the installation is done ! Cheers, Christian Dirk Eddelbuettel wrote: > Hi Christian, > > On 16 October 2007 at 15:39, Christian Kohler wrote: > | Dear R-Users, > | > | I am having some trouble getting an installation of RCurl 0.8-1 to work >

Re: [R] data structure for plsr

2007-10-17 Thread Andris Jankevics
Hi, Jim. Actually you need to have ad "data.frame" object of define X and Y variables in it. DATA$X must contain all data for X varibales (DATA$NIR in example) DATA$Y response variable(s) for your X matrix data: (DATA$density in example) For example you have X variables in matrix and one Y varia

Re: [R] significance for a random effect in Mixed Model ANOVA

2007-10-17 Thread Nathaniel Street
Hi Thanks for you reply. I wonder if you can help me further. During my degree, I was taught that a factor should be specified as random if it represents a sample of the total population. So in my case, I need to test the factor genotype to see if genotypes are significantly different from eac

[R] Multiply a 3D-array by a vector (weighted combination of matrices)

2007-10-17 Thread Yvonnick NOEL
Hello, I would like to compute a weighted combination of matrices. I have a number of matrices, arranged in a 3D-array, say: z = array(rep(1:3,c(9,9,9)),c(3,3,3)) so that z[,,1] is my first matrix, and z[,,2] and z[,,3] the second and third one, and a vector of coefficients: w = rep(1/3,3) I

[R] how to repeat the results of a generated probabilities

2007-10-17 Thread sigalit mangut-leiba
hello, I want to simulate 200 times the mean of a joint probability (y1) and 200 times the mean of another joint distribution (y2), that is I'm expecting to get 200 means of y1 and 200 means of y2. y1 and y2 are probabilities that I calculate from the marginal prob. (z1 and z2 respectively) multip

[R] y_hat

2007-10-17 Thread Samuel Okoye
Hello, suppose one has the following values x1 <- rnorm(10,5,1) x2 <- rgamma(10,5,1) y <- rnorm(10,4,1) mydat <- data.frame(y,x1,x2) then one can use glm like mod <- glm(y~x1+x2, data=mydat, family=gaussian) But how could I estimate y_hat? Thanks alot! Sam --

[R] ignorable warnings of as.numeric: NAs introduced by coercion

2007-10-17 Thread Wolfram Fischer
Warnings are a good thing and can help to find errors in data. But with newer R versions I get more and more warnings which I would like to suppress in defined circumstances. In the manual of as.numeric() is noticed: as.numeric(c("-.1"," 2.7 ","B")) # (-0.1, 2.7, NA) + warning If I know

Re: [R] Import from excel 2007

2007-10-17 Thread Hans-Peter
> > The best way to read or write Excel files is with the RExcel package. The Well, I'd argue, that often 'the best way' is to use the xlsReadWrite package, but I am biased... There are some precondition: - you have to be on windows (but my new soon-to-arrive notebook will be a Mac, therefore..

Re: [R] Multiply a 3D-array by a vector (weighted combination of matrices)

2007-10-17 Thread Robin Hankin
Hi you need the tensor library: > library(tensor) > z <- array(runif(27),rep(3,3)) > w <- runif(3) > w[1]* z[,,1] + w[2]*z[,,2] + w[3]*z[,,3] [,1] [,2] [,3] [1,] 1.2700333 1.1920113 0.8015904 [2,] 0.5175217 0.7808569 0.6306053 [3,] 0.8386015 0.6143882 0.6382314 > tens

[R] One pdf file with plots and text output

2007-10-17 Thread Rainer M Krug
Hi I create one pdf file with plots via pdf() and one text file with text via sink() that works very nice. But I would prefer to have one pdf file with plots and the text which I store in the te=xt file via sink(). I.e. x.lm<-lm(...) pdf() plot(x.lm) NOW THE TEXT OF summary(xlm) IN THE PDF FILE

[R] help me

2007-10-17 Thread azadeh sadeghian
dear list I am student M.S. statistics in department statistics . I am working in the function "nls" in the [R 2.3.1] with 246 data and want to fit the "exp" model to vectors( v and u ) but I have a problem to use it u 5.00e-13 2.179057e+03 6.537171e+03 1.089529e+04 1.525340e+04 1.9

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

2007-10-17 Thread Prof Brian Ripley
On Wed, 17 Oct 2007, Rainer M Krug wrote: > Hi > > I create one pdf file with plots via pdf() and one text file with text > via sink() that works very nice. But I would prefer to have one pdf file > with plots and the text which I store in the te=xt file via sink(). I.e. > > x.lm<-lm(...) > pdf()

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

2007-10-17 Thread Rainer M Krug
Prof Brian Ripley wrote: > On Wed, 17 Oct 2007, Rainer M Krug wrote: > >> Hi >> >> I create one pdf file with plots via pdf() and one text file with text >> via sink() that works very nice. But I would prefer to have one pdf file >> with plots and the text which I store in the te=xt file via sink(

Re: [R] Observations on SVD linpack errors, and a workaround

2007-10-17 Thread Simon Wood
I get the same problem with this matrix with R 2.6.0 on a 64 bit (Intel Xeon) machine running Suse 9, but the svd is fine on a 32 bit windows machine ( R 2.6.0 again). `badx' has another weird property (64 bit linux version)... > x <- matrix(runif(prod(dim(badx))),nrow(badx),ncol(badx)) > syst

Re: [R] Adding axis lines to splom plots

2007-10-17 Thread Sarah Barry
Thank you, Deepayan, that works perfectly! Regards, Sarah Deepayan Sarkar wrote: > On 10/16/07, Sarah Barry <[EMAIL PROTECTED]> wrote: > >>Hi, >> >>I am trying to produce a 30x30 lattice grid. The 30 variables naturally >>fall into three groups of ten and I would like to add thicker axis lines

Re: [R] ignorable warnings of as.numeric: NAs introduced by coercion

2007-10-17 Thread Prof Brian Ripley
On Wed, 17 Oct 2007, Wolfram Fischer wrote: > Warnings are a good thing and can help to find errors in data. > But with newer R versions I get more and more warnings > which I would like to suppress in defined circumstances. This warning happened in R 1.8.1, for example: it is not new. I don't

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 Olivier Delaigue *
Maybe with: > print(plot.new()) > mtext(summary(xlm)) Regards, Olivier Delaigue Rainer M Krug-2 wrote: > > Hi > > I create one pdf file with plots via pdf() and one text file with text > via sink() that works very nice. But I would prefer to have one pdf file > with plots and the text whi

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

2007-10-17 Thread Rainer M Krug
ONKELINX, Thierry wrote: > I use Sweave for this kind of purposes. I was thinking about Sweave as well, but I don't understand how I can use it. Let's say I have a source file, which defines a function DoGrowthAll <- function() { pdf("GrowthAll.pdf", height=11, width=8, paper="a4")

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

2007-10-17 Thread Rainer M. Krug
Olivier Delaigue * wrote: > Maybe with: > >> print(plot.new()) >> mtext(summary(xlm)) Thanks Olivier - that sounds like an easy approach - I'll try itr out and report back. Rainer > > Regards, > > Olivier Delaigue > > > Rainer M Krug-2 wrote: >> Hi >> >> I create one pdf file with plots

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

2007-10-17 Thread Rainer M Krug
Rainer M. Krug wrote: > Olivier Delaigue * wrote: >> Maybe with: >> >>> print(plot.new()) >>> mtext(summary(xlm)) > > Thanks Olivier - that sounds like an easy approach - I'll try itr out > and report back. It prints the summary, but in one line which is obviously to long to fit on one page >

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

2007-10-17 Thread Olivier Delaigue
You should try with type of command: mtext(paste("Residuals:", summary(xlm)$residuals, "Coefficients:", summary(xlm)$coefficients, etc..., sep ="\n")) Olivier Delaigue Rainer M Krug-2 wrote: > > > It prints the summary, but in one line which is obviously to long to fit > on one page > >>> >

Re: [R] library(car): Anova and repeated measures wit hout between subjects factors

2007-10-17 Thread Ralf Goertz
John Fox, Dienstag, 16. Oktober 2007: > Dear Ralf, > > Unfortunately, Anova.mlm(), and indeed Anova() more generally, won't > handle a model with only a constant. As you point out, this isn't > reasonable for repeated-measures ANOVA, where it should be possible to > have only within-subjects facto

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

2007-10-17 Thread Rainer M Krug
Thanks a lot - I'll try it out. Rainer ONKELINX, Thierry wrote: > You create a source file ("GrowthAll.Rnw") that looks a bit like this > > \documentclass[11pt]{report} > \usepackage{Sweave} > \SweaveOpts{echo = FALSE} > \begin{document} > > <>= > x.lm <- lm() > plot(x.lm) > @ > > <<>>= > summ

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

2007-10-17 Thread Rainer M. Krug
Olivier Delaigue wrote: > You should try with type of command: > > mtext(paste("Residuals:", summary(xlm)$residuals, "Coefficients:", > summary(xlm)$coefficients, etc..., sep ="\n")) I am sure this would work, but I would like to have something without to much additional coding. Sweave seems to

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

2007-10-17 Thread ONKELINX, Thierry
You create a source file ("GrowthAll.Rnw") that looks a bit like this \documentclass[11pt]{report} \usepackage{Sweave} \SweaveOpts{echo = FALSE} \begin{document} <>= x.lm <- lm() plot(x.lm) @ <<>>= summary(x.lm) @ \end{document} Then run in R: Sweave("GrowthAll.Rnw") system("pdflatex GrowthAl

[R] How to compile sources?

2007-10-17 Thread Sara Mouro
Dear all, I have read the on-line explanations I have found about Building R from sources, and istalling Packages from sources... Also, I have installed gcc4.0 and the gfrotran-4.2.1.dmg. However, I still do not know how to use them to compile one Source (in particular packfor_0.0-7.tar.gz)

[R] Documentation for Pearson Residuals

2007-10-17 Thread Tom La Bone
Greetings, I have been using lm to perform weighted linear regressions and resid to extract the residuals. I happened upon some class notes on the internet that described how one can specify type="pearson" in resid to extract the weighted residuals. Where is this option documented? And if you k

Re: [R] glmmML vs. lmer - fitting overdispersed Poisson outcome.

2007-10-17 Thread Martin Henry H. Stevens
Hi Sam, I don't understand how you can estimate a separate id variance other than the residual variance, with one observation per subject. I would think the proper model would be glm(y ~ 1, family='poisson) Cheers, Hank On Oct 15, 2007, at 12:05 PM, Sam Field wrote: > Group, > > I have count

[R] automaticly adjust coordinates for text() labels

2007-10-17 Thread Sergey Goriatchev
Hello, I have following problem. I produce a histogram of some values and in the plot area I create 2 text boxes - one with names of statistics and one with values of these statistics. Coded like that: ht <-hist(x, ) ... ameant <-ameant <- paste("Ar.Mean") ... amean <- round(mean(x), digits=

Re: [R] polygon overlapping

2007-10-17 Thread Duncan Murdoch
On 17/10/2007 2:23 AM, Haiyong Xu wrote: > Hi there, > Is there any package which can calculate the overlapping area of two > polygons or output the coordinates of the overlapping of two polygons? I believe gpclib can do both of those. Duncan Murdoch ___

Re: [R] How to compile sources?

2007-10-17 Thread Duncan Murdoch
On 17/10/2007 6:31 AM, Sara Mouro wrote: > Dear all, > > > I have read the on-line explanations I have found about Building R > from sources, and istalling Packages from sources... > Also, I have installed gcc4.0 and the gfrotran-4.2.1.dmg. > > However, I still do not know how to use them to c

[R] Problems with paste and blank

2007-10-17 Thread thomas.schwander
Hi there, I've got the following problem under Windows XP, R 2.5.1: When I'm pasting some objects: Stadtwerksname<-"Mannheim" Laufwerk<-"C:\\" paste(Laufwerk,Stadtwerksname,".csv") I get the result: [1] "C:\\ Mannheim .csv" The problem's are the superfluous gaps/blanks between the three parts

Re: [R] Problems with paste and blank

2007-10-17 Thread Henrique Dallazuanna
See the argument 'sep' in the paste function. paste(Laufwerk,Stadtwerksname,".csv", sep="") On 17/10/2007, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi there, > > I've got the following problem under Windows XP, R 2.5.1: > > When I'm pasting some objects: > > Stadtwerksname<-"Mannheim"

Re: [R] Documentation for Pearson Residuals

2007-10-17 Thread David Barron
?residuals.lm What I would do is look at the documentation for the specific *method*. If you just look at the documentation for the generic function, you won't find what you are looking for. David On 10/17/07, Tom La Bone <[EMAIL PROTECTED]> wrote: > Greetings, > > > > I have been using lm to p

Re: [R] Problems with paste and blank

2007-10-17 Thread Katharine Mullen
use sep="", e.g., paste(Laufwerk,Stadtwerksname,".csv",sep="") On Wed, 17 Oct 2007 [EMAIL PROTECTED] wrote: > Hi there, > > I've got the following problem under Windows XP, R 2.5.1: > > When I'm pasting some objects: > > Stadtwerksname<-"Mannheim" > Laufwerk<-"C:\\" > paste(Laufwerk,Stadtwerksn

[R] Another problem with drawing curly brackets

2007-10-17 Thread thomas.schwander
Hi there, Another problem for me ist to automatize the drawing of curly brackets like you can draw with Word or PPT or other programs. I want to draw with R 2.5.1 under Windows XP a curly bracket that begins in point (x1,y1) and reaches (x2,y2) horizontaly. Thx, Thomas ___

Re: [R] Problems with paste and blank

2007-10-17 Thread Dimitris Rizopoulos
look at the `sep' argument of ?paste(), e.g., Stadtwerksname <- "Mannheim" Laufwerk <- "C:\\" paste(Laufwerk, Stadtwerksname, ".csv", sep = "") I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Ad

Re: [R] significance for a random effect in Mixed Model ANOVA

2007-10-17 Thread Ben Bolker
Nathaniel Street wrote: > > > [questions about testing significance of random effects] > > Pinheiro and Bates 2000 is the standard reference for this kind of question. The basic answer is that the Likelihood Ratio Test (implemented by anova()) is a reasonable approach (and recommended by PB

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

2007-10-17 Thread Rainer M Krug
I am getting somewhere - but running system("pdflatex GrowthAll") fails, as it does not find sweave.sty. I already linked the directory where it can be found (/usr/lib/R/share/texmf/) into my personal texfm directory (/texmf/tex/latex/R)\ and ran texhash (as root and as n ormal user), but it st

Re: [R] y_hat

2007-10-17 Thread Henrique Dallazuanna
If I understand your question, see the 'predict.glm' funtion. On 17/10/2007, Samuel Okoye <[EMAIL PROTECTED]> wrote: > > Hello, > suppose one has the following values > x1 <- rnorm(10,5,1) > x2 <- rgamma(10,5,1) > y <- rnorm(10,4,1) > mydat <- data.frame(y,x1,x2) > then one can use glm like > mod

[R] Need help with function that includes 2 summation

2007-10-17 Thread Zack Darnell
I am relatively new to R, so this may be a much simpler question than it seems to me. I am trying to create a function that includes two summations, and can't figure out how. I am attaching the equation as a pdf file. This function will then be optimized over a chosen range of values, but right

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

2007-10-17 Thread ONKELINX, Thierry
It works fine with me (on windows). But I've copied sweave.sty into my workdirectory. See the Sweave FAQ (http://www.ci.tuwien.ac.at/~leisch/Sweave/FAQ.html#x1-14000A.12) ir. Thierry Onkelinx Instituut voor natuur- en

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

2007-10-17 Thread Romain Francois
You can also specify the full path of the latex package, for me: \usepackage{/usr/local/lib/R/share/texmf/Sweave} Regards, Romain ONKELINX, Thierry wrote: > It works fine with me (on windows). But I've copied sweave.sty into my > workdirectory. See the Sweave FAQ > (http://www.ci.tuwien.ac.at/~

Re: [R] Need help with function that includes 2 summation

2007-10-17 Thread Romain Francois
Zack Darnell wrote: > I am relatively new to R, so this may be a much simpler question than > it seems to me. I am trying to create a function that includes two > summations, and can't figure out how. I am attaching the equation as a > pdf file. This function will then be optimized over a chosen

[R] JGR makes help more helpful

2007-10-17 Thread Muenchen, Robert A (Bob)
Hi All, A few weeks ago I suggested that it would be nice to be able to submit lines from the help files for execution. You can cut and paste them into the console, or enter example(function) to run them all. However, I often find myself wanting to run just a line or two, or even parts of a line t

Re: [R] library(car): Anova and repeated measures without between subjects factors

2007-10-17 Thread John Fox
Dear Ralf, Thanks for the additional suggestions -- I'll take a look at them as well. John John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604 http://socserv.mcmaster.ca/jfox ---

Re: [R] Need help with function that includes 2 summation

2007-10-17 Thread Henrique Dallazuanna
Perhaps: r <- function(n, k, theta){ return(sqrt((sum(cos(k*theta))^2 + sum(sin(k*theta))^2)/n)) } On 17/10/2007, Zack Darnell <[EMAIL PROTECTED]> wrote: > > I am relatively new to R, so this may be a much simpler question than it > seems to me. I am trying to create a function that includes

Re: [R] Canberra distance

2007-10-17 Thread Stéphane Dray
Frédéric Chiroleu wrote: > PS : Be careful with function dudi.pca() from ade4 ; in values, "norm" > doesn't give you what is written in the help page : "norm" returns the > vector of standard deviations of initial variables when you choose > "normed" PCA and the vector of standard deviations of

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

2007-10-17 Thread tom sgouros
Latex has its own search path for packages like sweave.sty. Run the texconfig program and look at the configuration. The TEXMF variable is the one you're interested in. Search your system for a file called texmf.cnf, and edit that to change the TEXMF. It sounds like the sweave installation doe

[R] question about mclust and prior probabilities

2007-10-17 Thread Jocelyn Holden
I'm sorry, this is probably a very simple question. I am relatively new to R and am having difficulty understanding how to use the mclust options to change the prior probabilities for a mixture model. I am dealing with a situation where I have 2 groups of data and it is known that the sample

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

2007-10-17 Thread Dirk Eddelbuettel
On 17 October 2007 at 10:44, Rainer M Krug wrote: | I create one pdf file with plots via pdf() and one text file with text | via sink() that works very nice. But I would prefer to have one pdf file | with plots and the text which I store in the te=xt file via sink(). I.e. | | x.lm<-lm(...) | pd

Re: [R] How to speed up multiple for loop over list of data frames

2007-10-17 Thread jim holtman
First thing to do is to use Rprof (?Rprof) on a subset of your data to see where time is being spent. My guess is that most of it is in the calls to 'cor' and if this is the case, they you have to figure out some other algorithm. Also if these dataframes all contain numeric information, convert t

[R] power law fit with unknown zero

2007-10-17 Thread Thomas Hoffmann
Dear R-helpers I would like to do a fit of the form: y = a (x+c)**b, where a, b and c are unknown. Does anybody know how to do it? Thanks Thomas __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the post

Re: [R] Import from excel 2007

2007-10-17 Thread J . delasHeras
Quoting Scionforbai <[EMAIL PROTECTED]>: > I just wonder: why should R and its community try to support such an > awful program, with its protected formats and unmantained > features/bugs? > I mean, from both philosophical and technical point of view: R is free > software and should rather try to

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

2007-10-17 Thread Rainer M Krug
Dirk Eddelbuettel wrote: > On 17 October 2007 at 10:44, Rainer M Krug wrote: > | I create one pdf file with plots via pdf() and one text file with text > | via sink() that works very nice. But I would prefer to have one pdf file > | with plots and the text which I store in the te=xt file via sink

[R] correlated data

2007-10-17 Thread Nair, Murlidharan T
Hi!! I am trying to generate data with specific correlation using corgen method from the ecodist package. It does not seem to generate the data properly. I am listing the code below. Secondly, when I put the code given below all in one file and source it, it is unable to complete the task. But

Re: [R] Observations on SVD linpack errors, and a workaround

2007-10-17 Thread Peter Dalgaard
Art Owen wrote: > Lately I'm getting this error quite a bit: > Error in La.svd(x, nu, nv) : error code 1 from Lapack routine 'dgesdd' > > I'm running R 2.5.0 on a 64 bit Intel machine running Fedora (8 I think). > Maybe the 64 bit platform is more fragile about declaring convergence. > I'm seeing

Re: [R] Observations on SVD linpack errors, and a workaround

2007-10-17 Thread Ravi Varadhan
Up to R version 2.3.0, La.svd had an argument called "method" which allowed one to choose between "dgesvd" and "dgesdd", but the later versions only use "dgesdd", which is supposed to be faster for larger matrices. I wonder if the convergence problem goes away when "dgesvd", which uses the Lapack

[R] wilcox.test test statistic

2007-10-17 Thread João Fadista
Dear all, When we perform a Wilcoxon rank sum test (on two samples with different sizes) we get a test statistic. My question is, as the value of test statistic increases the difference between the distributions of the two samples also increase, right? Thanks in advance, João Fadista

Re: [R] Observations on SVD linpack errors, and a workaround

2007-10-17 Thread Art Owen
Ravi Varadhan wrote: > Up to R version 2.3.0, La.svd had an argument called "method" which allowed > one to choose between "dgesvd" and "dgesdd", but the later versions only use > "dgesdd", which is supposed to be faster for larger matrices. > > I wonder if the convergence problem goes away when "d

Re: [R] correlated data

2007-10-17 Thread Sarah Goslee
Hi, What's "properly"? What are you trying to do - you don't ever say. I think you need to set population=TRUE to get the result you appear to want (sorry, that's not entirely clear in the docs, I see). > x <- 1:100 > y <- corgen(x=x, r=.8, epsilon=.01, population=TRUE)$y > cor(x, y) [

Re: [R] How to speed up multiple for loop over list of data frames

2007-10-17 Thread Patrick Burns
I suspect the vast majority of time is because of growing objects. Preallocate 'iv', 'jv', 'rho_sv' and 'rho_pv' to be their final length and then subscript into them with their values. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and "A Guide f

[R] Trouble with R CMD INSTALL

2007-10-17 Thread Gang Chen
Why does R CMD INSTALL work for some packages (e.g., lme4) but not others (e.g., nlme)? Thanks, Gang __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-gu

[R] curly bracket in plot (reply)

2007-10-17 Thread Jonathan Baron
I used the wrong address. This was meant as a reply to another post. On 10/17/07 10:55, [EMAIL PROTECTED] wrote: > Hi Jonathan, > > I read your post in the R-Help. Did you get rid off the problem? I'm standing > inf > ront of the same problem... If you've got an answer to me to drae a curly >

Re: [R] Import from excel 2007

2007-10-17 Thread Scionforbai
> It would be dumb to ignore the fact that Excel is a very widespread > program, and therefore in the real world we are very likely to > encounter data formatted by Excel. Of course I know the widespreading of such programs. But the point is: how can we start to change this in the real world? Peop

Re: [R] wilcox.test test statistic

2007-10-17 Thread Peter Dalgaard
João Fadista wrote: > Dear all, > > When we perform a Wilcoxon rank sum test (on two samples with different > sizes) we get a test statistic. My question is, as the value of test > statistic increases the difference between the distributions of the two > samples also increase, right? > Wrong

Re: [R] wilcox.test test statistic

2007-10-17 Thread Thomas Lumley
On Wed, 17 Oct 2007, [iso-8859-1] João Fadista wrote: > When we perform a Wilcoxon rank sum test (on two samples with different > sizes) > we get a test statistic. My question is, as the value of test statistic > increases the difference between the distributions of the two samples also > increa

Re: [R] How to speed up multiple for loop over list of data frames

2007-10-17 Thread Waterman, DG (David)
I agree. Avoid the lines like: iv = c( iv, min(i, j) ) I had code that was sped up by 70 times after fixing the size of my output object before entering a loop. Cheers David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Patrick Burns Sent: 17 Octo

[R] passing arguments to functions within functions

2007-10-17 Thread Daniel E. Bunker
Dear R Users, I am trying to write a wrapper around summarize and xYplot from Hmisc and am having trouble understanding how to pass arguments from the function I am writing to the nested functions. There must be a way, but I have not been able to figure it out. An example is below. Any advi

Re: [R] How to speed up multiple for loop over list of data frames

2007-10-17 Thread Bert Gunter
... which is tip 2 in Section 7.7, "Tips," of V&R's S PROGRAMMING. Although this is now somewhat dated, it is still worthwhile if you do any serious S language programming (IMO, of course). Bert Gunter Genentech Nonclinical Statistics -Original Message- From: [EMAIL PROTECTED] [mailto:

Re: [R] Import from excel 2007

2007-10-17 Thread J . delasHeras
Quoting Scionforbai <[EMAIL PROTECTED]>: >> It would be dumb to ignore the fact that Excel is a very widespread >> program, and therefore in the real world we are very likely to >> encounter data formatted by Excel. > > Of course I know the widespreading of such programs. But the point is: > how c

[R] Error message in GAM

2007-10-17 Thread Francesc Montan
Hello useRs! I have % cover data for different plant species in 300 plots, and I use the ARCSINE transformation (to deal with % cover data). When I use a GLM I do not have any problem. But when I am trying to use a GAM model using mgcv package, to account for non-linearity I get an “error messa

Re: [R] R-2.6.0 - packages installation through a proxy - not working

2007-10-17 Thread Liviu Andronic
On 10/17/07, Dirk Eddelbuettel <[EMAIL PROTECTED]> wrote: > Hmm, I haven't had to do that in a while. What happens if you do > > > update.packages(method="wget") > > ie use an explicit setting of method? This exact way of manually specifying the method within the command (as opposed to set

[R] passing arguments to functions within functions

2007-10-17 Thread Daniel E. Bunker
Dear R Users, I am trying to write a wrapper around summarize and xYplot from Hmisc and am having trouble understanding how to pass arguments from the function I am writing to the nested functions. There must be a way, but I have not been able to figure it out. An example is below. Any advi

Re: [R] Import from excel 2007

2007-10-17 Thread Earl F. Glynn
"Marc Schwartz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Tue, 2007-10-16 at 14:38 +0100, Arnold Akem wrote: >> Hey Seniors, >> >> Really new to R, please has anyone imported a dataset from MS office >> excel 2007 into R yet? It seem to be giving me hard times which I did

Re: [R] Trouble with R CMD INSTALL

2007-10-17 Thread Liviu Andronic
On 10/17/07, Gang Chen <[EMAIL PROTECTED]> wrote: > Why does R CMD INSTALL work for some packages (e.g., lme4) but not > others (e.g., nlme)? If you don't provide any code or error message, I doubt anyone on this list will be willing to be of help. Regards, Liviu

Re: [R] Import from excel 2007

2007-10-17 Thread Marc Schwartz
On Wed, 2007-10-17 at 11:53 -0500, Earl F. Glynn wrote: > "Marc Schwartz" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > On Tue, 2007-10-16 at 14:38 +0100, Arnold Akem wrote: > >> Hey Seniors, > >> > >> Really new to R, please has anyone imported a dataset from MS office > >>

Re: [R] Trouble with R CMD INSTALL

2007-10-17 Thread Gang Chen
Thanks for pointing out that my original was unclear. Here is the error message: > R CMD INSTALL nlme WARNING: invalid package 'nlme' * Installing to library '/Library/Frameworks/R.framework/Resources/ library' ERROR: no packages specified And the following works just fine: > R CMD INSTALL

Re: [R] passing arguments to functions within functions

2007-10-17 Thread Duncan Murdoch
On 10/17/2007 1:12 PM, Daniel E. Bunker wrote: > Dear R Users, > > I am trying to write a wrapper around summarize and xYplot from Hmisc > and am having trouble understanding how to pass arguments from the > function I am writing to the nested functions. > > There must be a way, but I have n

[R] Multi-objective optimization

2007-10-17 Thread Paul Smith
Dear All, Is there any package to do multi-objective optimization? For instance, consider the following problem: maximize f(x,y) in order to x and maximize g(x,y) in order to y, simultaneously, with x and y being the same both for f and g. Can R do it numerically? Thanks in advance, Paul __

Re: [R] Multi-objective optimization

2007-10-17 Thread Duncan Murdoch
On 10/17/2007 1:54 PM, Paul Smith wrote: > Dear All, > > Is there any package to do multi-objective optimization? For instance, > consider the following problem: > > maximize f(x,y) in order to x > > and > > maximize g(x,y) in order to y, > > simultaneously, with x and y being the same both fo

Re: [R] Multi-objective optimization

2007-10-17 Thread Ravi Varadhan
Hi Paul, I know very little about multi-objective optimization. Further, I don't understand what "in order to" means. In multi-objective optim problems, don't you almost always end up reducing it to standard optimization by combining the multiple objectives into a single objective function? Then

Re: [R] Multi-objective optimization

2007-10-17 Thread Alberto Monteiro
Duncan Murdoch wrote: > >> Is there any package to do multi-objective optimization? For instance, >> consider the following problem: >> >> maximize f(x,y) in order to x >> >> and >> >> maximize g(x,y) in order to y, >> >> simultaneously, with x and y being the same both for f and g. Can R do >

Re: [R] Import from excel 2007

2007-10-17 Thread kees
For me, it works. That is to say, not the simple way, which gave the error: odbcConnectExcel("C:\\Users\\Kees\\Desktop\\Map1.xlsx") But it does when you ask the correct driver odbcDriverConnect("DRIVER=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);DBQ=C:\\Users\\Kees\\Desktop\\Map1.xlsx

Re: [R] passing arguments to functions within functions

2007-10-17 Thread Daniel E. Bunker
Duncan, Thanks for your reply. Here is a simplified version. What I really want to be able to do is summarize same data (using 'summarize') and pass those results to 'xYplot' for plotting, all in one wrapper. For this example, I am simply trying to call 'summarize' from within another fun

Re: [R] how to repeat the results of a generated probabilities

2007-10-17 Thread sigalit mangut-leiba
It does! thank you very much. Sigalit. On 10/17/07, Peter McMahan <[EMAIL PROTECTED]> wrote: > > There are two things that will help you out. > > First, instead of getting the individual z1 and x1 one at a time and > then multiplying them you can call rbinom(200,1,p) to get a vector of > 200 inde

[R] Problem loading spatstat.

2007-10-17 Thread Rolf Turner
I upgraded to R version 2.6.0 yesterday; now I find that I can't load spatstat. I re-installed spatstat (that part seemed to work without complaint) but when I execute > library(spatstat) I get the error message Error in dyn.load(file, ...) : unable to load shared library '/User

[R] R and TeraData

2007-10-17 Thread Vadim Kutsyy
Hello, Does anyone know a way to connect from R on Linux box to TeraData server? I can use ODBC connection on Windows box, but with amount of data I need (and prefer) to use large Linux box. Thanks, Vadim __ R-help@r-project.org mailing list https:

Re: [R] Import from excel 2007

2007-10-17 Thread Marc Schwartz
On Wed, 2007-10-17 at 20:53 +0200, kees wrote: > For me, it works. That is to say, not the simple way, which gave the error: > odbcConnectExcel("C:\\Users\\Kees\\Desktop\\Map1.xlsx") > > But it does when you ask the correct driver > odbcDriverConnect("DRIVER=Microsoft Excel Driver (*.xls, *.xlsx,

Re: [R] Import from excel 2007

2007-10-17 Thread Earl F. Glynn
"Marc Schwartz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This might be a question along the lines of "is it plugged in?", but do > you have the Office 2007 version of the ODBC drivers installed? > > If not, then your results would not be a surprise. > > If you do, then we shou

Re: [R] Multi-objective optimization

2007-10-17 Thread Peter Dalgaard
Alberto Monteiro wrote: > Duncan Murdoch wrote: > >>> Is there any package to do multi-objective optimization? For instance, >>> consider the following problem: >>> >>> maximize f(x,y) in order to x >>> >>> and >>> >>> maximize g(x,y) in order to y, >>> >>> simultaneously, with x and y being the

Re: [R] Import from excel 2007

2007-10-17 Thread Earl F. Glynn
"Earl F. Glynn" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'll try the odbcDriverConnect and let you know. Thanks. odbcDriverConnect worked fine for me, too, with new Excel 2007 formats: library(RODBC) channel <- odbcDriverConnect("DRIVER=Microsoft Excel Driver (*.xls, *.x

[R] type conversion

2007-10-17 Thread Roger Mason
Hello, I am trying to do arithmetic on numbers extracted from a PostgreSQL database, wherein the numbers are stored as type "money". The transcript below illustrates the problem. > Membersind06 <- sqlQuery(channel,"select * from income where rowname like > '%Membersind%'") > names(Memb

[R] problem with anova() and syntax in lmer

2007-10-17 Thread Gilles San Martin
Dear R user I have 2 problems with lmer. The statistical consultance service of my university has recomended to me to expose those problems here. Sorry for this quite long message. Your help will be greatly appreciated... Gilles San Martin 1) anova() I fit a first model : model1 <- lmer(eclw

Re: [R] type conversion

2007-10-17 Thread Marc Schwartz
On Wed, 2007-10-17 at 17:20 -0230, Roger Mason wrote: > Hello, > > I am trying to do arithmetic on numbers extracted from a PostgreSQL > database, wherein the numbers are stored as type "money". The > transcript below illustrates the problem. > > > Membersind06 <- sqlQuery(channel,"select * from

  1   2   >