Re: [R] bivariate normal distribution in likelihood

2007-05-01 Thread Prof Brian Ripley
On Tue, 1 May 2007, Robert A LaBudde wrote: > At 11:32 PM 4/30/2007, Deepankar wrote: >> Hi all, >> >> I am trying to do a maximum likelihood estimation. In my likelihood >> function, I have to evaluate a double integral of the bivariate >> normal density over a subset of the points of the plane.

Re: [R] A problem with svIDE in Tinn-R?

2007-04-29 Thread Prof Brian Ripley
It is a warning, and a warning about a long-standing error in svIDE. This is not to do with Tinn-R except perhap that the message gets mangled. I get from command-line R 1: '\A' is an unrecognized escape in a character string 2: unrecognized escape removed from ";for Options\AutoIndent: 0=Off,

Re: [R] probl with optimization

2007-04-29 Thread Prof Brian Ripley
On Sun, 29 Apr 2007, [EMAIL PROTECTED] wrote: > hi everyone! > > i've got a problem in optimizing the following function > > fun <- function(theta){ > theta <- rbind(beta,lambda) > fun <- sum(exp(h(beta)%*%lambda)) > fun > } Well, what are beta and lambda? Trying to optimize a function that does

Re: [R] error returned by "make check" in R-2.5.0

