Re: [R] Managing global/local variables when creating R packages

2007-08-02 Thread Prof Brian Ripley
On Thu, 2 Aug 2007, Bethany Kok wrote: > I'm working on a package for R to create graphs for modeling > interactions between latent variables in SEM. At the moment, I have one > function which performs the necessary steps to prepare the data for > graphing, and then separate graphing functions de

Re: [R] RSPython won't load in R 2.6.0 under Linux

2007-08-02 Thread Prof Brian Ripley
Please take this up with the RSPython maintainer (current address in the CC and in version 0.7-1). I think you have not built R as a shared library, and that symbol only exists when you do (it is not the default). The same happens in the released R: we will have to wait a couple of months to s

Re: [R] simulate() and glm fits

2007-08-02 Thread Prof Brian Ripley
I only see an "lm" method for simulate, so I think you are getting that by inheritance. It is inappropriate and you do need to add a "glm" method. As ?simulate says fairly clearly that there is only an "lm" method in base R, I don't think this is a bug, just user optimism. On Thu, 2 Aug 2007,

Re: [R] lasso/lars error

2007-08-02 Thread Prof Brian Ripley
This looks like a question for the package maintainer (as the posting guide said), as was the one you referred to. Please bear in mind > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. Anyone who i

Re: [R] passing args to R CMD BATCH in win 2000

2007-08-02 Thread Prof Brian Ripley
On Thu, 2 Aug 2007, Uwe Ligges wrote: > > > [EMAIL PROTECTED] wrote: >> Hello and sorry to bother. >> >> Please help. >> I searched the archives but could not find out why --args is being ignored >> on Windows 2000. > > > That does not work with R CMD BATCH, AFAIK. In fact, you want to use: > > Rt

Re: [R] aggregate.data.frame - prevent conversion to factors? show statistics for NA values of "by" variable?

2007-07-31 Thread Prof Brian Ripley
The behaviour has been changed in the R-devel version of R, so the 'by' columns are not converted to factors. On Tue, 31 Jul 2007, Thomas Pujol wrote: > I have a two question regarding the "aggregate.data.frame" method of the > "aggregate" function. > > My situation: > > a. My "x" variable is a

Re: [R] italic greek symbols

2007-07-31 Thread Prof Brian Ripley
a UTF-8 locale (and I believe that is all there are on MacOS, but of course it uses non-standard locale names: our MacOS box seems to be switched off so I cannot check easily). > > Cheers, > Hank > > On Jul 31, 2007, at 3:00 PM, Prof Brian Ripley wrote: > >> On Tue, 31 Jul 2

Re: [R] contrasts error message in lm

2007-07-31 Thread Prof Brian Ripley
On Tue, 31 Jul 2007, A Serebrenik wrote: > Dear all, > > I would like to find a linear regression model for a rather large dataset > (27 independent variables). However, when I run lm the following error is > reported: > >> out <- lm(Result ~ AppealA + AppealsB + AppealC + AppealD + AppealE + > Ap

Re: [R] italic greek symbols

2007-07-31 Thread Prof Brian Ripley
On Tue, 31 Jul 2007, Martin Henry H. Stevens wrote: > Hi Folks, > I am using R 2.5.1 on a Mac OS X 10.4.9, via ESS. > > I would like to try to get an italic mu onto a plot axis label. I > note that in a previous email, > (Thu, 4 May 2006 19:41:41 +0100 (BST)), Brian Ripley wrote, > "There is no it

Re: [R] Q: obtaining non-transparent background in png

2007-07-31 Thread Prof Brian Ripley
You are *copying* the plot, and that means copying the background too (it *is* part of the plot). Almost certainly the plot you are copying had a transparent background: that is the default for X11. All the confusion seems to be over misreadings of this. On Tue, 31 Jul 2007, Gavin Simpson wrote

Re: [R] line widths of plotting symbols in the lattice

2007-07-31 Thread Prof Brian Ripley
On Tue, 31 Jul 2007, Uwe Ligges wrote: > > > Stephen Tucker wrote: >> Dear List, >> >> Sorry, this is very simple but I can't seem to find any information regarding >> line widths of plotting symbols in the lattice package. >> >> For instance, in traditional graphics: >> >>> plot(1:10,lwd=3) >>> p

Re: [R] Plotting a smooth curve from predict

2007-07-31 Thread Prof Brian Ripley
You are using fitted() implicitly here, so you are not plotting a smooth curve but a set of fitted values. You need to really predict at a suitable range of data points, e.g. xx <- seq(1, 10, len=500) plot(xx, predict(w, list(x=xx)), type="l") BTW, why are you not using poly()? On Tue, 31 Ju

Re: [R] Matrix Multiplication, Floating-Point, etc.

2007-07-31 Thread Prof Brian Ripley
On Mon, 30 Jul 2007, Moshe Olshansky wrote: > After multiplication by 10 you get 6*8 = 48 - the > result is an exact machine number so there is no > roundoff, while 0.6*0.8 = 0.48, where neither of the 3 > numbers (0.6, 0.8, 0.48) is an exact machine mumber. > However, (-0.6)*0.8 should be equal E

Re: [R] Reading T and F as strings

2007-07-31 Thread Prof Brian Ripley
On Mon, 30 Jul 2007, David Rowntree wrote: > Hi, > > I am trying to read a series of stock tickers into R, and I'm running > into trouble with Ford (F) and the old AT&T (T). Read.table seems to > interpret these as boolean values instead of strings, even when I set > colColumns to a vector of cha

Re: [R] deseasonalizing package?

2007-07-31 Thread Prof Brian Ripley
On Mon, 30 Jul 2007, Sherri Heck wrote: > Hi all- > > I am looking for a way to calculate and subtract out a seasonal trend > (i.e. carbon dioxide). Does anyone know if there is a package that does > something similar? Yes, package 'stats'. Try help.search("seasonal"). -- Brian D. Ripley,

Re: [R] Prompt comes too late

2007-07-30 Thread Prof Brian Ripley
Using print() for a 'prompt' is rather unusual: people normally use message() or cat(). You haven't told us your OS, but if this is Windows, see rw-FAQ Q7.1. On Sun, 29 Jul 2007, Ralf Finne wrote: > Hi R fans > > I am trying to make a program to ask the user to choose data file: > > print("Cho

Re: [R] Creating an instance of R from MS Access?

2007-07-30 Thread Prof Brian Ripley
On Mon, 30 Jul 2007, D L McArthur wrote: > Felipe Carrillo yahoo.com> writes: >> Hi all: >> Does anyone know if it's at all possible to create a >> connection to R from MS access? ... >> > See function "odbcConnectAccess" in package RODBC. That is the other way, from R to an Access database. I

Re: [R] how to install rattle() in R-GUI2.5.1

2007-07-30 Thread Prof Brian Ripley
1) What is R-GUI? And what is R-GUI2.4.4? 2) In R 2.5.1 under Windows this works if you choose a properly populated CRAN mirror. I think http://cran.au.r-project.org has access problems. On Tue, 31 Jul 2007, j.joshua thomas wrote: > Dear Group, > > I have installed R-GUI 2.5.1, thereby i trie

