Re: [R] Get message "cannot do complex assignments in base namespace" error

2003-12-21 Thread Prof Brian Ripley
Could you 1) Try with --vanilla. 2) Show us a small example. In general user code should not be assigning in base (are you using <<- by any chance?), but there is no difference when redirecting input in Rterm as to where code is run. (Your command-line flags may well affect it, though.) On Sat

Re: [R] Get message "cannot do complex assignments in base namespace" error

2003-12-21 Thread Prof Brian Ripley
On Sun, 21 Dec 2003, Thon de Boer wrote: > Thanks for the fast reply. > > When I use --vanilla for Rterm.exe (Using windows > here) I do not get the problem anymore, so that solved > half my problems. Thanks (I had used --slave --no-save > --no-restore) > > But I seem to have the problem of gett

Re: [R] Get message "cannot do complex assignments in base namespace"error

2003-12-21 Thread Prof Brian Ripley
On Sun, 21 Dec 2003, Uwe Ligges wrote: > And that's the point! Don't use Rprofile to execute scripts, because > everything assigned in there will be loaded into base on startup. (See > ?Startup) > For running scripts I'd recommend to use Rcmd BATCH (you will need Perl, > though), but it's also pos

Re: [R] Solaris 8

2003-02-18 Thread Prof Brian Ripley
Yes, several ways. On Tue, 18 Feb 2003, Webster West wrote: > Has anyone been able to install R 1.6.2 under Solaris > 8? -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 2

Re: [R] PL/R - R procedural language handler for PostgreSQL

2003-02-18 Thread Prof Brian Ripley
On Tue, 18 Feb 2003, Joe Conway wrote: > [EMAIL PROTECTED] wrote: > > But R does not build under Cygwin (last time I looked and I would be > > surprised if it would without a lot of tinkering), and the Windows port of > > R does not have libR.so but a different (and much older) mechanism using > >

Re: [R] Pretty onscreen plots?

2003-02-18 Thread Prof Brian Ripley
I use PDF and make my presentations in PDF using pdflatex, or even in postscript and Distiller. That way the final document has vector graphics, and bitmapping only occurs at the very last minute, when the projector resolution is known. In theory win.metafile should do the same for powerpoint, bu

Re: [R] Testing for randomness