2007-04-28 Thread Prof Brian Ripley
On Sat, 28 Apr 2007, Eric Thompson wrote: > Professor Ripley, > > Thank you for your comments. > > On 4/28/07, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: >> How big is abs(lam - lam2[i])/Meps ? > > Here is the result on my system: > >> abs(lam - lam2[

Re: [R] error returned by "make check" in R-2.5.0

2007-04-27 Thread Prof Brian Ripley
How big is abs(lam - lam2[i])/Meps ? This could be one of those cases where your system (which CPU, what compilers?) is unusually inaccurate, but Linux systems do not usually differ much in their accuracies on the same CPU. I've checked several systems, as see maximum values of around 40. R 2.

Re: [R] acf and pacf plot

2007-04-27 Thread Prof Brian Ripley
On Fri, 27 Apr 2007, tom soyer wrote: > Thanks Eric! > > I also noticed that in R, acf returns ac at lag 0, while pacf does not (pac > for pacf starts at lag 1). Do you know if there is a good reason for that? > Shouldn't ac at lag 0 always be 1? No. The acf is an autocovariance or autocorrelati

Re: [R] Unwanted white borders on semi-transparent polygons?

2007-04-27 Thread Prof Brian Ripley
ing to know that R version 2.4.0 >> contains a transparency bug, though - I'll ask IT Services to install the >> latest version of R on the G5 and see if that helps. >> >> Many thanks for all your help, >> >> >> -Matt >> >> >>

Re: [R] Unwanted white borders on semi-transparent polygons?

2007-04-27 Thread Prof Brian Ripley
have access to a Windows machine to test this out. > Even if I did, many of my scripts include various Unix system calls so I > don't think that would be a viable > solution. Could this be a bug in the OS X pdf driver? The R pdf() device is the same on all platforms. > M

Re: [R] problem installing Rpmi : mpi.h...Found in /usr/include/lam, yet "libmpi not found"

2007-04-26 Thread Prof Brian Ripley
You have not told us your OS, but this looks like a x86_64 Redhat-based Linux and I will assume their file layout. If so, this is a known problem with Rmpi, which I reported to the maintainer quite a while back. You do not want --with-mpi=/usr/lib64/lam, as that is not where lam is (I presume

Re: [R] Unwanted white borders on semi-transparent polygons?

2007-04-26 Thread Prof Brian Ripley
What version of R, what OS, what version of Acrobat? I don't see this in 2.5.0 on Windows (using Acrobat 7: Acrobat does not exist on Linux, AFAIK). And reading the PDF produced shows no sign of an extra object for the border. On Fri, 27 Apr 2007, Matthew Neilson wrote: > Hey all, > > I'm try

Re: [R] gnls warning message

2007-04-25 Thread Prof Brian Ripley
>From the help page: control: a list of control values ... Now, control=c(minFactor=1/2048) is not a list but a numeric vector. So it is warning you about incorrect usage. On Thu, 26 Apr 2007, Pedro Mardones wrote: > Dear R users; > I was trying to fit a nonlinear model using gnls (nlme versi

Re: [R] R CMD CHECK and require() / library() methods

2007-04-25 Thread Prof Brian Ripley
On Wed, 25 Apr 2007, Crispin Miller wrote: > Hi, > > I have a piece of code that decides at runtime whether to load a data > package (and which package to load). > This is then done with a call to: > > library(x) > > (where x is a character variable containing the package name). > > This causes R

Re: [R] simulate values

2007-04-25 Thread Prof Brian Ripley
On Wed, 25 Apr 2007, Uwe Ligges wrote: > > > Soare Marcian-Alin wrote: >> Hello, >> >> I want to simulate 100 values of the ARMA Process with this function: >> >> x[i] = 0.5 * x[i-1] + 0.2 * x[i-2] + x[i] + 0.9 * x[i-1] + 0.2 * x[i-2] + >> 0.3 * x[i-3] > > There is no kind of noise in your model,

Re: [R] prelim.norm() function not working

2007-04-24 Thread Prof Brian Ripley
Looks like you have a data frame where you need a matrix. (The same issue occurs in most of Joe Schafer's packages, e.g. mix.) Try as.matrix(usnews). On Tue, 24 Apr 2007, Brant Inman wrote: > R-experts: > I am trying to reproduce some of Paul Allison's results in his little > green book on mis

Re: [R] Problem installing Rmpi with lam on SGI SLES9

2007-04-24 Thread Prof Brian Ripley
On Tue, 24 Apr 2007, Hendrik Fuß wrote: Hi, I've been trying here to install Rmpi on an SGI IA-64 machine with 64 processors, running SuSE Linux Enterprise Server 9, R 2.4.0 and lam-mpi 7.1.3. While I've read of similar problems on this list, I think I've got an entirely new set of error messag

Re: [R] Values greater than 1 or lower than -1 in ARMAacf

2007-04-24 Thread Prof Brian Ripley
You do need to specify a stationary ARMA process for it to have an acf: your example is not valid since > Mod(polyroot(c(1, -w))) [1] 0.6726057 1.6256859 1.6256859 1.7448484 1.7448484 18.4778223 Have you actually looked at the reference on the help page? It is there to be help-ful. Like

Re: [R] high resolution plot tick problems

2007-04-24 Thread Prof Brian Ripley
You will do better to use e.g. bitmap() and bitmap the output at 600 dpi, if that is what you are aiming at. The default line width will be 1/96". You haven't told us what OS 'my PC' is running, but people who say that usually mean Windows. On the Windows' png device the default line width i

Re: [R] Documentation for namespaces

2007-04-23 Thread Prof Brian Ripley
http://www.stat.uiowa.edu/~luke/R/namespaces/morenames.html http://www.ci.tuwien.ac.at/Conferences/useR-2004/Keynotes/Tierney.pdf http://cran.r-project.org/doc/Rnews/Rnews_2003-1.pdf may all help, but there is as yet nothing (AFAIK) like a comprehensive user-level manual. On Mon, 23 Apr 2007, Te

Re: [R] Estimates at each iteration of optim()?

2007-04-23 Thread Prof Brian Ripley
You can of course print out the values in your objective function, as that is where you want the information. In any case, using R's debugging facilities (e.g. dump.frames & debugger) would have enabled you to find the input values are which your function was failing. Please see the chapter i

Re: [R] Package installed, functional but not available

2007-04-23 Thread Prof Brian Ripley
If you read the help page it says Description: Summarize information about installed packages and packages available at various repositories, and automatically upgrade outdated packages. ... avail: a data frame with columns as the _matrix_ returned by 'available.packa

Re: [R] stringsAsFactor global option (was "character coerced to a factor")

2007-04-23 Thread Prof Brian Ripley
On Mon, 23 Apr 2007, Terry Therneau wrote: > --- Gabor Grothendieck <[EMAIL PROTECTED]> > wrote: > >> Just one caveat. I personally would try to avoid >> using >> global options since it can cause conflicts when >> two different programs assume two different settings >> of the same global option

Re: [R] Changing working directory

2007-04-23 Thread Prof Brian Ripley
Have you looked on the 'File' menu? 'Load Workspace...' is what you need, possibly after 'Change dir...' On Mon, 23 Apr 2007, Walter Paczkowski wrote: > Good morning, > > I keep copies my .RData file in different directories for different > projects on Windows XP. There is an icon on my deskto

Re: [R] Help about princomp

2007-04-23 Thread Prof Brian Ripley
On Mon, 23 Apr 2007, annina wrote: > > Hello, > I have a problem with the princomp method, it seems stupid but I don't know > how to handle it. > I have a dataset with some regular data and some outliers. I want to > calculate a PCA on the regular data and get the scores for all data, > including

Re: [R] R: Appending the files

2007-04-21 Thread Prof Brian Ripley
want on that file: a flat ASCII file by rows does not seem a good enough fit. > On 4/20/07, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: >> >> The output is >> >> "","V1","V2","V3" >> "1",0,0,0 >> &quo

Re: [R] cat() to STDERR

2007-04-21 Thread Prof Brian Ripley
On Sat, 21 Apr 2007, ivo welch wrote: > I spoke to soon. cat("hello", file=stderr()) does not "punch through" > R CMD BATCH test.R. Is there a way to have stderr() messages escape > the log and go directly to the invoking terminal (i.e., under > linux/unix, late-release gentoo). Maybe this shou

Re: [R] R: Appending the files

2007-04-20 Thread Prof Brian Ripley
The output is "","V1","V2","V3" "1",0,0,0 "2",0,0,0 "","V1","V2","V3" "1",1,1,1 "2",1,1,1 and the warning is because no csv-reader is going to make much sense of that. You want col.names=FALSE on the second call. On Fri, 20 Apr 2007, Vaibhav Gathibandhe wrote: > Hello R-Experts, > > I am a b

Re: [R] Udpate R under a proxy

2007-04-20 Thread Prof Brian Ripley
See rw-FAQ Q2.19, and of course the posting guide. Claiming 'it always fail' does not help us help you, but blaming your tools in this way could be considered discourteous (or worse). On Fri, 20 Apr 2007, justin bem wrote: dear all, I get internet via a proxy server when I try to downlaod p

Re: [R] cat() to STDERR

2007-04-20 Thread Prof Brian Ripley
On Fri, 20 Apr 2007, Peter Dalgaard wrote: > ivo welch wrote: >> Dear R wizards---I read Brian Ripley's post from 2004 which said that >> it was not possible to print to STDERR. Alas, I have more modest >> needs. I was wondering if it was possible to just send a string to >> STDERR with cat() wh

Re: [R] Innstalling packages in Vista

2007-04-20 Thread Prof Brian Ripley
Oh, *please* do consult the list archives as the posting guide suggests: I posted an answer to this earlier this morning, referencing a comprehensive answer from Sunday. The problem is a lack of understanding of how Vista security works. You are using a version of R which predates Vista, so u

Re: [R] Windows Vista issue (was Error en R)

2007-04-19 Thread Prof Brian Ripley
This is not an error in R. It is a problem of your permissions under Vista, and was discussed here: https://stat.ethz.ch/pipermail/r-help/2007-April/129661.html a few days ago. On Thu, 19 Apr 2007, Roberto Mario Domínguez Olivero wrote: Mrs and Mr My operative system is "Windows Vista" and

Re: [R] rbind() of factors in data.frame

2007-04-19 Thread Prof Brian Ripley
On Thu, 19 Apr 2007, Albrecht, Dr. Stefan (AZ Private Equity Partner) wrote: > I would like to inquire, if it is a desired feature that the combination > with rbind() of two data frames with factors columns does not sort the > factors levels of the combined data frame. Yes, and a documented one

Re: [R] Problem installing packages

2007-04-19 Thread Prof Brian Ripley
'grid' is an integral part of R, so this suggests your R installation is broken. (You could have found that out from the R FAQ Q5.1.1.) You have told us very little (please study the posting guide), not including which version of R and how you installed it. Please try reinstalling R, from th

Re: [R] rJava help

2007-04-19 Thread Prof Brian Ripley
On Thu, 19 Apr 2007, tkobayas wrote: > I use Redhat Linux for R. Now I am trying to use the rJava library. I > downloaded JRE beta 2 from Sun. I typed I am not sure why, as JRE 1.6.0 was released a while back. > [EMAIL PROTECTED] R CMD javareconf In what R version? > Java interpreter : /usr/bi

Re: [R] division of decimal number

2007-04-19 Thread Prof Brian Ripley
On Thu, 19 Apr 2007, Gavin Simpson wrote: > On Wed, 2007-04-18 at 16:06 +0100, Barry Rowlingson wrote: >> Schmitt, Corinna wrote: >>> Dear R-Experts, >>> >>> how can I divide the number 0.285 with 2. I need a function. >>> Result: 0.285 / 2 = 0.1425 >> >> Just get the / operator: >> >> > divide

Re: [R] Tcltk

2007-04-18 Thread Prof Brian Ripley
Sorry, but this works under all the circumstances I tried on my Vista system, so there is nothing I can do to debug it. On Tue, 17 Apr 2007, Prof Brian Ripley wrote: I suspect tcl's own version of 'access', but can you please confirm that this still happens under '

Re: [R] proxy settings

2007-04-18 Thread Prof Brian Ripley
On Tue, 17 Apr 2007, Antonio Olinto wrote: > Hi all, > > I used to connect internet via a proxy. Before update packages I wrote in R > > Sys.putenv("http_proxy"="http://proxy3.redegov.sp.gov.br:80/";) > > Nevertheless the way the connection is done has changed. For example, in the > browser the pr

Re: [R] Runing R in a bash script

2007-04-18 Thread Prof Brian Ripley
On Wed, 18 Apr 2007, Ulrik Stervbo wrote: > As I har problems installing the Cairo package, I went for Henriks solution > - and it works almost perfect. I would like to have been able to generate > transparent png. You cannot do transparency via postscript. I would suggest using pdf() and conver

Re: [R] R-OSX error: 'memory not mapped'

2007-04-18 Thread Prof Brian Ripley
On Wed, 18 Apr 2007, Atte Tenkanen wrote: > I often get a following error with R > > *** caught segfault *** > address 0x78807e00, cause 'memory not mapped' > > Possible actions: > 1: abort (with core dump) > 2: normal R exit > 3: exit R without saving workspace > 4: exit R saving workspace >> > S

Re: [R] Tcltk

2007-04-17 Thread Prof Brian Ripley
I suspect tcl's own version of 'access', but can you please confirm that this still happens under 'Run as Administrator', assuming 'C:\Program' is a system area in Swedish Windows Vista? I will be able to take a closer look, but not before 2.5.0 (which is in code freeze and I have limited accc

Re: [R] PROC DISCRIM vs. lda( ) in MASS

2007-04-17 Thread Prof Brian Ripley
On Tue, 17 Apr 2007, Greg Tarpinian wrote: > Hello, > > I am using WinXP, R version 2.3.1, and SAS for PC version 8.1. > > I have mostly used SAS over the last 4 years and would like to > compare the output of PROC DISCRIM to that of lda( ) with respect > to a very specific aspect. My data have k

Re: [R] help comparing two median with R

2007-04-17 Thread Prof Brian Ripley
On Tue, 17 Apr 2007, Robert McFadden wrote: > > >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of Jim Lemon >> Sent: Tuesday, April 17, 2007 12:37 PM >> To: Pedro A Reche >> Cc: r-help@stat.math.ethz.ch >> Subject: Re: [R] help comparing two median

Re: [R] It is possible to Expand RAM with HD space?

2007-04-17 Thread Prof Brian Ripley
On Tue, 17 Apr 2007, Uwe Ligges wrote: > > > Jorge Cornejo-Donoso wrote: >> I'm using R in a winXp machine. I have problems with the size of my database >> (xyz), anyone know if is possible to use some kind of swap memory, in order >> to expand my real RAM and use HD space for the processes? > > T

Re: [R] Setting rownames (was Please help.... i know its trivial)

2007-04-16 Thread Prof Brian Ripley
On Tue, 17 Apr 2007, Petr Klasterecky wrote: > Patrick Callier napsal(a): >> rownames is the command you want, I think. >> >> rownames(A) <- seq(1:8) >> > > Yes. More generally > rownames(A) <- 1:length(A[,1]) Better rownames(A) <- seq_len(nrow(A)) which works correctly if the length is 0 or th

Re: [R] Dealing with data frame column names beginning with a numeric

2007-04-16 Thread Prof Brian Ripley
On Mon, 16 Apr 2007, Duncan Murdoch wrote: > On 4/16/2007 4:22 PM, Patrick Connolly wrote: >> I wish to set up a simple function using boxplot so that it will be >> available to someone using R for Windows. (I myself use Linux.) >> >> The way the data is organised makes it convenient to use the b

Re: [R] RODBC connections w/o specific database

2007-04-16 Thread Prof Brian Ripley
On Mon, 16 Apr 2007, Pete Cap wrote: > Folks, > > I'm writing a gui wrapper around RODBC (having abandoned RMySQL) and > some custom analysis scripts. I'm hoping that I could get some advice. > > All of my users will have access to a database server. I am going to > limit their access to certa

Re: [R] Find zeros of analytic functions

2007-04-16 Thread Prof Brian Ripley
There is no need to send this twice under different subject lines. On Mon, 16 Apr 2007, enrico.foscolo2 wrote: > Dear Partecipants to the list, > I am Enrico Foscolo, a student of the Faculty of Statistics, University of > Bologna, > and I am interested under consideration of the search of zero

Re: [R] 2 samples KS-test...

2007-04-16 Thread Prof Brian Ripley
On Mon, 16 Apr 2007, Stéphane CRUVEILLER wrote: Dear R-users, I have some trouble to perform a 2-samples KS test. Apparently my 2 samples are numerical (see below) but R That says there are data frames, not numeric vectors. That would be easier to see if you printed the value (rather than us

Re: [R] Windows Vista issues

2007-04-14 Thread Prof Brian Ripley
> >> -Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of Prof >> Brian Ripley >> Sent: Saturday, April 14, 2007 1:57 AM >> To: [EMAIL PROTECTED] >> Subject: [R] Windows Vista issues >> >

[R] Windows Vista issues

2007-04-13 Thread Prof Brian Ripley
It seemed FUD [*] has been prevailing here and elsewhere on Vista security features. I asked our sysadmins to set up a Vista box for me on which I have access to all levels of accounts. Many of the issues I found were covered by earlier answers and all in the upcoming rw-FAQ (currently availab

Re: [R] MySQL query and character set

2007-04-13 Thread Prof Brian Ripley
We need more information from you to be able to fully understand this: - I guess this is package RMySQL, but you did not say. - What OS and what locale? The posting guide asks for the output of sessionInfo(), and it would be very useful here. On Sat, 14 Apr 2007, Martin Mundschenk wrote: Hi

Re: [R] labels cut partially on hist

2007-04-13 Thread Prof Brian Ripley
On Fri, 13 Apr 2007, AA wrote: > Dear List, > > I have the following function where I plot on one page a histogram and a > boxplot. I use option labels = TRUE in hist to show labels. However the > label on the highest bar in the histogram is not showing entirely. How > can I correct this? par(

Re: [R] apply problem

2007-04-13 Thread Prof Brian Ripley
On Fri, 13 Apr 2007, aedin culhane wrote: > Dear R-Help > I am running apply on a data.frame containing factors and numeric > columns. It appears to convert are columns into as.character? Does it > convert data.frame into matrix? Is this expected? I wish it to recognise Yes, and quite explicit o

Re: [R] problems in loading MASS

2007-04-12 Thread Prof Brian Ripley
MASS is part of the standard R installation, as a recommended package. I suggest you try re-installing R and not then trying to download a different version. I would also suggest trying 2.5.0 beta at this stage in preference to 2.4.1 if you do need to re-install R. Beyond that, there is a list

Re: [R] class and method

2007-04-12 Thread Prof Brian Ripley
On Thu, 12 Apr 2007, jiho.han wrote: > > Hi, R-experts > > I defined a new class of object, called "alpha", which is basically a > data.frame. And (I think) I know how to create a method for "alpha", such as > "summary.alpha", "plot.alpha". The problem is, when I try to access "alpha" > object by

Re: [R] How to manipulate the pointer of a file?

2007-04-12 Thread Prof Brian Ripley
On Thu, 12 Apr 2007, Yuchen Luo wrote: > With file( ) to obtain a pointer of a file, every time we use scan ( ) to > read one row of it, the pointer will point to the next row of the file. In > the following example, d1 and d2 are obtained the same way but they > correspond to different rows of t

Re: [R] Method dispatch for print() in package its

2007-04-12 Thread Prof Brian Ripley
Setting S4 methods for print() works correctly, as in your examples. Your first example does not call print(), so it is not suprising that no method dispatch takes place. You seem to suppose that such a method should be used for top-level auto-printing, and it will not be as your example shows

Re: [R] using install.packages via proxy

2007-04-12 Thread Prof Brian Ripley
On Thu, 12 Apr 2007, Vladimir Eremeev wrote: > What operating system do you use? > > If you use Windows, than open the Control Panel, double click on the System > icon, go to "Advanced" tab, press > "Environment variables" button, then press "New" to create one more new > variable, enter "http_pro

Re: [R] taskPR

2007-04-12 Thread Prof Brian Ripley
It would have been helpful to have given the details the R posting guide asks for, such as your OS. That message probably does not mean that /home/bw135690/R-2.4.1/library/taskPR/libs/taskPR.so does not exist. It says 'cannot open shared object file', and this can have many causes. One is that

Re: [R] Calling LAPACK functions directly from R

2007-04-11 Thread Prof Brian Ripley
This was much more appropriate for R-devel, so please move any followup there. On Wed, 11 Apr 2007, William Constantine wrote: > I am interested in tapping into LAPACK functionality directly from R. > Using R-2.4.1 for Windows, I was able to do so ala: > > dyn.load("bin/Rlapack.dll") > is.loaded

Re: [R] Help with pexp( )

2007-04-11 Thread Prof Brian Ripley
On Wed, 11 Apr 2007, Douglas Bates wrote: > On 4/11/07, Jeann S <[EMAIL PROTECTED]> wrote: >> Dear all, >> >> Sorry for bringing up an old issue: >> >>>pexp(50, 0.5) >> [1] 1 >> >> In some cases, pexp() gives CDF=1. I read some discussion in 2002 saying it >> has been patched. However it'

Re: [R] Memory management

2007-04-11 Thread Prof Brian Ripley
ry management, or specifically what happen when we 'pass in' > variables, which strategy is better at which situation? > > Thanks~ > - y > > > Prof Brian Ripley wrote: >> >> On Tue, 10 Apr 2007, yoo wrote: >> >>> >>> Hi all, I

Re: [R] enable-R-shlib ?

2007-04-11 Thread Prof Brian Ripley
You'll find the definitive discussion in the R-admin manual. On Wed, 11 Apr 2007, Bernardo Rangel Tura wrote: > > Hi R Masters! > > > Recently I migrated to Ubuntu Linux [I a former windows user]. > > Now I think compile a 64-bit R version for my computer [Turion AMD], but > I not sure if using t

Re: [R] read.spss (package foreign) and SPSS 15.0 files

2007-04-10 Thread Prof Brian Ripley
On Thu, 5 Apr 2007, Michael Conklin wrote: Not being the developer I cannot answer definitively but, as a frequent user of SPSS files I can give you my experience. 1) The unrecognized coding is perhaps due to the locale of the SPSS installation. I have had success reading in files from versio

Re: [R] read.spss (package foreign) and SPSS 15.0 files

2007-04-10 Thread Prof Brian Ripley
On Thu, 5 Apr 2007, Michael Conklin wrote: Not being the developer I cannot answer definitively but, as a frequent user of SPSS files I can give you my experience. 1) The unrecognized coding is perhaps due to the locale of the SPSS installation. I have had success reading in files from versio

Re: [R] Function knn.dist from knnflex library

2007-04-10 Thread Prof Brian Ripley
On Wed, 11 Apr 2007, [EMAIL PROTECTED] wrote: > Hello, > > I am feeling that this question can have a very simple answer, but I > can't find it. > > I need to use the function knn.dist from knnflex library. > > Whatever I try, I get the error: > Error in as.vector.dist(x, "character") : unused arg

Re: [R] Memory management

2007-04-10 Thread Prof Brian Ripley
On Tue, 10 Apr 2007, yoo wrote: > > Hi all, I'm just curious how memory management works in R... I need to run an > optimization that keeps calling the same function with a large set of > parameters... so then I start to wonder if it's better if I attach the > variables first vs passing them i

Re: [R] Computational speed question

2007-04-10 Thread Prof Brian Ripley
On Tue, 10 Apr 2007, David Vonka wrote: > Hello, > > I'm doing bootstrap in R 2.4.1 in order to compute standard errors of an > estimator. I'm running the same program on 4 computers. The core of the > program is a nlm minimization of a function, which is (I believe) nicely > coded using (t)apply

Re: [R] When to use quasipoisson instead of poisson family

2007-04-10 Thread Prof Brian Ripley
On Tue, 10 Apr 2007, ronggui wrote: > On 4/10/07, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: >> On Tue, 10 Apr 2007, Achim Zeileis wrote: >> >> > On Tue, 10 Apr 2007, ronggui wrote: >> > >> >> It seems that MASS suggest to judge on

Re: [R] When to use quasipoisson instead of poisson family

2007-04-10 Thread Prof Brian Ripley
On Tue, 10 Apr 2007, Achim Zeileis wrote: > On Tue, 10 Apr 2007, ronggui wrote: > >> It seems that MASS suggest to judge on the basis of >> sum(residuals(mode,type="pearson"))/df.residual(mode). Not really; that is the conventional moment estimator of overdispersion and it does not suffer from th

Re: [R] Problem with saving R plot in Emacs

2007-04-09 Thread Prof Brian Ripley
On Mon, 9 Apr 2007, Tong Wang wrote: > Hi, >I am having problem with saving figures when I use R in Emacs (ESS). > Whenever I try to save a plot, the Emacs freezes > and I have to close it. >I am using Win XP , R binaries, Emacs for windows. >Somebody got the same problem ? Can I g

Re: [R] Testing invertibility of an AR model

2007-04-09 Thread Prof Brian Ripley
The following is an internal function in arima() arCheck <- function(ar) { p <- max(which(c(1, -ar) != 0)) - 1 if (!p) return(TRUE) all(Mod(polyroot(c(1, -ar[1:p]))) > 1) } On Tue, 10 Apr 2007, Leeds, Mark (IED) wrote: > I've looked around but I

Re: [R] data encapsulation with classes

2007-04-09 Thread Prof Brian Ripley
On Sun, 8 Apr 2007, hadley wickham wrote: > On 4/8/07, Roger Bivand <[EMAIL PROTECTED]> wrote: >> On Sun, 8 Apr 2007, Peter Williams wrote: >> >>> Hi All, >>> >>> I'm new to R from a C and Octave/Matlab background. I am trying to >>> construct some classes in R to which I want to attach pieces of

Re: [R] regular expression

2007-04-07 Thread Prof Brian Ripley
On Sat, 7 Apr 2007, Laurent Rhelp wrote: [...] > I had had to modify the line below to allow for the connexion : > >temp <- readLines(file(file.path(dirdata, "initial", i))) You do not need the file() here. > I didn't understand that readLines read all the file in one go, I > understood tha

Re: [R] string edit distance

2007-04-07 Thread Prof Brian Ripley
Does the code underlying agrep() do what you want? On Sat, 7 Apr 2007, Thomas Hills wrote: > I have a column of words, for example > > "DOG" > "DOOG" > "GOD" > "GOOD" > "DOOR" > ... > > and I am interested in creating a matrix that contains the string > edit distances between each pair of words.

Re: [R] dbinom and Catherine Loader

2007-04-07 Thread Prof Brian Ripley
On Fri, 6 Apr 2007, [EMAIL PROTECTED] wrote: > There has been past correspondence regarding Catherine Loader's > Bell Labs (oops, Lucent) paper > > "Fast and Accurate Computation of Binomial Probabilities" > > which gives the algorithm on which R's dbinom() is based. > > The original URL given in

Re: [R] Likelihood returning inf values to optim(L-BFGS-B) other options?

2007-04-07 Thread Prof Brian Ripley
, Michael Zitat von Prof Brian Ripley <[EMAIL PROTECTED]>: On Thu, 5 Apr 2007, Ravi Varadhan wrote: In your code, the variables x (which I assume is the observed data), Tvec, and flag are not passed to the function as arguments. This could be a potential problem. I think scoping wil

Re: [R] how to exclude some packages from help.search() ?

2007-04-06 Thread Prof Brian Ripley
On Fri, 6 Apr 2007, Vladimir Eremeev wrote: > > I have installed RGTk2 to satisfy other package requirements. > I am not planning to use it in my own work. > > Occasionally I search through the R help using the help.search() function, > and every time it returns me lots of references to the functi

Re: [R] Reading a large csv file row by row

2007-04-06 Thread Prof Brian Ripley
The solution is to read the 'R Data Import/Export Manual' and make use of connections or databases. What you want to do is very easy in RODBC, for example, but can be done with scan() easily provided you keep a connection open. On Fri, 6 Apr 2007, Yuchen Luo wrote: > Hi, my friends. > > When a

Re: [R] read.spss (package foreign) and SPSS 15.0 files

2007-04-05 Thread Prof Brian Ripley
On Thu, 5 Apr 2007, Michael Conklin wrote: Not being the developer I cannot answer definitively but, as a frequent user of SPSS files I can give you my experience. 1) The unrecognized coding is perhaps due to the locale of the SPSS installation. I have had success reading in files from versio

Re: [R] Indexing in anova summary output of the form: summary(aov(y ~ x1, Error = (x1/x2)))

2007-04-05 Thread Prof Brian Ripley
The output is of class "summary.anovalist" so (hint, hint) it is a list. Try [[ ]] to get list elements. Without a reproducible example (see the footer and the posting guide) it is not possible to show you working code. On Thu, 5 Apr 2007, Michael D. Rennie wrote: > > Hi, there > > I'm trying

Re: [R] Likelihood returning inf values to optim(L-BFGS-B) other options?

2007-04-05 Thread Prof Brian Ripley
On Thu, 5 Apr 2007, Ravi Varadhan wrote: In your code, the variables x (which I assume is the observed data), Tvec, and flag are not passed to the function as arguments. This could be a potential problem. I think scoping will probably find them. Another problem could be that you have to use

Re: [R] gpclib library

2007-04-05 Thread Prof Brian Ripley
b/gpclib_1.4-1.tar.gz' Content type 'application/x-tar' length 24840 bytes opened URL == downloaded 24Kb * Installing *source* package 'gpclib' ... [...] > > Thank yor for your help > > All the best > Leonardo

Re: [R] Multithreading

2007-04-05 Thread Prof Brian Ripley
1) Please update your R: 2.5.0 is imminent. 2) Please read the 'R Installation and Adminstration manual'. R itself in not multithreaded but can make use of multithreaded BLAS. 3) A search of the list archives would have produced many hits, as does RSiteSearch("multithreaded"), with more informa

Re: [R] Problem installing rgdal on Mac OS X

2007-04-04 Thread Prof Brian Ripley
On Wed, 4 Apr 2007, Thomas Adams wrote: > Please forgive me for posting this here if it is not appropriate (where > should this question be posed?)? The R posting guide asked you to ask the maintainer, but as this is a MacOS X issue, on the R-sig-mac list. It's not appropriate for R-help becau

Re: [R] gpclib library

2007-04-04 Thread Prof Brian Ripley
It's a _package_ that you are looking for (there is something else called a gpclib library, to do with GNU Pascal). You haven't told us your OS or R version, so we don't know what file you are looking for. But try another mirror if one appears not to work (and using a US mirror with an email a

Re: [R] Need mtrace (malloc debugging) help

2007-04-04 Thread Prof Brian Ripley
On Wed, 4 Apr 2007, $|-|@r@|) wrote: > Hi all, > > I am using "mtrace" malloc debugging utility to trace memory leaks in my > application. > > I followed following steps: > > 1. Added mtrace() function in the beginning of my main function. > 2. exported the MALLOC_TRACE environment variable. >

Re: [R] gnomeGUI under KDE

2007-04-03 Thread Prof Brian Ripley
On Wed, 4 Apr 2007, Luis Lopez Oliveros wrote: > Dear all, > > Recently, I installed the KDE desktop under my Linux system, but Included > also the Gnome desktop (actually, I installed everything that comes in the > openSUSE cd). > > My question about R is the following. I would like to run some k

Re: [R] Strange labels on plot with dates

2007-04-03 Thread Prof Brian Ripley
PLEASE do read the posting guide and give us the ouput it asks for. Current R (2.5.0 alpha) does give 2001, 2002, ..., so you did not follow the request to update your R, I suspect. On Tue, 3 Apr 2007, Henrik Andersson wrote: > Hello fellow R people, > > I don't understand the default behavior o

Re: [R] controling omitted category in factor()

2007-04-03 Thread Prof Brian Ripley
model.matrix() does this following the instructions you give it (ultimately via options("contrasts") about how to encode a factor variable (and this is also nothing to do with 'factor()', and factors have 'levels' not 'categories', a completely different concept in S but not used nowadays in R)

Re: [R] Referencing function name from within function

2007-04-03 Thread Prof Brian Ripley
This presumes a function is always called by name. Try > lapply(1:10, myfunction) Error in FUN(c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)[[1]], ...) : FUN requires xyz! to see a (simple case of) the problem. On Tue, 3 Apr 2007, [EMAIL PROTECTED] wrote: > I dunno much about such things, but a we

Re: [R] RODBC, sqlQuery with NA:s

2007-04-03 Thread Prof Brian Ripley
any > possibility to tell R that it should convert these empty cells to NA:s (when > importing)? Yes, via na.strings="". > > Thanks for your help > Lauri > > > 2007/4/3, Prof Brian Ripley <[EMAIL PROTECTED]>: >> >> In my attempts to reproduc

Re: [R] RODBC, sqlQuery with NA:s

2007-04-03 Thread Prof Brian Ripley
In my attempts to reproduce this both approaches worked. There seems to be something going on we cannot see (and I don't believe NULL in the database is being mapped to " "). For example, might there be non-breaking spaces (character A0 in Windows 1252, your most likely character set) in the

Re: [R] Q

2007-04-03 Thread Prof Brian Ripley
Apr 2007, Duncan Murdoch wrote: > On 4/1/2007 3:39 AM, Prof Brian Ripley wrote: >> I think this is about RODBC, uncredited. >> >> There is currently no way to do escapes here, and I am pretty sure that >> ODBC drivers do not support 'slash' as an escape (or did

Re: [R] Why does lmList() fail when lm() doesn't?

2007-04-02 Thread Prof Brian Ripley
The short answer is that lm() is written more robustly. I don't think either should fail, but without a reproducible example it is hard to tell. On Mon, 2 Apr 2007, Michael Kubovy wrote: > Dear r-helpers, > > Can anyone suggest why lm() doesn't complain here: > > summary(osss.lm1 <- lm(logOdds

Re: [R] Compiling C codes in Windows

2007-04-02 Thread Prof Brian Ripley
On Mon, 2 Apr 2007, Tong Wang wrote: > Hi All, > I have been struggling to figure out how to compile c codes for R > use. I am using Win XP + Cygwin + R binaries. After I followed all the > instructions in " Building R for Windows" from Murdoch's website, I > tried to Run something like

Re: [R] adding slashes in sql querys

2007-03-31 Thread Prof Brian Ripley
I think this is about RODBC, uncredited. There is currently no way to do escapes here, and I am pretty sure that ODBC drivers do not support 'slash' as an escape (or did you mean backslash? I am still not sure that would work). sqlSave() has fast=TRUE and fast=FALSE options, and it is worth try

Re: [R] commandArgs usage and --args invokation

2007-03-31 Thread Prof Brian Ripley
On Sat, 31 Mar 2007, ivo welch wrote: > Dear R experts: > > I am a bit stymied by how the argument picking-off works in R batch file > usage. You seem to mean 'R CMD BATCH' usage (there are other ways to run R in batch), and also I will assume you are talking only about a Unix-alike (these thi

Re: [R] strange fisher.test result

2007-03-31 Thread Prof Brian Ripley
The two-sided test of odds-ratio=1 is not necessarily (nor in this case) the same thing as an equal-tailed confidence interval: see the help page comment Two-sided tests are based on the probabilities of the tables, and take as 'more extreme' all tables with probabilities less than o

Re: [R] zip.file.extract on Windows

2007-03-31 Thread Prof Brian Ripley
The current (you give no version information) help file says: file: A file name. (If a path is given, see 'Note'.) zipname: The file name (not path) of a 'zip' archive, including the '".zip"' extension if required. ... This is a helper function for 'help', 'example' and '

Re: [R] Copyright of messages (was Wikibooks)

2007-03-30 Thread Prof Brian Ripley
What you agree to _is_ covered in the R posting guide and its references, as well as what is expected of posters in respecting the rights of others. Perhaps time yet again to remind people: > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html On Fri, 30 Mar 2007, Pete

<    1   2   3   4   5   6   7   8   9   10   >