Re: [R] text() and vector arguments like adj

2007-07-30 Thread Prof Brian Ripley
On Sat, 28 Jul 2007, [EMAIL PROTECTED] wrote: > Hello, > > I remarked that the function > ## Default S3 method: > text (x, y = NULL, labels = seq(along = x), adj = NULL,pos = NULL, offset = > 0.5, vfont = NULL,cex = 1, col = NULL, font = NULL, ...) > > accepts vectors of arguments (of the same le

Re: [R] getting the name of variables passed to a function

2007-07-30 Thread Prof Brian Ripley
I would start from match.call(expand.dots=TRUE) which has done the hard work for you. On Fri, 27 Jul 2007, Horace Tso wrote: > Folks, > > I've entered into an R programming territory I'm not very familiar with, > thus this probably very elementary question concerning the mechanic of a > functi

Re: [R] random number generator in batch jobs

2007-07-30 Thread Prof Brian Ripley
Have you read the help page? Initially, there is no seed; a new one is created from the current time when one is required. Hence, different sessions will give different simulation results, by default. Thus if you choose to launch processes on different machines at the same ti

Re: [R] apply, lapply and data.frame in R 2.5

2007-07-30 Thread Prof Brian Ripley
On Mon, 30 Jul 2007, jiho wrote: > Hello everyone, > > A recent (in 2.5 I suspect) change in R is giving me trouble. I want > to apply a function (tolower) to all the columns of a data.frame and > get a data.frame in return. > Currently, on a data.frame, both apply (for arrays) and lapply (for > l

Re: [R] Slightly OT - use of R

2007-07-30 Thread Prof Brian Ripley
On Mon, 30 Jul 2007, [EMAIL PROTECTED] wrote: > On 30-Jul-07 08:28:15, John Logsdon wrote: >> I am trying to get a measure of how R compares in usage as a >> statistical platform compared to other software. I would guess >> it is the most widely used among statisticians at least by >> virtue of it

Re: [R] offset in coxph

2007-07-26 Thread Prof Brian Ripley
Removed? That it was ever there is not my recollection and seems very unlikely given that survival is ported from S where glm() does not have it, As far as I know it has only ever been in glm() and lm() in R: the way which is described in the White Book is to use the offset() function, and th

Re: [R] R CMD check sh: line 1: make: command not found

2007-07-26 Thread Prof Brian Ripley
On Thu, 26 Jul 2007, David Peltier wrote: > hello, > > I am using R 2.5.0 under OS X. > > I am having " sh: line 1: make: command not found" error message when > I run " R CMD check " : > > Any help would be appreciated. Well, that is easy: 'make' is missing. It should be there in the OS, so yo

Re: [R] Problem installing tseries package

2007-07-26 Thread Prof Brian Ripley
On Thu, 26 Jul 2007, Michael Cassin wrote: > Hi, > > I'm running R 2.4.1 on Fedora Core 6 and am unable to install the tseries > package. I've resolved a few problems getting to this point, by running a > yum update, installing the gcc-gfortran dependency, but now I'm stuck. > Could someone pleas

Re: [R] Rgraphviz and R 2.5.1 entry point Rf_allocString could not be located

2007-07-25 Thread Prof Brian Ripley
On Wed, 25 Jul 2007, My Coyne wrote: > Dear R-Helpers > > In R 2.5.1, the command library(Rgraphviz) fails on my Windows (XP SP2) > system with error popup "The procedure entry point Rf_allocString could not > be located in the dynamic link library R.dll". > > Thanks in advance for any suggestion

Re: [R] Strange warning in summary.lm

2007-07-25 Thread Prof Brian Ripley
On Wed, 25 Jul 2007, ONKELINX, Thierry wrote: >> -Oorspronkelijk bericht- >> Van: Prof Brian Ripley [mailto:[EMAIL PROTECTED] >> Verzonden: woensdag 25 juli 2007 12:20 >> Aan: ONKELINX, Thierry >> CC: r-help@stat.math.ethz.ch >> Onderwerp: Re: [R] St

Re: [R] Strange warning in summary.lm

2007-07-25 Thread Prof Brian Ripley
On Wed, 25 Jul 2007, ONKELINX, Thierry wrote: > Dear Peter, Uwe and Brian, > > I've found some more problems with options(OutDec = ","). > > 1) as.numeric yields NA where it shouldn't It should: where does it say otherwise? OutDec affects output, only. > >> z <- c("12", "12,34", "12.34") >> opt

Re: [R] Using lmer with huge amount of data

2007-07-24 Thread Prof Brian Ripley
I think I am missing something here: how do you make this 'huge' and 'gigantic'? You have not told us how many subjects you have, but in imaging experiments it is usually no more than 50 and often less. For each subject you have 3 x 30,000 responses plus an age. That is under 1Mb of data per

Re: [R] Using lmer with huge amount of data

2007-07-24 Thread Prof Brian Ripley
On Tue, 24 Jul 2007, Gang Chen wrote: > Thank you very much for the response, Prof. Ripley. > > >> I think I am missing something here: how do you make this 'huge' and >> 'gigantic'? You have not told us how many subjects you have, but in >> imaging experiments it is usually no more than 50 and

Re: [R] persp and greek symbols in the axes labels

2007-07-24 Thread Prof Brian Ripley
On Tue, 24 Jul 2007, Stephen Tucker wrote: I don't know why it doesn't work but I think people generally recommend that It has never been implemented, and I believe the main reason is that the labels are plotted at an angle other than a multiple of 90 degrees. Not all devices can do that, a

Re: [R] function optimization: reducing the computing time

2007-07-24 Thread Prof Brian Ripley
You need to make use of the profiling methods described in 'Writing R Exensions'. My machine is about 4x faster than yours: I get Each sample represents 0.02 seconds. Total run time: 62.08041 seconds. Total seconds: time spent in function and callees. Self seconds: time spent in functio

Re: [R] extension of rnormp package

2007-07-23 Thread Prof Brian Ripley
On Mon, 23 Jul 2007, Iwona Szyd?owska wrote: > Hello, > I would like to ask You, how to generate random numbers from an > exponential power family with a shape parameter p less than 1(p->0). I > found the rnormp package, which can generate numbers from this > distribution, but only for paramet

Re: [R] Cluster prediction from factor/numeric datasets

2007-07-23 Thread Prof Brian Ripley
You can't do Discrimnant Analysis without a quadratic metric in a Euclidean space. 'Scott Bearer' explicitly does not want to assume that sort of distance measure. I am not sure how he used Agnes to form 20 clusters: it forms a hierarchical clustering, so it really is not possible to predict f

Re: [R] nnet 10-fold cross-validation

2007-07-23 Thread Prof Brian Ripley
Please read the documentation. nnet() is support software for a book, and that has explicit examples of this, which you will find in the scripts of the VR bundle (but I don't expect them to be comprehensible without the book). On Mon, 23 Jul 2007, S.O. Nyangoma wrote: > Hi > It clear that to

Re: [R] doubt about options(graphics.record=T)

2007-07-23 Thread Prof Brian Ripley
On Mon, 23 Jul 2007, terra wrote: >>> Hi all, >>> >>> I've been using R under WindowsXP. >>> >>> So, where the R stores the graphic archives (don't saved) if I use the >>> option >>> options(graphics.record=T) inside of Rprofile.site file? >> >> The relevant help file (?windows) does tell you:

Re: [R] cmdscale question

2007-07-23 Thread Prof Brian Ripley
Why not do your homework instead of sending the same message three times? The references on the help page (especially Cox & Cox) will explain to you how scaling works on dissimilarities. There are better alternatives for non-Euclidean dissimilarities: see MASS (the book) and its supporting soft

Re: [R] doubt about options(graphics.record=T)

2007-07-23 Thread Prof Brian Ripley
On Mon, 23 Jul 2007, terra wrote: > Hi all, > > I've been using R under WindowsXP. > > So, where the R stores the graphic archives (don't saved) if I use the option > options(graphics.record=T) inside of Rprofile.site file? The relevant help file (?windows) does tell you: please read it. -- Bri

Re: [R] Error using Rd2dvi on OSX

2007-07-22 Thread Prof Brian Ripley
Please use R-sig-mac for questions about MacOS X. pdflatex is not in your path, if it is installed. As makeindex appears to be in your path, I suspect that pdflatex is not installed. R CMD Rd2dvi man will use latex rather than pdflatex, and will help confirm this. On Mon, 23 Jul 2007, Gattuso

Re: [R] mtext formatting

2007-07-20 Thread Prof Brian Ripley
On Fri, 20 Jul 2007, Todd Remund wrote: > I am trying to create a formatted title using mtext. Using the format > function I define the spacing for a specific part of the text then paste > these together, when I put this in mtext it does not keep the spacing I > defined. Here is an example. > > x

Re: [R] R CMD SHLIB problem [make: *** No rule to make target ]

2007-07-20 Thread Prof Brian Ripley
Please do *not* use paths in your C code, especially those with spaces in. (The rw-FAQ did advise you not to install into a path with spaces in if you wanted to do development work.) The path is not needed for system include files (you used <>) and is likely the problem. And please do not pos

Re: [R] cv.glm error function

2007-07-20 Thread Prof Brian Ripley
On Fri, 20 Jul 2007, Rachel Davidson wrote: > I have a couple quick questions about the use of cv.glm for > cross-validation. > > 1. If we have a Poisson GLM with counts Y~Poisson(mu) and > ln(mu)=beta0+beta1*x1+..., is the prediction error (delta) that is output > from cv.glm provided in terms of

Re: [R] RDCOM and R versions

2007-07-20 Thread Prof Brian Ripley
There is a separate list for support of RDCOM at http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l The answer to your question depends a bit how you are making use of RDCOM: the R interface is via rproxy.dll, and that recognizes R_HOME. This is also mentioned in the installation instruct

Re: [R] Strange warning in summary.lm

2007-07-19 Thread Prof Brian Ripley
On Thu, 19 Jul 2007, Peter Dalgaard wrote: > Prof Brian Ripley wrote: >> On Thu, 19 Jul 2007, Peter Dalgaard wrote: >> >> >>> ONKELINX, Thierry wrote: >>> >>>> The problem also exists in a clean workspace. But I've found the >>>&

Re: [R] Strange warning in summary.lm

2007-07-19 Thread Prof Brian Ripley
On Thu, 19 Jul 2007, Peter Dalgaard wrote: > ONKELINX, Thierry wrote: >> The problem also exists in a clean workspace. But I've found the >> troublemaker. I had set options(OutDec = ","). Resetting this to >> options(OutDec = ".") solved the problem. >> >> Thanks, >> >> Thierry >> > Oups. That sou

Re: [R] write.table linebreaks

2007-07-19 Thread Prof Brian Ripley
What do you think the 'eol' argument to write.table is for? I don't have a Mac to hand, but eol='\r' does this on Linux and Windows. On Thu, 19 Jul 2007, Birgit Lemcke wrote: Hello R users, I am a newby using R 2.5.0 on a Apple Power Book G4 with Mac OS X 10.4.10. when I use the write.table

Re: [R] mfrow is ignored by some plots

2007-07-19 Thread Prof Brian Ripley
I'd ask the plotrix maintainer to fix his code! radial.plot saves and restores all the par() values, including mfrow and mfg. When you do par(mfrow=c(2,2)) the plot position is reset to the bottom right, and the next plot will advance to the top left (but par(new=TRUE) negates that). Please re

Re: [R] help with heatmap - how to remove annoying "X" before numeric values?

2007-07-18 Thread Prof Brian Ripley
read.table('temp.txt', check.names = FALSE) would be easier (and more general, since make.names can do more than prepend an 'X'). On Wed, 18 Jul 2007, Moshe Olshansky wrote: > Hi Suzanne, > > My solution (which I am sure is not the best) would > be: > >> heat <- read.table('temp.txt') >> heat >

Re: [R] [R-sig-DB] RODBC on Oracle DB

2007-07-18 Thread Prof Brian Ripley
0ORESTE S_TYP_ENSEIGNEMENTTABLE ... sqlQuery(essai, "select * from S_TYP_COLLEGES") [1] "[RODBC] ERROR: Could not SQLExecDirect" [2] "42S02 942 [Oracle][ODBC][Ora]ORA-00942: Table ou vue inexistante\n" I have also tried the essai2

Re: [R] difficulties with "setMethod"

2007-07-17 Thread Prof Brian Ripley
On Tue, 17 Jul 2007, Nils Rüfenacht wrote: Dear all! I do definetley have some difficulties. Here is my code: setMethod("write", + signature(object = "KMatrix", path = "character"), + function(object,path){ + write.table([EMAIL PROTECTED],path,row.names=FA

Re: [R] (a) R capacity and (b) sorting cases in R

2007-07-17 Thread Prof Brian Ripley
On Tue, 17 Jul 2007, Dimitri Liakhovitski wrote: > 1. I have a .txt file that has no more than 10 variables and about 3.5 > MILLION cases. > Can R handle so many cases or should I not even try? That's only about 300Mb. On a >=4Gb RAM machine it should be fine, especially if you read it in caref

Re: [R] LSD, HSD,...

2007-07-17 Thread Prof Brian Ripley
On Tue, 17 Jul 2007, John Maindonald wrote: > Stepwise regression variable selection > methods make multiple post hoc comparisons. The Some do, but step() (the only way offered in base R) does not test at all. > number of comparisons may be very large, vastly more > than the half-dozen post-ho

Re: [R] Errors in data frames from read.table

2007-07-16 Thread Prof Brian Ripley
On Mon, 16 Jul 2007, Pat Carroll wrote: > Hello, all. > > I am working on a project with a large (~350Mb, about 5800 rows) > insurance claims dataset. It was supplied in a tilde(~)-delimited > format. I imported it into a data frame in R by setting memory.limit to > maximum (4Gb) for my compute

Re: [R] How to load a dataset

2007-07-16 Thread Prof Brian Ripley
See ?Startup. Rprofile.site (sic) is for site-wide settimgs, not On Sun, 15 Jul 2007, Felipe Carrillo wrote: > Hi: > Since I didn't get any answers, I'll refresh my question. What you needed to do was to read the posting guide. As you are _still_ sending HTML mail, you clearly have not yet d

Re: [R] NNET re-building the model

2007-07-15 Thread Prof Brian Ripley
This is almost unreadable (is your space bar broken?) but you seem to be missing the non-linearity of the hidden units. The definition is in the book nnet (sic) supports, in a layout I cannot reproduce in plain text. On Mon, 16 Jul 2007, dos Reis, Marlon wrote: > Hello, > I've been working wit

Re: [R] Extracting elements from a list

2007-07-14 Thread Prof Brian Ripley
The golden rule is that [[ ]] only returns one element: sapply(Lst, "[", 1, 1) is probably what you want. On Sat, 14 Jul 2007, 'Forest Floor' aka 'rhago' aka 'Jeff' aka 'R User confused about his identity' wrote: > Hi, > > I would love an easy way to extract elements from a list. > > For examp

Re: [R] trouble compiling Hmisc package

2007-07-14 Thread Prof Brian Ripley
On Fri, 13 Jul 2007, [EMAIL PROTECTED] wrote: > Hi: > > We're trying to install the Hmisc package on a Solaris 9 machine. But Solaris 9 does not come with a compiler called 'g95', as far as I know. So what is this? The underlying problem is that Hmisc is not written in standard Fortran. DO ..

Re: [R] unixtime conversion

2007-07-13 Thread Prof Brian Ripley
On Sat, 14 Jul 2007, Patrick Drechsler wrote: > Hi, > > is there an R function to convert unixtime to one of the R time > formats (using chron or POSIXct)? > > Example data: > > unixtime year month day hour > 1183377301 2007 7 2 13 > > I would like to only use t

Re: [R] Installation of a Package

2007-07-13 Thread Prof Brian Ripley
Do you really have repeated.gz? Lindsey usually packs his packages with the .tgz extension, e.g. at http://popgen.unimaas.nl/~jlindsey/rcode.html You need to get repeated.tgz and rmutil.tgz and use tar zxf rmutil.tgz tar zxf repeated.tgz R CMD INSTALL rmutil repeated Optional (but highly desi

Re: [R] charset in graphics

2007-07-13 Thread Prof Brian Ripley
On Fri, 13 Jul 2007, Peter Dalgaard wrote: > Prof Brian Ripley wrote: >> On Fri, 13 Jul 2007, Peter Dalgaard wrote: >> >>> The correct incantation seems to be >>> >>> postscript(font="URWHelvetica", encoding="ISOLatin7") >>&

Re: [R] charset in graphics

2007-07-13 Thread Prof Brian Ripley
On Fri, 13 Jul 2007, Peter Dalgaard wrote: > Donatas G. wrote: >> How do I make Lithuanian characters display correctly in R graphics? >> >> Instead of the special characters for Lithuanian language I get question >> marks... >> >> I use Ubuntu Feisty, the locale is utf-8 ... >> >> Do I need to sp

Re: [R] filling a list faster

2007-07-13 Thread Prof Brian Ripley
On Fri, 13 Jul 2007, Philippe Grosjean wrote: > If all the data coming from your iterations are numeric (as in your toy > example), why not to use a matrix with one row per iteration? Also, do > preallocate the matrix and do not add row or column names before the end > of the calculation. Somethin

Re: [R] standardization

2007-07-13 Thread Prof Brian Ripley
On Fri, 13 Jul 2007, David Barron wrote: > Try having a look at the scale and sweep functions. sweep applies to arrays, not data frames, and scale converts to a matrix. For a data frame df2 <- df1 df2[] <- lapply(df1, function(x) {r <- range(x, na.rm=TRUE); (x

Re: [R] charset in graphics

2007-07-13 Thread Prof Brian Ripley
On Fri, 13 Jul 2007, Donatas G. wrote: > How do I make Lithuanian characters display correctly in R graphics? > > Instead of the special characters for Lithuanian language I get question > marks... > > I use Ubuntu Feisty, the locale is utf-8 ... > > Do I need to specify somewhere the locale for R

Re: [R] RODBC Access

2007-07-13 Thread Prof Brian Ripley
This is an ODBC issue, not an R issue. Use a command-line ODBC client to find a suitable SQL invocation to retrieve the data, and run that via sqlQuery. (It might be a quoting issue: Access is not using standard SQL.) On Thu, 12 Jul 2007, Patrick Gonin wrote: > Dear R users, > > I am trying t

Re: [R] JRI problem on 64bit Linux

2007-07-12 Thread Prof Brian Ripley
Our experience (and that of several others) is that you need Java 1.6 on x86_64 Linux for any of the JNI-using R packages to work correctly. E.g. the CRAN check machine is using 1.6. On Thu, 12 Jul 2007, chuckanut wrote: > Sorry if this isn't the correct list, but I couldn't find any mailing >

Re: [R] Stepwise GLM selection by LRT?

2007-07-12 Thread Prof Brian Ripley
On Thu, 12 Jul 2007, Lutz Ph. Breitling wrote: > Thank you very much for the prompt reply. Seems like I had not fully > understood what the k-parameter to stepAIC is doing. > Your suggested approach looks indeed fine to me, actually I do not > quite understand why you say that it's only an approxi

Re: [R] eMail results out of R

2007-07-12 Thread Prof Brian Ripley
On Thu, 12 Jul 2007, Duncan Murdoch wrote: > On 7/12/2007 9:52 AM, [EMAIL PROTECTED] wrote: >> Hi everyone, >> >> I did my homework and read the posting guideline :-) But failed to follow it, and not telling us the OS makes this very much harder to answer adequately. >> I want to eMail the resu

Re: [R] how to get the p-values from an lm function ?

2007-07-12 Thread Prof Brian Ripley
On Thu, 12 Jul 2007, hadley wickham wrote: > On 7/12/07, Benoit Chemineau <[EMAIL PROTECTED]> wrote: >> Hi, dear R-users, >> >> I am computing a liner regression by rating category using the 'by' function >> as stated below: >> >> tmp <- by(projet, rating, function(x) lm(defaults ~ CGDP+CSAVE+SP50

Re: [R] Subsetting problem

2007-07-11 Thread Prof Brian Ripley
You have three levels of factor 'ippo' and data on two. That is not a two-sample problem, as the error message says. Try IPPOBIS$ippo <- IPPOBIS$ippo[drop=TRUE] And please use an informative subject line (see the posting guide). On Thu, 12 Jul 2007, Cressoni, Massimo (NIH/NHLBI) [F] wrote: >

Re: [R] make error R-5.1 on sun solaris

2007-07-11 Thread Prof Brian Ripley
You are asked for a C99 compiler and configure normally finds one: mixing declarations and code is valid C99. Unless something has been done with environment variables (e.g. in config.site) this gcc is very old. configure should come up with 'gcc -std=gnu99'. Re-ordering the code will help (b

Re: [R] Warning message: cannot create HTML package index

2007-07-11 Thread Prof Brian Ripley
On Fri, 6 Jul 2007, Peter Dalgaard wrote: > Leo wrote: >> On 06/07/2007, Prof Brian Ripley wrote: >> >>> On Fri, 6 Jul 2007, Leo wrote: >>> >>> >>>> I have set R_LIBS=~/R_lib as I don't have root access. >>>> &g

[R] Improved Windows Vista compatibility

2007-07-11 Thread Prof Brian Ripley
Duncan Murdoch and I have been working on Vista compatibility. The first build of R-2.5.1-win32.exe was built with a version of the installer that had some compatibility issues, and it has been rebuilt under the latest version. What now happens is that if you want to install R in an adminstrat

Re: [R] Window Version for permtest

2007-07-10 Thread Prof Brian Ripley
On Wed, 11 Jul 2007, amna khan wrote: > Hi Sir > > There is no Window Binary versin of package permtest.Please provide > information in this regard. > See http://cran.r-project.org/bin/windows/contrib/2.5/check/permtest-check.log [Sending this once was quite sufficient.] -- Brian D. Ripley,

Re: [R] Repeated Measure different results to spss

2007-07-10 Thread Prof Brian Ripley
We don't know what you are after (or what you did in SPSS), but > dat <- read.table("mb2.dat", header=TRUE, colClasses=c(rep("factor",3), "double")) > summary(aov(Score ~ Group * Task + Error(Id), dat)) would seem to be the sort of thing your description indicates. If you te

Re: [R] character string to name

2007-07-10 Thread Prof Brian Ripley
On Mon, 9 Jul 2007, Thomas Lumley wrote: > On Mon, 9 Jul 2007, Jim Lemon wrote: > >> Hi folks, >> >> I thought I recalled a request for turning a character string into an >> object name as in: > > Yes. It's a FAQ. There is an FAQ about turning character strings into objects (Q7.21), but this see

Re: [R] factanal frustration!

2007-07-09 Thread Prof Brian Ripley
factanal() does not have an argument method="mle". Trying to do factor analysis on 1000 columns is quite unrealistic, but you may find rescaling the matrix helps. On Mon, 9 Jul 2007, Talbot Katz wrote: > Hi. > > It seems that nearly every time I try to use factanal I get the following > respons

Re: [R] using the function unique(), but asking it to ignore a column of a data.frame

2007-07-09 Thread Prof Brian Ripley
On Mon, 9 Jul 2007, Andrew Yee wrote: > Thanks. But in this specific case, I would like the output to include > all three columns, including the "ignored" column (in this case, I'd > like it to ignore column a). sample.data.frame[!duplicated(sample.data.frame[-1]), ] (index to exclude columns a

Re: [R] rpart weight prior

2007-07-09 Thread Prof Brian Ripley
On Sun, 8 Jul 2007, Aurélie Davranche wrote: Hi! Could you please explain the difference between "prior" and "weight" in rpart? It seems to be the same. But in this case why including a weight option in the latest versions? For an unbalanced sampling what is the best to use : weight, prior o

Re: [R] how to revert to an older limma version?

2007-07-08 Thread Prof Brian Ripley
That sounds as if you are running in a UTF-8 locale and your colleague is not. We do ask for the results of sessionInfo(), which would have helped. I suggest you try an English 8-bit locale and see what happens. On Sun, 8 Jul 2007, Maya Bercovich wrote: > Dear Sirs, > How can I revert to an ol

Re: [R] access to 'formula' terms in a user function

2007-07-06 Thread Prof Brian Ripley
On Fri, 6 Jul 2007, Eric Peterson wrote: > This is probably buried somewhere in the R help archives, but I've been > unable to find it, so perhaps the keywords I use here will help bring the > topic to the surface more easily for future users. > > I want to write my own modeling function (ultimate

Re: [R] .Rprofile: Set package path for downloads

2007-07-06 Thread Prof Brian Ripley
On Fri, 6 Jul 2007, Duncan Murdoch wrote: > On 7/6/2007 8:04 AM, Will wrote: >> Hi, >> >> I'd like to configure my .Rprofile so that additional packages are >> installed and loaded from my personal package repository (let's say >> d:/R/MyPackages/). I am working with R 2.4.1 under Windows XP. >> H

Re: [R] Warning message: cannot create HTML package index

2007-07-06 Thread Prof Brian Ripley
On Fri, 6 Jul 2007, Leo wrote: > I have set R_LIBS=~/R_lib as I don't have root access. > > The following message shown up every time after installing a package: > > .. > The downloaded packages are in > /tmp/RtmpBoIPoz/downloaded_packages > Warning message: > cannot create HTML pack

Re: [R] possible bug in ggplot2 v0.5.2???

2007-07-05 Thread Prof Brian Ripley
On Wed, 4 Jul 2007, hadley wickham wrote: > On 7/4/07, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: >> On Tue, 3 Jul 2007, hadley wickham wrote: >> >> > Hi Stephane, >> > >> > The problem is that the windows graphics device doesn't support

Re: [R] pgup/pgdown in R Graphics Window under Linux

2007-07-05 Thread Prof Brian Ripley
On Thu, 5 Jul 2007, Paul Matthias Diderichsen wrote: > Dear S-users. This is the help forum for R users > This should be an easy one: How do I change pages on an X11 graphics > device under linux? > > I thought that the page-up/page-down keys were supposed to do the trick, It is baffling,

Re: [R] unexpected result in function valuation

2007-07-05 Thread Prof Brian Ripley
What value should your formula give when x is a multiple of 2*pi? You seem to believe 9 is correct but in fact NaN is. Element 701 of x is approximately but not exactly 2*pi: on my system it is about 7*.Machine$double.eps different. You cannot expect sin(N*pi) to be exactly zero for N != 0. O

Re: [R] possible bug in ggplot2 v0.5.2???

2007-07-03 Thread Prof Brian Ripley
On Tue, 3 Jul 2007, hadley wickham wrote: > Hi Stephane, > > The problem is that the windows graphics device doesn't support > transparent colours. You can get around this in two ways: It certainly does! Try col="transparent" (and perhaps consult your dictionary). It was news to me that the w

Re: [R] bug in closing gzfile-opened connections?

2007-07-03 Thread Prof Brian Ripley
Note that the use of read.table() does make a difference. If you did x <- scan(gzfile("xxx.gz"), list("","","")) you would leave an unused connection, and showConnections(all=TRUE) would show this. There is a finite pool of connections, and in general the correct way to use them is con <- gz

Re: [R] exact AIC

2007-07-03 Thread Prof Brian Ripley
On Tue, 3 Jul 2007, Selene Zárate wrote: I am using the stepAIC function on the MASS package that does model selection by exact AIC. I'm not sure what the term 'exact AIC' means, and how it differs from AIC. It doesn't, but there are approximations to AIC in use. This is explained in the bo

Re: [R] What is parameter "display" (windows/grDevices)

2007-07-03 Thread Prof Brian Ripley
On Tue, 3 Jul 2007, Dieter Menne wrote: > In the docs of window/grDevices: Do you mean 'windows' (sic) in package 'grDevices'? > >> All these devices are implemented as windows devices, the _display_ > parameter selects which is actually used.>> > > What is the "display" parameter? The second a

Re: [R] MASS library rob.cov ellipse

2007-07-02 Thread Prof Brian Ripley
On Mon, 2 Jul 2007, Jenifer Larson-Hall wrote: > Hi, > I used to get a really useful graph when I ran the following command > using the MASS library: > >> cov.rob(cbind(dekeyser$AGE,dekeyser$GJTSCORE),cor=T) > > Besides the regular output, a graph appeared that had the classical > correlation and

Re: [R] Problem installing R packages in OpenBSD

2007-07-02 Thread Prof Brian Ripley
1) You are not supposed to have R_HOME set in your environment: that is the job of the R front-end script. 2) R 2.4.1 is obsolete, but I believe the relevant line is . "${R_SHARE_DIR}/sh/dcf.sh"# get_dcf_field() R_SHARE_DIR is set in the R front-end script, so that's where to investigate.

Re: [R] working with R graphics remotely

2007-07-02 Thread Prof Brian Ripley
ease see the help page of the devices you recommended, which did warn about this. > > -Original Message----- > From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] > Sent: maandag 2 juli 2007 7:56 > To: zhihua li > Cc: r-help@stat.math.ethz.ch > Subject: Re: [R] working wi

Re: [R] working with R graphics remotely

2007-07-01 Thread Prof Brian Ripley
You need to forward the X11 window to your local machine, which would need to be running an X server. We do this using Exceed and PUTTY settings, but your sysadmins will be able to help you: it is not a question about R per se. On Mon, 2 Jul 2007, zhihua li wrote: > Hi netters, > > Now I'm co

Re: [R] align() function missing in R ?

2007-06-29 Thread Prof Brian Ripley
he first can also be done via package 'zoo', which is the sort of place I would expect to find this functionality. > > Thanks again, > Markus > > At 03:52 AM 6/29/2007, Prof Brian Ripley wrote: >> On Fri, 29 Jun 2007, Martin Maechler wrote: >> >>> Hi Markus,

Re: [R] embedFonts() and bounding box

2007-06-29 Thread Prof Brian Ripley
As embedFonts creates a new file, the bounding box of the original one is not relevant. (Yes, outfile = file by default, but it is still a new file.) I guess the switches -dDEVICEWIDTHPOINTS=w -dDEVICEHEIGHTPOINTS=h might help to create the new file with the bounding box you want. On Th

Re: [R] align() function missing in R ?

2007-06-29 Thread Prof Brian Ripley
On Fri, 29 Jun 2007, Martin Maechler wrote: > Hi Markus, > > You can't assume that a typical R users knows much about S+. > "R has been beyond S+ for a long time" > {{ :-) :-) please Insightful staff, don't start to jump at me !}} > Even I, as a very long time S and Splus user (of the past: > 19

Re: [R] using self-written functions

2007-06-29 Thread Prof Brian Ripley
One of your home directories on Windows is %HOMEDRIVE%%HOMEPATH% (you do need to give the drive), but only one: see the rw-FAQ. Reading ?file.path will help you not reinvent the wheel. So I think attach(path.expand("~/MMmisc.rda") is far more portable (as well as much more readable). On Thu, 2

Re: [R] : regular expressions: escaping a dot

2007-06-28 Thread Prof Brian Ripley
On Thu, 28 Jun 2007, Peter Dalgaard wrote: > Prof Brian Ripley wrote: >> >> >> This is explained in ?regexp (in the See Also of ?regexpr): >> >> Patterns are described here as they would be printed by 'cat': _do >> remember th

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