2003-03-28 Thread Prof. Brian Ripley
Autocorrelations are by definition linear. Do you mean non-linear dependencies in a bivariate scatterplot? There are many such tests, but R is not the plase to find them. Pierre l'Ecuyer has a test suite, and George Marsaglia's DIEHARD can still be found. On Fri, 28 Mar 2003 [EMAIL PROTECTE

Re: [R] ccf

2003-03-31 Thread Prof. Brian Ripley
On Mon, 31 Mar 2003, Martin Wegmann wrote: > Hello, > > I am looking for a command for cross correlation like ccf but which > computes the cross-correlation of more than two (in my case 1800) > series. acf on multiple time series does this. Note that you can always do it pairwise via ccf. I ve

Re: [R] Using R2HTML

2003-03-31 Thread Prof. Brian Ripley
HTMLplot is documented to Exports the active graphic to a JPEG or GIF file and add it to a target HTML output, by writing the tag. but the code uses dev.print which is intended to *printing* from a screen device. Please send report to the author of R2HTML: he probably should be using

Re: [R] rbind data.frames with character vectors?

2003-03-31 Thread Prof. Brian Ripley
That is not how you are intended to put character strings in data frames in S. Rather, there is A <- data.frame(a=1, b=I("A")) B <- data.frame(a=2, b=I("B")) AB <- rbind(A,B) etc works (at least in R-devel) Using $ on data frame is underhand, and avoids some of the consistency checks. We are

Re: [R] Scripting with an external editor

2003-03-31 Thread Prof. Brian Ripley
On Mon, 31 Mar 2003 [EMAIL PROTECTED] wrote: > In a message dated 3/31/03 6:32:45 AM Eastern Standard Time, > [EMAIL PROTECTED] writes: > > > AT wrote: > > >If you are not trying to write R editing functionality for an editor > > >other than (X)Emacs or WinEdt, what you describe below is already

Re: [R] integer overflow error problem

2003-03-31 Thread Prof. Brian Ripley
On Tue, 1 Apr 2003, Robin Hankin wrote: [...] > Now _why_ does colon have this behaviour, when it seems that very few > other functions return integers; help(":") gives no clue to the > motivation. Splus does the same thing (apparently), so there must be > some rationale. What is it? If you me

Re: [R] model.tables limitations

2003-03-31 Thread Prof. Brian Ripley
On Tue, 1 Apr 2003, Patrick Connolly wrote: > There is a warning in the help file for model.tables > > Warning: > > The implementation is incomplete, and only the simpler cases have > been tested thoroughly. > > Weighted `aov' fits are not supported. > > Could it be that 'simple

Re: [R] Convert char vector to numeric table

2003-03-31 Thread Prof. Brian Ripley
Use a file() connection (no argument) or a textConnection. file() is a powerful tool, often overlooked. On Mon, 31 Mar 2003, Nurnberg-LaZerte wrote: > I'm a great fan of read.table(), but this time the data had a lot of cruft. So I > used readLines() and editted the char vector to eventually ge

Re: [R] RODBC, freetds, and MS SQL Server

2003-03-31 Thread Prof. Brian Ripley
?odbcConnect has believeNRows: logical. Is the number of rows returned by the ODBC connection believable? Not true for Oracle, apparently. Try setting it to FALSE, as it looks like your driver is broken. I am not wure why people keep ignoring this parameter in RODBC On Mon, 31

Re: [R] using Rmath standalone

2003-03-31 Thread Prof. Brian Ripley
On Tue, 1 Apr 2003, Daniel Falster wrote: > Hi, > I am a c/c++ programmer attempting to utilise the Rmath library (looks VERY useful). I have downloaded the Rsource and compiled the library as recommened (compiled on windows 98 using the cygwin environment). We do NOT recommend a Cygwin enviro

Re: [R] How to list functions in a library?

2003-04-01 Thread Prof. Brian Ripley
On Tue, 1 Apr 2003, Ko-Kang Kevin Wang wrote: > Which library is it? If it is a proper R library and has been properly > installed, I think you should be able to do something like: > library(help = ts) # Get the list of functions in ts package > > In fact that will also show some information

Re: [R] RE: Computer specifications

2003-04-01 Thread Prof Brian Ripley
Well, R likes lots of memory, so a 64-bit system with say 16Gb RAM and at least two processors would be pretty good. (And is: I've used such a Compaq Alpha system.) For most purposes a dual Athlon or Xeon PC running Linux with at least 1Gb of memory works pretty well. On Tue, 1 Apr 2003, Vera

Re: [R] Nlminb equivalent function in R?

2003-04-01 Thread Prof Brian Ripley
On Tue, 1 Apr 2003, Beat Huggler wrote: > I need some help. Currently, I'm translating a code from Splus to R. In Splus code there is the function nlminb (Nonlinear Minimization subject to Box Constraints) used. Does anybody know an equivalent function in R? ?optim -- Brian D. Ripley,

Re: [R] Load and unload libraries

2003-04-01 Thread Prof Brian Ripley
On 1 Apr 2003, Rita Ribeiro wrote: > I'm having some problems in loading libraries. I wonder if anyone can > help me with this. > > I have created two libraries with the same name at different locations. Do you mean packages? > I want to use both of them, one at a time. > > So I do: > > libra

Re: [R] Load and unload libraries

2003-04-01 Thread Prof Brian Ripley
On 1 Apr 2003, Rita Ribeiro wrote: > On Tue, 2003-04-01 at 10:53, Prof Brian Ripley wrote: > > On 1 Apr 2003, Rita Ribeiro wrote: > > > > > I'm having some problems in loading libraries. I wonder if anyone can > > > help me with this. > > > > &

Re: [R] Shafer's MI software for S-plus

2003-04-01 Thread Prof Brian Ripley
I have an R port of MIX, but it is not 100% reliable. However, neither is the S-PLUS original! (We have found several bugs already.) When I have a few spare days (if ever?) I will try again. We got enough to work for the project we needed it for. Meanwhile, http://www.stats.ox.ac.uk/pub/bdr/mi

Re: [R] Shafer's MI software for S-plus

2003-04-01 Thread Prof Brian Ripley
On Tue, 1 Apr 2003 [EMAIL PROTECTED] wrote: > On 01-Apr-03 Prof Brian Ripley wrote: > > I have an R port of MIX, but it is not 100% reliable. However, neither > > is the S-PLUS original! (We have found several bugs already.) > > > > When I have a few spare days (if e

Re: [R] .Random.seed vs. set.seed

2003-04-01 Thread Prof Brian Ripley
On Tue, 1 Apr 2003, Erin Hodgess wrote: > Dear R People: > > What is the difference betwween > .Random.seed <<- seed > > vs. > set.seed > > please? 1) In the first you have to know a suitable value for `seed', and that's far from easy, whereas in the second you can supply a number in 1:1024.

Re: [R] Shafer's MI software for S-plus

2003-04-01 Thread Prof Brian Ripley
On Tue, 1 Apr 2003 [EMAIL PROTECTED] wrote: > On 01-Apr-03 Ted Harding wrote: > > On 01-Apr-03 Prof Brian Ripley wrote: > >> I have an R port of MIX, but it is not 100% reliable. However, neither > >> is the S-PLUS original! (We have found several bugs already.) &

Re: [R] cor.test observations limit

2003-04-01 Thread Prof Brian Ripley
Yes. About 1290 for the Spearman test. You need (n^3 - n) representable as an integer. On Tue, 1 Apr 2003, Ming-Chung Li wrote: > Is there a limit on the number of observations for using cor.test. For > example, > > > library(ctest) That's not needed, and has not been for about 3 years. > >

Re: [R] lda of MASS library

2003-04-01 Thread Prof Brian Ripley
On Tue, 1 Apr 2003, array chip wrote: > it seems that the lda function in MASS library doesn't give out the > constant for the linear discriminant function under the situation that > we don't use standardized variable, anyone knows how to obtain the > constant in order to construct the linear disc

Re: [R] LDA

2003-04-01 Thread Prof Brian Ripley
On Tue, 1 Apr 2003, array chip wrote: > > I used the "lda" function in the MASS library of S-Plus (R) to do a > linear discriminant analysis, and got the linear coefficients, say b1 > and b2 for the 2 predictors x1 and x2. I have trouble to calculate the > discrimiant scores for each observation,

Re: [R] read.table

2003-04-01 Thread Prof Brian Ripley
On Tue, 1 Apr 2003 [EMAIL PROTECTED] wrote: > I am using read.table() to read in ASCII data into a data > frame. The file has multiple columns that are not the > same length. The function gives me errors, or I get 'NA' > characters in the blank fields. I want to read these values > in to, e.g.,

Re: [R] read.table

2003-04-01 Thread Prof Brian Ripley
On Wed, 2 Apr 2003, Prof Brian Ripley wrote: > On Tue, 1 Apr 2003 [EMAIL PROTECTED] wrote: > > > I am using read.table() to read in ASCII data into a data > > frame. The file has multiple columns that are not the > > same length. The function gives me errors, or I ge

Re: [R] rbind data.frames with character vectors?

2003-04-01 Thread Prof Brian Ripley
acter columns in data frames. On Mon, 31 Mar 2003, Prof. Brian Ripley wrote: > That is not how you are intended to put character strings in data frames > in S. Rather, there is > > A <- data.frame(a=1, b=I("A")) > B <- data.frame(a=2, b=I("B")) > AB

Re: [R] vectorize an expression

2003-04-02 Thread Prof Brian Ripley
On Wed, 2 Apr 2003 [EMAIL PROTECTED] wrote: > Dear listers, > I'm having a bad R day. I just can't think of the vectorized equivalent of: > > for (ii in 1:n) aa[ii] = bb[ii,cc[ii]] aa <- bb[cbind(1:n, cc[1:n])] -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied St

Re: [R] RODBC sqlSave problem.

2003-04-02 Thread Prof Brian Ripley
On Wed, 2 Apr 2003, Fredrik Karlsson wrote: > Being new to both the postgres database, ODBC and the RODBC interface, I > am somewhat confused by some of the problems I am experiencing trying to > connect R to the database. You would be: there is an extensive set of help pages, and you have not lo

box colours in lattice (was RE: [R] Strip location and grid colourin Lattice)

2003-06-05 Thread Prof Brian Ripley
...(that's > what I should have called it). How do you change the colour of the trellis? > > > -Original Message- > From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 4 June 2003 6:26 PM > > What grid? You put it there, and you can cha

Re: [R] Regression slopes

2003-06-05 Thread Prof Brian Ripley
No modification needed. Fit either of lm(y-x ~ x + z) lm(y ~ x + z + offset(x)) and the t-test in the summary will be a test of the coefficient of x being one. You can also use such models to do an anova against a modle with unit coefficient. On Thu, 5 Jun 2003, Martin Biuw wrote: > Sorry i

Re: [R] Max sig figs as well as Min in print?

2003-06-06 Thread Prof Brian Ripley
On Thu, 5 Jun 2003 [EMAIL PROTECTED] wrote: > Hi Folks, > > Consider the following example (artificial, but it illustates the point): > > > r2<-sqrt(2) > > x<-2-r2*r2 > > > print(c(pi,sqrt(pi)),digits=5) > [1] 3.1416 1.7725 > > > > print(c(pi,sqrt(pi),x),digits=5) > [1] 3.1416e+0

Re: [R] dynamics of functions

2003-06-06 Thread Prof Brian Ripley
On Thu, 5 Jun 2003, Tobias Verbeke wrote: ... > > What about the following function? > > > > iterate<-function(f,n,x){ > > if(n==0) return(x) > > y<-x > > for(i in 1:n)y<-f(y) > > y > > } > > iterate(sqrt,3,256) > > Thank you very much, this certainly helps. > I'm still curious, though,

Re: [R] question about POSIXct conversion

2003-06-06 Thread Prof Brian Ripley
"character" is a mode "POSIXct" is a class, but you want c("POSIXt", "POSIXct") Try mt <- structure(mt, class=c("POSIXt", "POSIXct")) or mt + ISOdatetime(1970,1,1,0,0,0) or several other such tricks. On Thu, 5 Jun 2003, Kosenkov Kirill wrote: > Hello! > > I am trying to compute minimal ti

Re: [R] dev.copy2eps: Why did the colors come into my postscriptoutput?

2003-06-06 Thread Prof Brian Ripley
On Thu, 5 Jun 2003, Paul E Johnson wrote: > On a RedHat 7.3 system with R-1.6.1, I did this > > > x11(width=3.5,height=4,colortype="gray") > > Then plotted (with matplot) a nice looking no-color graph on the screen, > then I did this: > > > dev.copy2eps(file="test.eps",height=4,width=3.5) >

Re: [R] Query about C Function Interface

2003-06-05 Thread Prof Brian Ripley
You are trying to load woa.obj, and you are on Windows which should be looking for a .dll and the error message says woa.so. You say you keep your .exe in the rw1070 directory. You are rather confused! dyn.load on Windows loads a DLL file from the current working directory, *as its help says*.

Re: [R] Problerm building R-1.7.0 on OpenBSD3.2/sparc64

2003-06-06 Thread Prof Brian Ripley
Looks like that OS wants all symbols resolved: those are all variables exported by R.bin. 1) See if there is a ld flag to allow unresolved symbols. 2) (something of a kludge) configure with --enable-R-shared and rebuild (from scratch), as this will link against the libR.so. Whether that works co

