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

2007-06-28 Thread Prof Brian Ripley
On Thu, 28 Jun 2007, Wolfram Fischer wrote: What's really the problem with: regexpr( '\.odt$', Yodt, perl=TRUE ) Warning: '\.' is an unrecognized escape in a character string Warning: unrecognized escape removed from \.odt$ [1] 5 attr(,match.length) [1] 4

Re: [R] aov and lme differ with interaction in oats example of MASS?

2007-06-28 Thread Prof Brian Ripley
On Thu, 28 Jun 2007, Karl Knoblick wrote: Dear R-Community! The example oats in MASS (2nd edition, 10.3, p.309) is calculated for aov and lme without interaction term and the results are the same. But I have problems to reproduce the example aov with interaction in MASS (10.2, p.301) with

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 that backslashes need to be doubled when entering R character

Re: [R] stepAIC on lm() where response is a matrix..

2007-06-27 Thread Prof Brian Ripley
On Wed, 27 Jun 2007, Spencer Graves wrote: I see several options for you: 1. Write a function 'dropterm.mlm', copying 'dropterm.lm' and modifying it as you think appropriate. The function 'dropterm.lm' is hidden in a namespace, which you can see from 'methods(dropterm)'. To get

Re: [R] Loading problem with XML_1.9

2007-06-27 Thread Prof Brian Ripley
Please don't post to multiple lists: I have removed the BioC-devel list. This is about MacOS X, and the appropriate list is R-sig-mac. There is no intrinsic 64-bit problem: package XML 1.9-0 (sic) works fine on 64-bit versions of Solaris and Linux. Most likely there was an installation

Re: [R] simultaneous actions of grep ???

2007-06-26 Thread Prof Brian Ripley
On Mon, 25 Jun 2007, Stephen Tucker wrote: My mistake... last alternative should be: c-subset(c,regexpr(\\.1|\\.5|\\.6|\\.9,rownames(c)) 0) Or, more readably, c - subset(c, regexpr(\\.(1|5|6|9), rownames(c)) 0) --- Stephen Tucker [EMAIL PROTECTED] wrote: You can list them

Re: [R] R data set size limit

2007-06-26 Thread Prof Brian Ripley
On Tue, 26 Jun 2007, Roy, Abhijit wrote: Hi - What is the limit (rows and columns) on the size of a data set that R will process? 2^31-1 for each (in a data frame, that number of elements for a matrix). See ?Memory-limits Most likely your computer imposes lower limits. Thanks. Abhijit

Re: [R] ts() defunct in R 2.5.0?

2007-06-26 Thread Prof Brian Ripley
ts() is in package stats, and has been for some years. Package ts was removed at the same time. The NEWS item say o The autoloading of ts() is defunct. which is very far from your misquote. The problem is in the data directory of your package. E.g., sowas/data/air.R has

Re: [R] Memory Experimentation: Rule of Thumb = 10-15 Times the Memory

2007-06-26 Thread Prof Brian Ripley
The R Data Import/Export Manual points out several ways in which you can use read.csv more efficiently. On Tue, 26 Jun 2007, ivo welch wrote: dear R experts: I am of course no R experts, but use it regularly. I thought I would share some experimentation with memory use. I run a linux

Re: [R] surprising difference in log()

2007-06-26 Thread Prof Brian Ripley
On Tue, 26 Jun 2007, Fausto Galli wrote: Hello everybody My collegue and I noticed a strange behaviour of R on different platforms. It's a simple computation, but results are rather different. On Windows XP: floor(log(8,2)) [1] 3 which is what one should expect. Here's instead the

Re: [R] R-2.5.0 compilation problem on Linux powerpc

2007-06-25 Thread Prof Brian Ripley
Is this ppc32 or ppc64? (What does uname -a say?) If the former, you might need to set CPICFLAGS and FPICFLAGS to -fPIC (rather than -fpic): please look these up in the R-admin.html file (which INSTALL points you to). For ppc64 configure should have found -fPIC. On Mon, 25 Jun 2007, Vivek

Re: [R] R-2.5.0 compilation problem on Linux powerpc

2007-06-25 Thread Prof Brian Ripley
you have any suggestions?? And what is the setting of the flags I mentioned? See the manual I pointed you to, or the Makeconf file? Thanks, Vivek On 6/25/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: Is this ppc32 or ppc64? (What does uname -a say?) If the former, you might need

Re: [R] fractional calculations

2007-06-25 Thread Prof Brian Ripley
On Mon, 25 Jun 2007, Henrique Dallazuanna wrote: require(MASS) ?as.fractions as.fractions(1/2+1/8) I think Federico wanted 1/as.fractions(2) + 1/as.fractions(8) that is avoiding computing 1/8 in float (although it is exact). You might be better off with package gmp: 1/as.bigq(2) +