Re: [R] 0 margin for creating eps files

2003-05-27 Thread Prof Brian Ripley
On Tue, 27 May 2003, Duncan Murdoch wrote: > On Tue, 27 May 2003 20:33:05 +0100 (BST), you wrote in message > <[EMAIL PROTECTED]>: > > >Dear all, > > > >I am trying to create eps files of R plots (in Linux) so that I can import them > >into Word > >(obviously in MS Windows). What I would like is

RE: [R] Slow computation in for loop

2003-05-28 Thread Prof Brian Ripley
On Wed, 28 May 2003, Philippe Grosjean wrote: > I suspect that your problem comes from the rbind(). I have also noticed an > exponentially slower execution with the increase of the size of the data > frame that you rbind()s. It is much faster to rbind() several separated > temporary data frames (l

Re: [R] Numbers that look equal, should be equal, but if() doesn'tsee as equal (repost with code included)

2003-05-29 Thread Prof Brian Ripley
On Wed, 28 May 2003, Paul Lemmens wrote: > Hoi Thomas, > > --On woensdag 28 mei 2003 7:16 -0700 Thomas Lumley > <[EMAIL PROTECTED]> wrote: > > > On Wed, 28 May 2003, Paul Lemmens wrote: > > > >> Hi! > >> > >> Apologies for sending the mail without any code. Apparently somewhere > >> along the w

Re: [R] Kernel density

2003-05-28 Thread Prof Brian Ripley
On Wed, 28 May 2003, Christian Hennig wrote: > I want to fit a kernel density estimator by bkde of library KernSmooth. > I need only the density value at the point 0. > I do not understand the following behaviour: It's not designed to do that. And why use a linear-binning method for just one po

Re: [R] Postscript query: plotting long vectors

2003-05-30 Thread Prof Brian Ripley
I don't think that's entirely correct: as far as I know doing that resets the line-type pattern (and I have just checked the PostScript Reference manual). Level 1 Postscript interpreters often have a limit of about 1500 segments in a path, but level >=2 (all recent ones) are supposed to have no

Re: [R] piping the results

2003-05-30 Thread Prof Brian Ripley
See ?sink. I doubt it you really mean it, but ?pipe tells you how to pipe things to a process (not a file). On Fri, 30 May 2003, orkun wrote: > Could you explain how I can export (or pipe) statistics result to a text > file. > When results are in large quantity. I cannot see all of them in c

Re: [R] Coefficients: (20 not defined because of singularities)

2003-05-30 Thread Prof Brian Ripley
It is the model matrix which is singular, *not* the variable. You are trying to fit a collinear model. Use alias() to see what is going on. On Fri, 30 May 2003, Thomas Fischer wrote: > Hello, > > I am trying to run a linear regression analysis on my data set. For some > reason most variables

Re: [R] Missing 'getGroupMembers()'

2003-05-31 Thread Prof Brian Ripley
Do you want to write S3 or S4 methods for these groups? Both systems have groups with those names (and they are not the same). In either case, the details are in ?.Methods (in current versions of R). On Fri, 30 May 2003, Anton Crombach wrote: > I'm trying to write a method such that my own clas

Re: [R] Normal deviate generation - Marsaglia's ziggurat method

2003-05-31 Thread Prof Brian Ripley
Accuracy and reliability are more important than speed. As you say, it is available elsewhere, but who actually needs a faster method? 1 million normals take 0.55s on my machine (an Athlon 2600): 1 million uniforms take 0.16s, so there is not I think scope to be `6 to 7 times faster' at R level.

Re: [R] How to check if a pipe was successfully opened or not?

2003-05-31 Thread Prof Brian Ripley
On Fri, 30 May 2003, Henrik Bengtsson wrote: > Is there a way to detect if the opening of a connection to a pipe was > successful or not? Here are two examples > > # Works > > con <- pipe("ls") > > res <- open(con, open="r") > > print(res) > NULL > > # Does not work > > con <- pipe("unkno

Re: [R] How to remove a complete dataframe column

2003-05-31 Thread Prof Brian Ripley
On Fri, 30 May 2003, Mark Marques wrote: > I am using dataframes and I and I want to delete (remove) a specific > column by name ... > the data frame has 14 columns with several names and only need some. > I tried to overwrite the columns with a single value but that in not very > clean as I need

Re: [R] [Q] R equivalent for Splus get.message()

2003-05-31 Thread Prof Brian Ripley
Are you looking for geterrmessage()? I think an error handler should be writing to stderr(), BTW, but normally the R error message will already have been written there. On Fri, 30 May 2003, Paul Roebuck wrote: > I'm trying to get a translation of some Splus code going. > My problem is with the

Re: [R] bootstrapping data.frame and matrix

2003-05-31 Thread Prof Brian Ripley
On Fri, 30 May 2003, chiara peroni wrote: > I use an old version of R (5.02). The reason I do not use the package > boot on the last version of R, is the clash of the package itself with > expressions contained in other packages, i.e. the"sm " library. I don't > know if you have the same problem.

Re: [R] color in plot title: title(sub="something", col=4)

2003-05-31 Thread Prof Brian Ripley
?title says ...: further graphical parameters from `par'. Use e.g., `col.main' or `cex.sub' instead of just `col' or `cex'. And it is *really* time you upgraded your 13-month-old R, especially as it is a 1.x.0 release. On Fri, 30 May 2003, Jacob Wegelin wrote: > > Is there a w

Re: [R] Error using glmmPQL

2003-05-31 Thread Prof Brian Ripley
lme does this (and that is from lme) sometimes -- often when the model does not fit well. On Fri, 30 May 2003, Andrew Perrin wrote: > Can anyone shed any light on this? > > > doubt.demographic.pql<-glmmPQL(random = ~ 1 | groupid/participantid, > +fixed = r.info.d

Re: [R] Need help installing qtoolbox

2003-05-31 Thread Prof Brian Ripley
On Fri, 30 May 2003, Toby Popenfoose wrote: > I have windows version of R v1.6.2 > > I have downloaded the qtoolbox.zip from > http://www.cmis.csiro.au/S-PLUS/qtoolbox/ > > My R command line is > > install.packages("C:/Program Files/R/qtoolbox.zip", .libPaths()[1], CRAN = > NULL) > > and I get

Re: [R] parse on left hand side of R assignment

2003-06-01 Thread Prof Brian Ripley
On Sat, 31 May 2003, Paul E. Johnson wrote: > I keep finding myself in a situation where I want to calculate a > variable name and then use it on the left hand side of an assignment. > For example > > iteration <- 1 > varName <- paste("run",iteration,sep="") > myList$parse(text=varName) <- aCol

Re: [R] authorized characters and symbols

2003-06-02 Thread Prof Brian Ripley
On Mon, 2 Jun 2003 [EMAIL PROTECTED] wrote: > Obviously I cannot use the underscore "_ " character to name an object > in R Actually, you can but it is more trouble than it is worth as you will always have to quote the name, and often explicitly get it: > "my_pi" <- pi > get("my_pi") [1] 3.141

Re: [R] data.frame building

2003-06-03 Thread Prof Brian Ripley
On Mon, 2 Jun 2003, Jean Eid wrote: > I have two seperate questions that both deal with the way R handels data > sets: > > First, I am trying to read a data set of 80M into R. I am using > read.table(). The file is a tab file and I have tested the function for a > small amount of lines. It seems

Re: [R] compositional data: percent values sum up to 1

2003-06-03 Thread Prof Brian Ripley
On Mon, 2 Jun 2003, Spencer Graves wrote: > "glm" will do multinomial logistic regression. However, if J is large, Strictly, no, it will not as that is not a GLM. glm() can only do it via surrogate Poisson models. multinom in nnet(VR) will do multinomial logistic regression. > I doubt if t

Re: [R] Ploting rpart objects / namespace problems

2003-06-03 Thread Prof Brian Ripley
On Mon, 2 Jun 2003, Luis Torgo wrote: > I've written a small adaptation of the text.rpart function of the rpart > package to better suite my tree presentation needs (I basically left the code > untouched, only changing some numbers relating to label positioning). > > When I changed to version 1

Re: [R] Building an R package under Windows NT

2003-06-03 Thread Prof Brian Ripley
Try to install the package first, via Rcmd INSTALL emme2 as a binary build involves an install and a direct install may be more informative. The message about zip suggests you don't have the right things first in your path, so please read the file readme.packages and cross check. In particular,

Re: [R] catch error/warning message in a loop

2003-06-03 Thread Prof Brian Ripley
On Mon, 2 Jun 2003, array chip wrote: > cat can only catch the error message promptly, but > seems not able to catch the warning message promptly. > Can anyone point out how i can catch the warning > message in a loop? options(warn=1) or = 2 -- Brian D. Ripley, [EMAIL PROTECTED

RE: [R] Building an R package under Windows NT

2003-06-03 Thread Prof Brian Ripley
On Mon, 2 Jun 2003 [EMAIL PROTECTED] wrote: > Thanks for the suggestions. > > 1) I fixed the zip.exe PATH issue. > 2) I removed unnecessary quotes around C:\Program Files\R > 3) I ran Rcmd install emme2 with the following result: > > -- Making package emme2 > adding buil

Re: [R] gam questions

2003-06-03 Thread Prof Brian Ripley
On Tue, 3 Jun 2003, Henric Nilsson wrote: > I'm a fairly new R user having two questions regarding gam: > > 1. The prediction example on p. 38 in the mgcv manual. That's not very helpful: pagination of manuals depends on the paper size, for example. > In order to get > predictions based on t

Re: [R] Rounding problem R vs Excel

2003-06-03 Thread Prof Brian Ripley
On Tue, 3 Jun 2003, Mike White wrote: > If the numbers are not represently exactly how does R resolve problems like > the one below? Is there something that needs to be set up in the R What problem exactly? > environment like the number of significant figures? Printing is controlled by options(

[R] Packages for Windows

2003-06-03 Thread Prof Brian Ripley
We are very grateful that Uwe Ligges has taken over the production of the pre-compiled Windows versions of CRAN packages. This has been mainly automated, and only packages that build out-of-the-box will be available from CRAN. A few others (SJava, XML, gstat, netCDF, xgobi) are available from htt

Re: [R] lda: how to get the eigenvalues

2003-06-03 Thread Prof Brian Ripley
On Tue, 3 Jun 2003, Christoph Lehmann wrote: > How can I get the eigenvalues out of an lda analysis? It uses singular values not eigenvalues: see ?lda for a description of the output, and the print method for one way to use them. -- Brian D. Ripley, [EMAIL PROTECTED] Professor

Re: [R] gam questions

2003-06-03 Thread Prof Brian Ripley
On Tue, 3 Jun 2003, Henric Nilsson wrote: > At 10:07 2003-06-03 +0100, Prof Brian Ripley wrote: > > > > 1. The prediction example on p. 38 in the mgcv manual. > >That's not very helpful: pagination of manuals depends on the paper size, > >for example. > >

Re: [R] libraries in .First

2003-06-04 Thread Prof Brian Ripley
If this is R 1.7.0, the preferred mechanism is options("defaultPackages"), as in the following (from the examples in .First) # Example of Rprofile.site local({ old <- getOption("defaultPackages") options(defaultPackages = c(old, "MASS")) }) .First is run too early to

Re: [R] Update VR_7.1-6

2003-06-04 Thread Prof Brian Ripley
I have explained that on R-help earlier today (and when VR_7.1-4 was announced). Please look back a few hours in the R-help postings. On Tue, 3 Jun 2003, Dirk Enzmann wrote: > The update of VR by downloading VR_7.1-6.zip and using install.packages > (from local zip files) fails with the followi

Re: [R] kmeans

2003-06-04 Thread Prof Brian Ripley
On Tue, 3 Jun 2003, Luis Miguel Almeida da Silva wrote: > I was working with kmeans from package mva and found some strange > situations. When I run several times the kmeans algorithm with the same > dataset I get the same partition. Why does that surprise you? > I simulated a little example w

Re: [R] Logistic regression problem: propensity score matching

2003-06-04 Thread Prof Brian Ripley
1) Why are you using multinom when this is not a multinomial logistic regression? You could just use a binomial glm. 2) The second argument to predict() is `newdata'. `sample' is an R function, so what did you mean to have there? I think the predictions should be a named vector if `sample' i