Re: [R] R-2.5.0 compilation problem on Linux powerpc

2007-06-25 Thread Prof Brian Ripley
= -fpic So my comment in the first reply applied, since it looks like your distro is using an unusual name. You need to change these (and in etc/Makeconf). Thanks, Vivek Thanks, Vivek On 6/25/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: Is this ppc32 or ppc64? (What does uname

Re: [R] R-2.5.0 compilation problem on Linux powerpc

2007-06-25 Thread Prof Brian Ripley
On Mon, 25 Jun 2007, Vivek Menon wrote: I did not get what you replied in the previous email. I still get the same error with CPICFLAGS and FPICFLAGS set to -fPIC. And a completely fresh build? Vivek On 6/25/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Mon, 25 Jun 2007, Vivek Menon

Re: [R] problem building first package

2007-06-25 Thread Prof Brian Ripley
You can ignore the message about latex (and 2.5.1 RC does not give it). hhc is part of HTML Help Workshop: you either have not installed that or not put it in your path. The settings in MkRules affect the types of help for building R, not 'R CMD INSTALL'. If you only want text help you need

Re: [R] problem building first package

2007-06-25 Thread Prof Brian Ripley
to be a list, but no matter, --docs=normal worked fine. Quoting Prof Brian Ripley [EMAIL PROTECTED]: You can ignore the message about latex (and 2.5.1 RC does not give it). hhc is part of HTML Help Workshop: you either have not installed that or not put it in your path. The settings

Re: [R] Names of objects passed as ... to a function?

2007-06-23 Thread Prof Brian Ripley
On Sat, 23 Jun 2007, Gavin Simpson wrote: Dear list, I have a function whose first argument is '...'. Each element of '...' is a data frame, and there will be at least 2 data frames in '...'. The function processes each of the data frames in '...' and returns a list, whose components are

Re: [R] connecting to process?

2007-06-23 Thread Prof Brian Ripley
On Sat, 23 Jun 2007, Charles Cosse wrote: Hello, sorry if this is a duplicate message -- the R mail-server told me that my original post was being held for moderator approval. Whatever. It would have been courteous to have checked the list archives: the previous message is there. I just

Re: [R] Multinomial models

2007-06-22 Thread Prof Brian Ripley
On Thu, 21 Jun 2007, nicole baerg wrote: Hello, I am VERY new to R (one week) and I am trying to run a multinomial logit model. The model I am using is model1 - multinom(Y ~ X1 + X2 + , ..., Xn) if I put in summary(model1) I get #Error in function (classes, fdef, mtable) :

Re: [R] Result depends on order of factors in unbalanced designs (lme, anova)?

2007-06-22 Thread Prof Brian Ripley
'anova' is rather a misnomer here. In terms of the description in ?anova.lme, you have When only one fitted model object is present, a data frame with the sums of squares, numerator degrees of freedom, denominator degrees of freedom, F-values, and P-values for Wald tests for

Re: [R] Extracting t-tests on coefficients in lm

2007-06-21 Thread Prof Brian Ripley
On Wed, 20 Jun 2007, David C. Howell wrote: I am writing a resampling program for multiple regression using lm(). I resample the data 10,000 times, each time extracting the regression coefficients. At present I extract the individual regression coefficients using brg = lm(Newdv~Teach +

Re: [R] How to create .rda file to be used in package building

2007-06-21 Thread Prof Brian Ripley
On Wed, 20 Jun 2007, Deli Wang wrote: Hi, Can someone tell me how to create .rda data files in R so that they can be used contributed package? The manual says Currently, data files can have one of three types as indicated by their extension: plain R code (.R or .r), tables (.tab,

Re: [R] [R-pkgs] RGtk2 2.10.x series available

2007-06-21 Thread Prof Brian Ripley
Did you not get a dialog box with further details? Unfortunately I found no instructions. You need a version of of Gtk2 installed that is at least as late as the Windows maintainer used to build RGtk2, as it adapts to the version installed. I don't know what that is and had to update mine.

Re: [R] MDS size limitations

2007-06-21 Thread Prof Brian Ripley
On Thu, 21 Jun 2007, Steve Antos wrote: What are the limitations on size of matrix for MDS functions? MDS works with a dissimilarity, not a matrix (neither conceptually nor in most R implementations, which typically use an object of class dist). It is better to think in terms of the number of

Re: [R] How to compare GLM and GAM models

2007-06-20 Thread Prof Brian Ripley
On Tue, 19 Jun 2007, Ben Bolker wrote: Yuanchang xie xieyc at hotmail.com writes: Dear Listers, I want to compare two negative binomial models fitted using glm.nb and gam(mgcv) based on the same data. What would be the most appropriate criteria to compare these two models? Can someone

Re: [R] extract elements

2007-06-20 Thread Prof Brian Ripley
On Wed, 20 Jun 2007, Manuele Pesenti wrote: Dear R users, just another little question... are there other ways, I mean more easy to write, to obtain the same result I got with: data[95:length(dati[,1]), ] where data is a data frame to extract the last elements starting from a fixed

Re: [R] Speed up R

2007-06-20 Thread Prof Brian Ripley
On Wed, 20 Jun 2007, Robert McFadden wrote: -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] The advantage of dual processors is that you can use the machine for several things at once, including multiple R jobs. For example, when I am doing package checking I

Re: [R] Creating directory under Windows R session

2007-06-20 Thread Prof Brian Ripley
On Wed, 20 Jun 2007, Henrique Dallazuanna wrote: I have tested in WinXP: example: dir(C:/) [1] Arquivos de programas AUTOEXEC.BAT [3] boot.ini Bootfont.bin [5] CONFIG.SYSDebug [7] debug.log Desktop.ini [9] Dic

Re: [R] Creating directory under Windows R session

2007-06-20 Thread Prof Brian Ripley
On Wed, 20 Jun 2007, Henrique Dallazuanna wrote: for check the existence, any(dir('your path')==your folder) That does not work, but fortunately R has file_test() for this purpose. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics,

Re: [R] How to install RMySQL package in R 2.5 in Windows OS?

2007-06-19 Thread Prof Brian Ripley
the sources. My Linux box is running 5.0.27, and RMySQL works there. On Wed, 13 Jun 2007, Joe W. Byers wrote: Prof Brian Ripley wrote: On Wed, 13 Jun 2007, Ruixin ZHU wrote: Dear R-users, It seems that install.packages( ) doesn't work to RMySQL package. Under Windows, yes. You need the MySQL

Re: [R] Problem with binding data-frames

2007-06-19 Thread Prof Brian Ripley
On Tue, 19 Jun 2007, Junnila, Jouni wrote: Hi, Yes, I'm aware that the problem is that I have differing number of columns in the different datasets. My question still remains. Is there some way I can allow column numbers to be different, or is there some other way combining these datasets?

Re: [R] BIC and Hosmer-Lemeshow statistic for logistic regression

2007-06-19 Thread Prof Brian Ripley
On Tue, 19 Jun 2007, spime wrote: Is there any windows version of Design package??? Yes, the version put up this morning works on 2.5.x (at last). You should be able to get a Windows build now: it is showing for me on CRANextras (where I put it an hour or so ago: it will reach CRAN mirrors in

Re: [R] Linear model predictions, differences in class

2007-06-19 Thread Prof Brian Ripley
tapply gives an array: you want to use as.vector() on its result. On Tue, 19 Jun 2007, John Phillips wrote: Hi, I am using R to fit statistical models to data were the observations are means of the original data. R is used to calculate the mean before fitting the model. My problem is:

Re: [R] Multiple plot jpeg file

2007-06-19 Thread Prof Brian Ripley
On Tue, 19 Jun 2007, Marc Schwartz wrote: On Tue, 2007-06-19 at 15:39 -0400, Bill Hunsicker wrote: R-Help, I am executing a R script and would like to put multiple plots into a single file. For some reason the contents of plotfile.jpg always seem to contain the last plot and not all

Re: [R] Speed up R

2007-06-19 Thread Prof Brian Ripley
On Tue, 19 Jun 2007, Robert McFadden wrote: Dear R Users, I hope that there is someone who has an experience with a problem that I describe below and will help me. I must buy new desktop computer and I'm wondering which processor to choose if my only aim is to speed up R. I would like to

Re: [R] Loading problem with R2HTML package

2007-06-18 Thread Prof Brian Ripley
On Sun, 17 Jun 2007, spime wrote: I have downloaded latest version of R2HTML (v1.54) for 64-bit windows PC. The latest version is 1.58 from September 2006. See http://cran.r-project.org/src/contrib/Descriptions/R2HTML.html My R version 2.5.0. My problem arises when i want to install

Re: [R] Calculating Percentile in R

2007-06-18 Thread Prof Brian Ripley
On Sun, 17 Jun 2007, Megh Dal wrote: Hi all, I have a problem on how R calculates Percentiles : Suppose I have following data set: data1 [1] -16648185 -14463457 -14449400 -13905309 -13443436 -13234755 -12956282 -11660896 [9] -10061040 -9805005 -9789583 -9754642 -9562164 -9391709

Re: [R] Problem with binding data-frames

2007-06-18 Thread Prof Brian Ripley
On Mon, 18 Jun 2007, Petr Klasterecky wrote: Junnila, Jouni napsal(a): Hello, I'm having a problem concerning r-binding datasets. I have six datasets, from six different plates, and two different days. I want to combine these datasets together for analysis. Datasets from day 2, have all

Re: [R] Optimization

2007-06-18 Thread Prof Brian Ripley
From the help page: Note: 'optim' will work with one-dimensional 'par's, but the default method does not work well (and will warn). Use 'optimize' instead. Next, there is a constraint of x=0 that you are not imposing. Finally, it is easy to see that qnorm(0.7, 0.0032, x) is

Re: [R] Upgraded FC4 to FC5 - unable to start device X11 in R

2007-06-16 Thread Prof Brian Ripley
Clearly X11() was found, so grDevices must be on the search path. This error message is about X11 fonts. It is allowed to exclude grDevices from the list of default packages, and if you do, it is not loaded. That is a change in 2.5.0 but not a bug. If you chose not to ask for it, we presume you

Re: [R] converting character strings to numbers

2007-06-15 Thread Prof Brian Ripley
There is no support for 'thousands separators' in R's input/conversion routines, mainly because C has no support either (not even for output in the C standard). We could of course add our own layer, but as far as I am aware this is the first time this has come up. On Thu, 14 Jun 2007, Andrew

Re: [R] gpclib problem

2007-06-15 Thread Prof Brian Ripley
On Fri, 15 Jun 2007, Leonardo Lami wrote: Hi all, I am trying to test the new adehabitat package but I have a problem with a linked library, gpclib. When I try do install it I have this output: install.packages(gpclib, dependencies=TRUE, repos=http://cran.cnr.berkeley.edu/;) Avviso in

Re: [R] method of rpart when response variable is binary?

2007-06-15 Thread Prof Brian Ripley
On Fri, 15 Jun 2007, ronggui wrote: Dear all, I would like to model the relationship between y and x. y is binary variable, and x is a count variable which may be possion-distribution. I think it is better to divide x into intervals and change it to a factor before calling

Re: [R] Problem with workspace loading after languageR use

2007-06-15 Thread Prof Brian Ripley
The problem would appear to be something missing in R. From what I can see you have saved a reference to a package environment in your workspace. When load() tries to resolve this, it calls findPackageEnv and that does not exist in current R (or any recent version I looked at). I think

Re: [R] Problem with workspace loading after languageR use

2007-06-15 Thread Prof Brian Ripley
Brian Ripley wrote: On Fri, 15 Jun 2007, Prof Brian Ripley wrote: I think adding the following to your new session before load() will help findPackageEnv - function(info) as.environment(paste(package, info, sep=:)) this does not work. more likely findPackageEnv - function(info

Re: [R] subscript out of bounds error in lda

2007-06-15 Thread Prof Brian Ripley
On Fri, 15 Jun 2007, Silvia Lomascolo wrote: I work with Windows, R version 2.4.1 I'm trying to do a discriminant analysis and, in trying to figure out how to do it following the example from R help, I'm getting an error that says 'subscript out of bounds'. I don't know what this means and

Re: [R] Panel data

2007-06-14 Thread Prof Brian Ripley
On Wed, 13 Jun 2007, Megh Dal wrote: Then what is the difference between panel data and time series data? You said panel data is data on same subject being tracked over time. But time series data also do the same. Please correct me if I am wrong. Panel data is about several subjects being

Re: [R] make sample() faster

2007-06-14 Thread Prof Brian Ripley
I think the problem is not sample (which is written in C), but that you are calling it with size=1. Taking one sample with probabilities from a large discrete distribution is necessarily slow, but you can take a large sample for little more cost. On Thu, 14 Jun 2007, Rainer M. Krug wrote:

Re: [R] Dates in Windows

2007-06-14 Thread Prof Brian Ripley
%s is of course not documented on ?strftime: it is a glibc extension and marked as such on my Linux man page. But as.numeric(x) gives you the number of days, and as.numeric(as.POSIXct(x)) gives you the number of seconds, equal to 86400*as.numeric(x). [Why are you including empty commands at the

Re: [R] Difference between prcomp and cmdscale

2007-06-14 Thread Prof Brian Ripley
On Thu, 14 Jun 2007, michael watson (IAH-C) wrote: I'm looking for someone to explain the difference between these procedures. The function prcomp() does principal components anaylsis, and the function cmdscale() does classical multi-dimensional scaling (also called principal coordinates

Re: [R] building packages under windows

2007-06-14 Thread Prof Brian Ripley
If you try Rcmd INSTALL mypackage you will get the error messages on the terminal. I've never not seen them in the mypackage.Rcheck/00install.out file, but then I used the correct name. On Thu, 14 Jun 2007, Cinzia Viroli wrote: I tried to check or build a package under windows xp but I

Re: [R] test if files in current folder

2007-06-14 Thread Prof Brian Ripley
On Thu, 14 Jun 2007, Vladimir Eremeev wrote: runner wrote: I want to test if the files are already in my current folder before I download or copy from somewhere else. What's in my mind is to check if a file is open-able in current folder. Is there a way to do this, like in Perl: if

Re: [R] Preserving dates in Excel.

2007-06-14 Thread Prof Brian Ripley
On Thu, 14 Jun 2007, Patnaik, Tirthankar wrote: Hi, Quick question: Say I have a date variable in a data frame or matrix, Which? It matters: see the help page. and I'd like to preserve the date format when using write.table. However, when I export the data, I get the generic number

Re: [R] connecting to DB2 database

2007-06-14 Thread Prof Brian Ripley
On Thu, 14 Jun 2007, Aydemir, Zava (FID) wrote: i am trying to connect to a DB2 server using the DBI library. The DBI *package* does not allow you to connect to anything by itself. For that you need a driver package, currently available for MySQL, ORACLE and SQLite (only, AFAIK). There are

Re: [R] sma package, and MouseArray data set

2007-06-14 Thread Prof Brian Ripley
On Fri, 15 Jun 2007, Peter Dunn wrote: Hi all I have just downloaded the sma package from CRAN. On installing on my linux machine, I get the message library(sma) data(MouseArray) Warning message: file 'MouseArray.RData' has magic number 'RDX1' Use of save versions prior to 2 is

Re: [R] Using dll with Visual Studio Compiler

2007-06-13 Thread Prof Brian Ripley
On Tue, 12 Jun 2007, Ian McCarthy wrote: Hi, I have created a dll in Fortran and used the Visual Studio 2005 Compiler. I've read that certain problems can arise based on the Since Visual Studio does not create Fortran, that's a bit vague. And let us assume you are on Win32, but you failed

Re: [R] PCA for Binary data

2007-06-13 Thread Prof Brian Ripley
On Tue, 12 Jun 2007, Spencer Graves wrote: The problem with applying prcomp to binary data is that it's not clear what problem you are solving. The standard principal components and factor analysis models assume that the observations are linear combinations of unobserved common

Re: [R] passing (or obtaining) index or element name of list to FUN in lapply()

2007-06-13 Thread Prof Brian Ripley
On Tue, 12 Jun 2007, Stephen Tucker wrote: Hello everyone, I wonder if there is a way to pass the index or name of a list to a user-specified function in lapply(). For instance, my desired effect is something like the output of L - list(jack=4098,sape=4139)

Re: [R] Trouble making JRI.jar with Ubuntu and Java6

2007-06-13 Thread Prof Brian Ripley
You have a version mismatch. You haven't told us your version of JRI, but it is not recent enough for R 2.5.0. Also, you told us you are using java-6-sun-1.6.0.00, but the commands you show indicate otherwise. On Tue, 12 Jun 2007, taivo wrote: Hi, Forum newb here, looking for some help.

Re: [R] equivalent of windialog on unix??

2007-06-13 Thread Prof Brian Ripley
?readline On Wed, 13 Jun 2007, BaKaLeGuM wrote: I have on a script something like this toto = winDialog(yesno, Do you want to install the package) if (toto==YES){ but it dont work on unix because of the winDialog i think.. how can i do to change this for unix please? best regards

Re: [R] installing Rgraphviz under fedora 5

2007-06-13 Thread Prof Brian Ripley
The problem is that libgvc.so.3 is not in your dynamic library search path. That's true by default for FC5, it is in /usr/lib64/graphviz on a x86_64 FC5 box. The proper solution is to fix the FC5 graphviz installation to tell ld.so about the location. A simpler way is to add

Re: [R] equivalent of windialog on unix??

2007-06-13 Thread Prof Brian Ripley
and an X11 server accessible. E.g. it does not work on a remote machine in general. 2007/6/13, Prof Brian Ripley [EMAIL PROTECTED]: ?readline On Wed, 13 Jun 2007, BaKaLeGuM wrote: I have on a script something like this toto = winDialog(yesno, Do you want to install the package

Re: [R] How to install RMySQL package in R 2.5 in Windows OS?

2007-06-13 Thread Prof Brian Ripley
On Wed, 13 Jun 2007, Ruixin ZHU wrote: Dear R-users, It seems that install.packages( ) doesn't work to RMySQL package. Under Windows, yes. You need the MySQL client libraries for your version of MySQL (or something very close to the same version), so the only safe way is to install from

Re: [R] Problems with Vista, R 2.5.0 and function save

2007-06-12 Thread Prof Brian Ripley
So you are running R somewhere in your file system where you do not have permission to write. Did you create a shortcut with a working directory set as the rw-FAQ advised you to? On Tue, 12 Jun 2007, Maja Schröter wrote: Hi everyone, I want to make use of the save function but it did not

Re: [R] Building packages with subroutine in fortran 90 under windows xp

2007-06-12 Thread Prof Brian Ripley
The tools do not include an F9x compiler: you need to edit MkRules to specify the path to one (after installing it) (and you did last March). If I do that, I can install and check packages such as oc and wnominate from CRAN that make use of F9x. On Tue, 12 Jun 2007, Cinzia Viroli wrote:

Re: [R] epitools and R 2.5

2007-06-11 Thread Prof Brian Ripley
On Mon, 11 Jun 2007, Pietro Bulian wrote: At work after updating to R 2.5 I get an error using epitab from package epitools, when at home (R 2.4) I get no error. Could someone help me? The maintainer: this is a long-standing bug in the package. But you have enough information from the error

Re: [R] Rounding?

2007-06-11 Thread Prof Brian Ripley
On Mon, 11 Jun 2007, jim holtman wrote: your number 6.6501 is to large to fit in a floating point number. It takes 56 bits and there are only 54 in a real number so the system see it as 6.65 and does the rounding to an even digit; 6.6 I'll take it you mean a IEC60559 double,

Re: [R] lm for matrix of response...

2007-06-10 Thread Prof Brian Ripley
On Sun, 10 Jun 2007, vinod gullu wrote: Dear All, 1)Can I use lm() to fit more than one response in single expression. e.g data is a matrix of these variables R1 R2 R3 X Y Z 1 2 1 1 2 3 Now i wnat to fit R1:R3 ~ X+Y+Z. ?lm says If 'response' is a matrix a linear model is

Re: [R] Need Help with robustbase package: fitnorm2 and plotnorm2

2007-06-08 Thread Prof Brian Ripley
On Fri, 8 Jun 2007, M. Jankowski wrote: This is my first post requesting help to this mailing list. I am new to R. My apologies for any breach in posting etiquette. For future reference, telling us your version of R and exact OS would have helped here. The R posting guide suggests showing

Re: [R] evaluating variables in the context of a data frame

2007-06-08 Thread Prof Brian Ripley
On Thu, 7 Jun 2007, Zack Weinberg wrote: Given D = data.frame(o=gl(2,1,4)) this works as I expected: evalq(o, D) [1] 1 2 1 2 Levels: 1 2 but neither of these does: f - function(x, dat) evalq(x, dat) f(o, D) Error in eval(expr, envir, enclos) : object o not found g - function(x,

Re: [R] glm() for log link and Weibull family

2007-06-08 Thread Prof Brian Ripley
On Fri, 8 Jun 2007, Robert A. LaBudde wrote: I need to be able to run a generalized linear model with a log() link and a Weibull family, or something similar to deal with an extreme value distribution. The Weibull with log link is not a GLM, but survreg() in package survival can fit it, as

Re: [R] opening a file from within a zipfile that is online

2007-06-07 Thread Prof Brian Ripley
'description' has to be a filepath of a zip file. You will have to download it first. On Wed, 6 Jun 2007, [EMAIL PROTECTED] wrote: Hi Reading the help for ?unz I was wondering if I can read data into R from within an zipfile that is on some website, like maybe: dtaa =

Re: [R] Creating an Access (.mdb) database using R

2007-06-07 Thread Prof Brian Ripley
On Wed, 6 Jun 2007, Moshe Olshansky wrote: Hello! I have a short question: Is it possible to create a (non-existing) Access database using R (and if yes, how)? I need to create a new database and then insert a few tables into it. Short answer: yes, if you are using Windows (you did not

Re: [R] update packages with R on Vista: error

2007-06-07 Thread Prof Brian Ripley
See the rw-FAQ, which describes this in detail. Almost certainly you are trying to update the package 'cluster' which is in the main library. But as you used the GUI, we can't see that. On Thu, 7 Jun 2007, Stefan Grosse wrote: Dear R-list, I have encountered the following error message

Re: [R] Use R in a pipeline as a filter

2007-06-07 Thread Prof Brian Ripley
This is one of the things that 'Rscript' is for: see 'An Introduction to R' (section B.4 in the HTML version, http://cran.r-project.org/doc/manuals/R-intro.html#Scripting-with-R). You haven't even told us your version of R or OS (see the posting guide): you need R = 2.5.0 for this. But your

Re: [R] comparison of two logistic regression models

2007-06-07 Thread Prof Brian Ripley
On Thu, 7 Jun 2007, David Barron wrote: You could use lmer in the lme4 package to fit the logistic regression with random effect as it does report the AIC. Indeed you could (lmer reports _an approximation_ to the AIC), but AIC comparison between these two models is not valid as whereas they

Re: [R] R CMD BATCH command

2007-06-06 Thread Prof Brian Ripley
On Tue, 5 Jun 2007, Peter Dalgaard wrote: Austin, Peter wrote: The version of R on our unix system has been updated to version 2.5.0. When I type the following command at the unix prompt: 'R CMD BATCH filename' I receive the following error message: Error in Sys.unsetenv(R_BATCH) :

Re: [R] rJava installation under linux: configuration failed

2007-06-06 Thread Prof Brian Ripley
On Wed, 6 Jun 2007, Stefan Grosse wrote: Which java have you installed? ( java -version ) You need a Sun Java and better is a 1.5 series Java, JGR seems to have some problem with the new 1.6 series. And you need the JDK, not the JRE. Precautionary note: the '1.5 series Java' (aka Java 5)

Re: [R] sampling problem - new to R

2007-06-06 Thread Prof Brian Ripley
On Tue, 5 Jun 2007, baldeck wrote: I have a data set of individual trees and the plots that they are in: Tree Plot 567491 634941 873751 374942 927533 348473 387474 etc... You haven't told us what form the 'data set' is, but I will presume a data frame

Re: [R] compiling from source on Vista

2007-06-06 Thread Prof Brian Ripley
On Wed, 6 Jun 2007, Erin Hodgess wrote: Dear R People: In the R Installation and Administration manual, there is a note that the process used to compile R from source will NOT work on Windows Vista. Does anyone know if that situation has changed, please? That's not quite what it says:

Re: [R] Latex \ell symbol in plotmath

2007-06-05 Thread Prof Brian Ripley
On Tue, 5 Jun 2007, Mario dos Reis wrote: Is it possible to use the '\ell' (i.e. the log likelihood) in plots? 'plots'? On what OS and what device? (There is no general solution here.) I've been browsing the plotmath documentation unsucesfully. That symbol is in neither of the Latin-1

Re: [R] Problems with Merge

2007-06-05 Thread Prof Brian Ripley
Take a look at the help for merge(): in all the examples by.x is a character string, not a one-column data frame which is what rhistory[Date] would appear to be. Please note the trailer of this messsage. On Tue, 5 Jun 2007, Patnaik, Tirthankar wrote: Hi, I have a history dataset, a matrix

Re: [R] Latex \ell symbol in plotmath

2007-06-05 Thread Prof Brian Ripley
On Tue, 5 Jun 2007, Mario dos Reis wrote: I am using R 2.5.0 on Fedora Linux core 6, AMD 64. So for a suitable font you should be able to make this work on X11: I did on my FC5 Opteron system (but the fonts are on a fully loaded separate font server). Prof Brian Ripley wrote: On Tue, 5 Jun

Re: [R] Latex \ell symbol in plotmath

2007-06-05 Thread Prof Brian Ripley
On Tue, 5 Jun 2007, Alberto Monteiro wrote: Prof Brian Ripley wrote: It is Unicode character U+2113, and so on UTF-8 R systems you may well be able to enter it as \u2113 and get it plotted on-screen in a suitable font. But we'd need to know a lot more about your system to advise on how

Re: [R] Refactor all factors in a data frame

2007-06-05 Thread Prof Brian Ripley
On Tue, 5 Jun 2007, John Fox wrote: Dear Hilmar, You could use something like DF - as.data.frame(lapply(DF, function (x) if (is.factor(x)) factor(x) else x)) Where DF is the data frame. I think DF[] - lapply(DF, [, drop=TRUE) is more likely to be what is wanted. That drops factor

Re: [R] Inverse of encodeString

2007-06-05 Thread Prof Brian Ripley
On Tue, 5 Jun 2007, Alberto Monteiro wrote: What is the inverse of encodeString? For example, \u1 is some Unicode symbol. If I do s - encodeString(\u1) then s will be the string \001. But anything I do with s, will not return the Unicode that corresponds to \u1: cat(s, \n) # prints \001

Re: [R] read table

2007-06-05 Thread Prof Brian Ripley
On Tue, 5 Jun 2007, Sarah Goslee wrote: The default separator in read.table is white space, so the first line (header) has 6 elements, the second line has 7 elements, and the third has 8 elements. Either delete the spaces in the car names, or use sep=\t (or whatever is appropriate). Or add

Re: [R] How to obtain coefficient standard error from the result of polr?

2007-06-04 Thread Prof Brian Ripley
On Mon, 4 Jun 2007, [EMAIL PROTECTED] wrote: Hi - I am using polr. I can get a result from polr fit by calling result.plr - polr(formula, data=mydata, method=probit); However, from the 'result.plr', how can I access standard error of the estimated coefficients as well as the t statistics

Re: [R] reading file. xls

2007-06-04 Thread Prof Brian Ripley
On Mon, 4 Jun 2007, [EMAIL PROTECTED] wrote: Hi friends, I have a file.xls entitled Dali which is composed of two columns: the first is entitled imp and the second is entitled:exp. I putted The file Dali in the following way:C:/programfiles/R 2.4.0. I have used the following

Re: [R] Beginners Question

2007-06-03 Thread Prof Brian Ripley
you very much for your answer. Isn't it possible to tell the isoMDS function that it should ignore doubled values with the same value? Or is there a possible to delete all the doubled values from the x.dist? Best regards, Tom Prof Brian Ripley schrieb: That two distances are the same

Re: [R] What is the maximum size of a matrix?

2007-06-02 Thread Prof Brian Ripley
Thanks Marc. The information is in help(Memory-limits). We are aware that at some point we will need to raise this limit and have discussed ways to do so. But it is not going to be an issue for a while: working with 16Gb objects needs the sort of amount of memory that will not become common

Re: [R] Beginners Question

2007-06-02 Thread Prof Brian Ripley
That two distances are the same is *not* what the message says. You can't just look at elements of the results of dist() and simply relate them back to object numbers. Try as.matrix(x.dist) for a human-readable form. On Fri, 1 Jun 2007, Thomas Zastrow wrote: Dear all, I'm completely new

Re: [R] A question regarding package development

2007-06-01 Thread Prof Brian Ripley
On Thu, 31 May 2007, Saptarshi Guha wrote: Hi, I am writing a package which requires the ANN(Approx N.Neighbors) library (found here http://www.cs.umd.edu/~mount/ANN/). My package directory looks something like this atry/ atry/src/ann/ --ann source is here

Re: [R] Proxy Under Mac OS X

2007-06-01 Thread Prof Brian Ripley
The most 'relevant document' is ?download.file, and there is AFAIK nothing specific to MacOS X about the code (and I did write it). You can use Sys.setenv(http_proxy=http://un:[EMAIL PROTECTED]:port) at the start of your R session, or use http_proxy=http://un:[EMAIL PROTECTED]:port in your

Re: [R] Getting names of objects passed with ...

2007-06-01 Thread Prof Brian Ripley
On Fri, 1 Jun 2007, Henrik Bengtsson wrote: I use: foo - function(...) { args - list(...); names(args); } But that does not do what was asked: it gets the argument names, not the object names. (Did you actually try it?) It looks from the example that he wants the argument name if

Re: [R] TS or citrix with R?

2007-06-01 Thread Prof Brian Ripley
It certainly runs under Windows terminal services. Since it is just a standard Windows application I see not reason why it should not run under Citrix, but have no first-hand experience. On Fri, 1 Jun 2007, Patrick Haurie wrote: Hi, Does R runs under citrix version 4 environnement or

Re: [R] Getting names of objects passed with ...

2007-06-01 Thread Prof Brian Ripley
How about foo - function(...) { m - as.list(match.call(expand.dots=TRUE))[-1] nm - names(m) for(i in seq_along(m)) if(!nchar(nm[i])) nm[i] - deparse(m[[i]]) nm } Such things are hard to do from R level, hence the use of match.call to do it at C level. On Fri, 1 Jun 2007, Mike

Re: [R] sizing and saving graphics in R

2007-05-31 Thread Prof Brian Ripley
Why not plot directly to a bitmapped format, using bmp() or png()? That way you can create a large 'display region' when you open the device. BTW, I guess you are on Windows but you did not say so: bmp() only exists on Windows. On Wed, 30 May 2007, Felicity Jones wrote: Dear R wizards, I

Re: [R] how to preserve trained model in LDA?

2007-05-31 Thread Prof Brian Ripley
On Wed, 30 May 2007, Feng Qiu wrote: Hi all: I'm developing an application in which I use standard data to train the model in LDA and use the trained model to predict on test data. I can't train the model every time when I do prediction. So I need to save the trained model

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