Re: [R] (no subject)

2003-06-04 Thread Prof Brian Ripley
On Wed, 4 Jun 2003, Thomas W Blackwell wrote: > > I think cat() will print immediately from inside a loop. So will print(), but Gilda is probably on Windows and hasn't read the rw-FAQ Q6.3. FAQs are useful things! > On Tue, 3 Jun 2003, Gilda Garibotti wrote: > > > I would like to know if it i

Re: [R] convert factor to numeric

2003-06-04 Thread Prof Brian Ripley
See the FAQ, Q7.12. On Wed, 4 Jun 2003, Philipp Pagel wrote: > Every once in a while I need to convert a factor to a vector of numeric > values. as.numeric(myfactor) of course returns a nice numeric vector of > the indexes of the levels which is usually not what I had in mind: ... It's done that

Re: [R] Crash with R1.7.0 + Windows XP Professional

2003-06-05 Thread Prof Brian Ripley
Sounds as if you have a corrupt .RData file in your default working directory for R. Try renaming it, or otherwise starting with --vanilla. On Wed, 4 Jun 2003, Simon Frost wrote: > I've had some problems installing the R 1.7.0 binary on Windows XP > Professional. *Installing* it? You only d

Re: [R] R packages in S-Plus?

2003-06-05 Thread Prof Brian Ripley
On Wed, 4 Jun 2003, array chip wrote: > Hi, is it possible to use the packages from CRAN in > SPlus? and how to do it if yes? It's going to be possible only if the packages use the common subset of the S language implemented in both R and S-PLUS: and the porter (you) will have to know how to ch

Re: [R] Statistical computing

2003-03-31 Thread Prof. Brian Ripley
On Mon, 31 Mar 2003 [EMAIL PROTECTED] wrote: > In a message dated 3/31/03 10:21:20 AM Eastern Standard Time, > [EMAIL PROTECTED] writes: > > > I must admit that I am always eager to debunk the myth that SAS is (so much) > > better than the S language for data management, because to me the myth >

Re: [R] princomp with not non-negative definite correlation matrix

2003-04-14 Thread Prof Brian Ripley
On Thu, 10 Apr 2003 [EMAIL PROTECTED] wrote: > $ R --version > R 1.6.1 (2002-11-01). > > So I would like to perform principal components analysis on a 16X16 > correlation matrix, [princomp(cov.mat=x) where x is correlation matrix], > the problem is princomp complains that it is not non-negative d

Re: [R] MCD distance

2003-06-08 Thread Prof Brian Ripley
There first two *are* in the lqs package: you just need to use mahalanobis() with cob.rob(). I've never heard of BACON. On Fri, 6 Jun 2003, osama wrote: > I would like to compare robust distance measures,e.g. MVE, MCD, > BACON, as measures of leverage and to detect outliers in X-space . I >

Re: [R] XML package for R

2003-06-09 Thread Prof Brian Ripley
See the ReadMe in the appropriate area on CRAN (XML is also a CRAN packages). http://cran.r-project.org/bin/windows/contrib/1.7/ReadMe which points you to http://www.stats.ox.ac.uk/pub/RWin On Mon, 9 Jun 2003, Dr Mushtaq Ahmed wrote: > Does anyone have a binary of XML package for 1.7.0 on Win

Re: [R] Questions for package ts prediction

2003-06-09 Thread Prof Brian Ripley
You have a scoping problem: the predict method needs to find the data: please supply an explicit newdata argument. Your first example works because `y' happens to be globally visible and be the right object. On 9 Jun 2003, zhu wang wrote: > I am trying to write a function to return prediction va

Re: [R] Ordering long vectors

2003-06-09 Thread Prof Brian Ripley
On Sun, 8 Jun 2003, Göran Broström wrote: > On Sun, 8 Jun 2003, Thomas Lumley wrote: > > > On Sat, 7 Jun 2003, [ISO-8859-1] Göran Broström wrote: > > > > > > > > I need to order a long vector of integers with rather few unique values. > > > This is very slow: > > > > > > I think the culprit is

Re: [R] understanding eigen(): getting non-normalized eigenvectors

2003-06-10 Thread Prof Brian Ripley
Eigenvectors are defined only up to a scalar constant (assuming distinct eigenvalues). However, your `by hand' answer does not pass the simple test Av = lambda v for some lambda. So you cannot reproduce incorrect answers in R! Your example is unusual: A is of rank 1. On 9 Jun 2003, Christoph

Re: [R] SOM random seed

2003-06-10 Thread Prof Brian Ripley
First, *which* SOM routine, from which package? Credit where credit is due and all that If you mean the one in class(VR), it uses the standard R random number generation. You don't need to `pass the random-seed as an argument somehow', just set the seed as you would anyway (e.g. via set.seed

Re: [R] fitting data to exponential distribution with glm

2003-06-10 Thread Prof Brian Ripley
An exponential distribution is a gamma distribution, and as far as fitting the MLE of the coefficients all gammas give the same MLEs. (You can specify the dispersion and hence that the gamma is exponential when asking for summaries, anova, etc.) On Wed, 11 Jun 2003, Masayoshi Hayashi wrote: > I

Re: [R] estimating a density by selecting the bandwidth

2003-06-10 Thread Prof Brian Ripley
On Tue, 10 Jun 2003, Rafael Bertola wrote: > I´ve a data set and i want fit a kernel density estimate to the data. > but using the k-nearest neighbour method. > How i do this with R. Well, you define the exact algorithm you want to use, and then you program it, R being a fully-featured programmi

Re: [R] Bootstraping with MANOVA

2003-06-10 Thread Prof Brian Ripley
It means what it says! The residuals from the manova fit have a degenerate distribution: that's a problem with bootstrapping. I don't think you've done this correctly: assuming you are intending to bootstrap residuals you seem to have resampled the independent variable and not added back the m

Re: [R] Re: color coding a legend - solved?

2003-06-11 Thread Prof Brian Ripley
On Tue, 10 Jun 2003, Robert Schick wrote: > I did the following, and had it plot as needed: > >legend(3.25, -2.5, leg.txt, pch=15, col= levels(as.factor(codes(cv.wshed.grp > > Problem was in my (lack of) understanding of codes() A common one. codes() is deprecated in the development versio

Re: [R] Tested Random Number Generator

2003-06-11 Thread Prof Brian Ripley
On Wed, 11 Jun 2003, Wolfgang Viechtbauer wrote: > Dear All, > > The editor of a journal to which I had submitted a publication asked > whether R has a "tested random number generator." My paper included > Monte Carlo simulations generating random normal and random chi-square > values. > > help(

Re: [R] defaults in R: packages, .Rhistory

2003-06-11 Thread Prof Brian Ripley
Please use a parseable subject line, or two separate messages for two unrelated Qs. On Wed, 11 Jun 2003, Jacob Wegelin wrote: > With the current version (rw1070), every time I start R it loads a whole > bunch of packages, many of which I do not need in a typical session: > > > search() > [1] ".

Re: [R] pixmap question again

2003-06-12 Thread Prof Brian Ripley
We got this several times, but I did not see a reply. You mention `slots': the slot access operator is @ not $. On Wed, 11 Jun 2003, Christoph Lehmann wrote: > I could load a picture with gray levels only: > > x <- > read.pnm("/home/christoph/work/projects/ffa/EPrime/pics_pnm/550_0_1.pnm") >

Re: [R] R-compatible fortran compiler

2003-06-12 Thread Prof Brian Ripley
Yes. And it is the one documented in the files on making R under Windows and installing source packages under Windows. First find the file readme.packages either in the top directory of your installation or in the src/gnuwin32 directory of the sources. Then read it. Note that you don't just ne

Re: [R] car package dependencies - solved - thanks

2003-06-12 Thread Prof Brian Ripley
On Thu, 12 Jun 2003, Martin Wegmann wrote: > Thanks, > > rpm -i --nodeps R-car-. worked. > > only as info, Install.packages(car) didn't work - no packages called car were install.packages("car")! > found - do I have to typ the name in differently? but anyway box.cox in car > is working

Re: [R] Programcode and data in the same textfile

2003-06-12 Thread Prof Brian Ripley
On Thu, 12 Jun 2003, Barry Rowlingson wrote: > > > file = tmpfile, sep="\n") > > close(tmpfile) > > read.table(tmpfilename, header = TRUE) > > > > Eurgh! Does R clean up tempfiles by itself? Yes! It's a better idea to use an anonymous file connection, opened for reading and writi

Re: [R] step vs. stepAIC

2003-06-12 Thread Prof Brian Ripley
On Thu, 12 Jun 2003 [EMAIL PROTECTED] wrote: > Could someone provide me direction towards documentation or provide some > thoughts on when I should use stepAIC rather than step (or vice versa)? See the note in ?step ... -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied

Re: [R] Problems for runing R in BATCH to generate PNG/JPEG files

2003-06-12 Thread Prof Brian Ripley
1) Read ?BATCH, carefully. Note that R --gui BATCH isn't valid syntax. 2) Read ?png, carefully. 3) So you need to not use BATCH *and* provide an X server: I use Xvfb on Linux (but on Solaris the console is available to batch processes). On Thu, 12 Jun 2003, Charlie Chen wrote: > Hello all: >

Re: [R] Programcode and data in the same textfile

2003-06-12 Thread Prof Brian Ripley
This is not a valid solution: R does not necessarily have a history mechanism operational. But if it did, you could use history() not savehistory(). Does no one ever read the help pages? On Thu, 12 Jun 2003, Ernst Hansen wrote: > Thomas W Blackwell writes: > > Ernst - > > > > Here's a sol

Re: [R] covariate data errors

2003-06-12 Thread Prof Brian Ripley
Do you mean correlations in the *errors*? The residuals are always correlated. What does this have to do with your subject line -- it is errors in the dependent variable I think you mean? If you have correlated errors, you should be using generalized least squares not least squares or weighted

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