Re: [R] Read In and Output Postscript file
On Wed, Jan 28, 2004 at 05:31:11PM -0600, Marc Schwartz wrote: On Wed, 2004-01-28 at 14:19, Brad Holmes wrote: Would it be possible to read in a pre-existing postscript file, and output it as is through R? I have five plots, and I am placing them in a layout that is 2 X 3. I was hoping to insert the pre-existing postscript file made from Molscript in the last spot. Your e-mail header suggests that you are on a Mac. If you have access to MS Word or an alternate document processing program like OpenOffice or a functional equivalent, you can import EPS files into a table, with each graphic going into a cell in the table. You can then print the document to a PS file, using a PS printer driver. Others may have alternate ideas. Yes: I'd recommend Illustrator rather than Word/OOo for this. But actually, the original question got me curious. How difficult would it be to add EPS import to the postscript device? Other devices could just ignore it or simply read the bounding box and insert the usual empty box which says EPS file. I guess I'll go for a litte walk in the source code when I have a little spare time to burn. ;-) I mean - this could be really usefull: Finally R would be capable of producing the wealth of chartjunk other software has offered for decades! Imagine using your corporate logo instead of boring circles or dots for plotting! (OK ok - ouch - don't beat me, please...) ;-) cu Philipp -- Dr. Philipp PagelTel. +49-89-3187-3675 Institute for Bioinformatics / MIPS Fax. +49-89-3187-3585 GSF - National Research Center for Environment and Health Ingolstaedter Landstrasse 1 85764 Neuherberg, Germany __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R]Running R remotely in Windows Environment?
On Wed, 28 Jan 2004, Jim Porzak wrote: We are considering setting up a fast, RAM loaded machine as an R-server to handle the big problems not suitable for individual desktops and, also, to process ad hoc analysis requests via our portal. We are 99% a Windows shop, so first choice is a windows server. We'll use (D)COM for the portal interface and understand that. What has me stumped is how to easily interface individual analyst's Windows desktops to the R-server. I haven't seen anything in the archives, but I can't imagine this hasn't been done. What am I missing? R is not designed to be client-server on Windows. People I know who do this use Windows Terminal Server or Citrix. I would question the value of this approach. Unless you propose to run 64-bit Windows, a `RAM loaded' machine isn't `loaded', and R under Windows handles large amounts of memory much less effectively than under Linux. 64-bit Windows is uncharted territory for R, whereas 64-bit Unix/Linux is well trodden. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Finding Sweave.sty and other problems
~ is an active character in TeX, so it assumes it is not in a filename. You will need to escape it. It would be better to have \usepackage{Sweave} there and the path in your TEXINPUTS. TeX is not really designed to work with file paths. On Thu, 29 Jan 2004, Murray Jorgensen wrote: Hi, I've just tried to run example-3 from Friedrich Leish. I'm using R 1.8.1 and MiKTeX 2.2 on Windows XP. I go === library(tools) Sweave(example-3.Snw) Writing to file example-3.tex Processing code chunks ... 1 : term hide 2 : echo term verbatim 3 : term tex 4 : term verbatim eps pdf You can now run LaTeX on example-3.tex === The file example-3.tex looks OK, it starts off === \documentclass[a4paper]{article} \usepackage{C:/PROGRA~1/R/rw1081/share/texmf/Sweave} \begin{document} \section*{The Cats Data} .. === but my LaTeX log file tells a sad story: === This is TeX, Version 3.141592 (MiKTeX 2.2) (preloaded format=latex 2000.11.28) 29 JAN 2004 16:36 **example-3.tex (example-3.tex LaTeX2e 2001/06/01 Babel v3.7h and hyphenation patterns for english, french, german, ngerman, du mylang, nohyphenation, loaded. (C:\texmf\tex\latex\base\article.cls Document Class: article 2001/04/21 v1.4e Standard LaTeX document class (C:\texmf\tex\latex\base\size10.clo File: size10.clo 2001/04/21 v1.4e Standard LaTeX file (size option) ) [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] \abovecaptionskip=\skip41 \belowcaptionskip=\skip42 \bibindent=\dimen102 ) ! Missing \endcsname inserted. to be read again \protect l.4 \begin {document} ? s OK, entering \scrollmode... ! LaTeX Error: Missing \begin{document}. See the LaTeX manual or LaTeX Companion for explanation. Type H return for immediate help. ... l.4 \begin {document} You're in trouble here. Try typing return to proceed. If that doesn't work, type X return to quit. ! Extra \endcsname. [EMAIL PROTECTED] [EMAIL PROTECTED] -h@@k\endcsname [EMAIL PROTECTED] \let \CurrentOptio... l.4 \begin {document} I'm ignoring this, since I wasn't doing a \csname. ! Missing \endcsname inserted. to be read again \protect l.4 \begin {document} The control sequence marked to be read again should not appear between \csname and \endcsname. ! Extra \endcsname. [EMAIL PROTECTED]@aded ...er \ifx \csname [EMAIL PROTECTED] \relax \expandafter [EMAIL PROTECTED] l.4 \begin {document} I'm ignoring this, since I wasn't doing a \csname. ! Missing \endcsname inserted. to be read again \protect l.4 \begin {document} The control sequence marked to be read again should not appear between \csname and \endcsname. ! Extra \endcsname. [EMAIL PROTECTED]@ptions ...xdef \csname [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] l.4 \begin {document} I'm ignoring this, since I wasn't doing a \csname. ! Missing \endcsname inserted. to be read again \protect l.4 \begin {document} The control sequence marked to be read again should not appear between \csname and \endcsname. ! Missing \endcsname inserted. to be read again \protect l.4 \begin {document} The control sequence marked to be read again should not appear between \csname and \endcsname. ! Extra \endcsname. argument ...e/texmf/[EMAIL PROTECTED] \endcsname , l.4 \begin {document} I'm ignoring this, since I wasn't doing a \csname. ! Missing \endcsname inserted. to be read again \protect l.4 \begin {document} The control sequence marked to be read again should not appear between \csname and \endcsname. ! Extra \endcsname. argument [EMAIL PROTECTED]@currname [EMAIL PROTECTED] \endcsname [EMAIL PROTECTED] \InputIfFileExists... l.4 \begin {document} I'm ignoring this, since I wasn't doing a \csname. ! LaTeX Error: File `C:/[EMAIL PROTECTED] \penalty [EMAIL PROTECTED] \ {}1/R/rw1081/share /texmf/Sweave.sty' not found. Type X to quit or RETURN to proceed, or enter new name. (Default extension: sty) Enter file name: x Overfull \hbox (689.89102pt too wide) in paragraph at lines 4--4 [][] \OT1/cmr/m/n/10 1/R/rw1081/share/texmf/Sweave.sty-h@@k 1/R/rw1081/share/te xmf/Sweave.sty1/R/rw1081/share/texmf/Sweave.sty1/R/rw1081/share/texmf/Sweave.st y, 1/R/rw1081/share/texmf/Sweave.sty 1/R/rw1081/share/texmf/Sweave.sty [] ) (\end occurred when \ifx on line 4 was
Re: [R] How to generate a report with graphics and tables?
Liaw, Andy wrote: If you don't mind pdf report generated from LaTeX, Sweave would probably work nicely for you. See the two articles on it in R News, which you can find on the R web site. One other possibility is to use the R2HTML package (and maybe the xtable package, too) to write the `report' in HTML. HTH, Andy From: Olaf Bürger Hello R-Users, I have some data sets which change on a daily bases. So far I have imported these sets into R, done all my evaluations resulting in a couple of plots, charts and tables of numbers which I copypasted via clipboard into Powerpoint. The procedure is always the same and I wonder, whether there is no easier way for doing so. Is there some type of report generator available or some HowTo on this. Can anybody give me a hint on where to look for? Regards, Olaf Bürger A third way is to use the R function ff: Step 1: define a raw latex-report with R expressions (e.g. report.tex) Step 2: modify some expressions in the raw report according the local situation (data sets, etc.) Step 3: start R and evaluate ff(report.tex) Step 4: latex report Step 5: repeat 2-4 for the different data sets Here is the link to the rd file: See: http://www.wiwi.uni-bielefeld.de/~wolf/software/R-wtools/formfill/ff.html or http://www.wiwi.uni-bielefeld.de/~wolf/software/R-wtools/formfill/ff.rd Peter Wolf __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Math Expression and Variable Value in Title
Roger == Roger D Peng [EMAIL PROTECTED] on Wed, 28 Jan 2004 19:35:28 -0500 writes: Roger Use substitute() Yes! Roger n - 20 Roger plot(0, 0, main = substitute(paste(n[i], = , k), list(k = n))) but even better is plot(0, 0, main = substitute(n[i] == k, list(k = n))) (note the == !) Martin __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Calculating/understanding variance-covariance matrix of logistic regression (lrm $var)
Karl == Karl Knoblick [EMAIL PROTECTED] on Thu, 29 Jan 2004 02:34:27 +0100 (CET) writes: Karl Hallo! Karl I want to understand / recalculate what is done to get Karl the CI of the logistic regression evaluated with lrm. Karl As far as I came back, my problem is the Karl variance-covariance matrix fit$var of the fit Karl (fit-lrm(...), fit$var). Here what I found and where Karl I stucked: Karl - Karl library(Design) . The usual (official) R (and S) way for this is using r - glm(..., family = binomial) with predict(r, .., se.fit=TRUE) and vcov(r) giving the variance-covariance matrix, calling the vcov.glm(.) method in this case, which it self mainly relies on summary.glm(.). --- As you see yourself, lrm() is from a particular CRAN package by Prof Frank Harrell and if you really want that, you should ask the package author -- as you are told in the posting guide (you should read! -- see the last line of every R-help message). Regards, Martin Maechler [EMAIL PROTECTED] http://stat.ethz.ch/~maechler/ Seminar fuer Statistik, ETH-Zentrum LEO C16Leonhardstr. 27 ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND phone: x-41-1-632-3408 fax: ...-1228 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R]Running R remotely in Windows Environment?
Hi, I also suggest to use a Linux Server. You can work on this machine via ssh (e.g. with PuTTY) and transfer the input and output files with scp or a samba server (which is easy to install and very convenient to use for windows users). Arne On Thursday 29 January 2004 08:53, Prof Brian Ripley wrote: On Wed, 28 Jan 2004, Jim Porzak wrote: We are considering setting up a fast, RAM loaded machine as an R-server to handle the big problems not suitable for individual desktops and, also, to process ad hoc analysis requests via our portal. We are 99% a Windows shop, so first choice is a windows server. We'll use (D)COM for the portal interface and understand that. What has me stumped is how to easily interface individual analyst's Windows desktops to the R-server. I haven't seen anything in the archives, but I can't imagine this hasn't been done. What am I missing? R is not designed to be client-server on Windows. People I know who do this use Windows Terminal Server or Citrix. I would question the value of this approach. Unless you propose to run 64-bit Windows, a `RAM loaded' machine isn't `loaded', and R under Windows handles large amounts of memory much less effectively than under Linux. 64-bit Windows is uncharted territory for R, whereas 64-bit Unix/Linux is well trodden. -- Arne Henningsen Department of Agricultural Economics University of Kiel Olshausenstr. 40 D-24098 Kiel (Germany) Tel: +49-431-880 4445 Fax: +49-431-880 1397 [EMAIL PROTECTED] http://www.uni-kiel.de/agrarpol/ahenningsen/ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Math Expression and Variable Value in Title
An alternative but also higly recommendable way is the use of the psfrag-package in your LaTeX-file. It is furthermore very simple in use. Type plot(1:10, main=test) in your LaTeX-file you insert in your figure-environment the command \psfrag{test}{$n_i=20$} before you call the \includegraphics{} best regards yours s. Wolfgang Viechtbauer wrote: Hello All, I am trying to put a math expression into a plot title and at the same time, I want a value in the title to depend on a variable that I set earlier. Simple Example: n - 20 plot(0, 0) title(expression(paste(n[i], = , n))) Obviously, I want n_i = 20. How can I get that? Thanks in advance, -- Salvatore Barbaro University of Goettingen Department of Public Economics Platz der Goettinger Sieben 3 D-37073 Goettingen Phone: +49 551 3919704 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Re: conditional assignment
Hi all again I could not reply before because I was/am very busy ifthenelse() is what I wanted, I have to read more carefully your explanations to better understand it Thanks everybody Ulisses On Mon, Jan 26, 2004 at 08:15:51PM +0100, [EMAIL PROTECTED] wrote: Hi all I want to conditionally operate on certain elements of a matrix, let me explain it with a simple vector example z- c(1, 2, 3) zz - c(0,0,0) null - (z 2) ( zz - z) zz [1] 1 2 3 why zz is not (0, 0, 3) ? the null - assignment is to keep the console silent in the other hand, it curious that null has reasonable values null [1] FALSE FALSE TRUE Thanks in advance Ulisses Debian GNU/Linux: a dream come true - Computers are useless. They can only give answers.Pablo Picasso Humans are slow, innaccurate, and brilliant. Computers are fast, acurrate, and dumb. Together they are unbeatable --- Visita http://www.valux.org/ para saber acerca de la--- --- Asociación Valenciana de Usuarios de Linux --- -- Debian GNU/Linux: a dream come true - Computers are useless. They can only give answers.Pablo Picasso Humans are slow, innaccurate, and brilliant. Computers are fast, acurrate, and dumb. Together they are unbeatable ---Visita http://www.valux.org/ para saber acerca de la--- ---Asociación Valenciana de Usuarios de Linux --- __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Help in error : SAM function in library siggenes
Hi, I had the following situation and I greatly appreciate any advice. SAM gave the following error : Error in var(v) : missing observations in cov/cor when applied on a dataset. The error was traced to a variance computation of a vector containing NA in fudge() [a subroutine called by SAM()]. This vector is a computational output in fudge() : cv[i] - sqrt(var(v))/mean(v) The same error was encountered when SAM was applied to other similar datasets. Would modifying the statement to var(v, na.rm=TRUE) be a possibility? Many thanks, Siew Leng R-1.8.1 on Windows XP Home Edition Code snippets : data - matrix(runif(25, 0,1), nrow=5) x - 1 : 5 sam(data, x) __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] How to generate a report with graphics and tables?
Hello R-Users, I have some data sets which change on a daily bases. So far I have imported these sets into R, done all my evaluations resulting in a couple of plots, charts and tables of numbers which I copypasted via clipboard into Powerpoint. ^^ Hello Olaf, if you follow the previously given advices, i.e using Sweave/LaTeX, you might consider the package pdfscreen and/or an utility program ppower, to enhance your LaTeX-presentation. HTH, Bernhard http://www.tp4.ruhr-uni-bochum.de/SoftwareDocs/pdfsc/pdfscr-doc.html http://www.ctan.org/tex-archive/support/ppower4/?action=/tex-archive/support / The procedure is always the same and I wonder, whether there is no easier way for doing so. Is there some type of report generator available or some HowTo on this. Can anybody give me a hint on where to look for? Regards, Olaf Bürger __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html The information contained herein is confidential and is intended solely for the addressee. Access by any other party is unauthorised without the express written permission of the sender. If you are not the intended recipient, please contact the sender either via the company switchboard on +44 (0)20 7623 8000, or via e-mail return. If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Finding Sweave.sty and other problems
Hmmm, I can certainly remove the path from the \usepackage command. (Now that I come to think of it, I have never seen that in LaTeX before.) I wonder why Sweave put it there in the first place? I thought that I was just running it straight out of the box. Don't tell me though: I will read the manual some more. Murray At 07:59 29/01/2004 +, Prof Brian Ripley wrote: ~ is an active character in TeX, so it assumes it is not in a filename. You will need to escape it. It would be better to have \usepackage{Sweave} there and the path in your TEXINPUTS. TeX is not really designed to work with file paths. On Thu, 29 Jan 2004, Murray Jorgensen wrote: Hi, I've just tried to run example-3 from Friedrich Leish. I'm using R 1.8.1 and MiKTeX 2.2 on Windows XP. I go === library(tools) Sweave(example-3.Snw) Writing to file example-3.tex Processing code chunks ... 1 : term hide 2 : echo term verbatim 3 : term tex 4 : term verbatim eps pdf You can now run LaTeX on example-3.tex === The file example-3.tex looks OK, it starts off === \documentclass[a4paper]{article} \usepackage{C:/PROGRA~1/R/rw1081/share/texmf/Sweave} \begin{document} \section*{The Cats Data} .. === but my LaTeX log file tells a sad story: Dr Murray Jorgensen http://www.stats.waikato.ac.nz/Staff/maj.html Department of Statistics, University of Waikato, Hamilton, New Zealand Email: [EMAIL PROTECTED]Fax 7 838 4155 Phone +64 7 838 4773 wk+64 7 849 6486 homeMobile 021 1395 862 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Math Expression and Variable Value in Title
Note that this will circumvent all the careful work in R to align the plotmath text correctly. In your case that includes having space for the subscript. It may not matter for main titles, but it certainly does for ylab or axis annotation or People might be producing PDF or Windows metafiles. I often produce PDF figures for inclusion in my PDF lecture slides. On Thu, 29 Jan 2004, Salvatore Barbaro wrote: An alternative but also higly recommendable way is the use of the psfrag-package in your LaTeX-file. It is furthermore very simple in use. Type plot(1:10, main=test) in your LaTeX-file you insert in your figure-environment the command \psfrag{test}{$n_i=20$} before you call the \includegraphics{} best regards yours s. Wolfgang Viechtbauer wrote: Hello All, I am trying to put a math expression into a plot title and at the same time, I want a value in the title to depend on a variable that I set earlier. Simple Example: n - 20 plot(0, 0) title(expression(paste(n[i], = , n))) Obviously, I want n_i = 20. How can I get that? Thanks in advance, -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] Math Expression and Variable Value in Title
A quick comment. paste() is not needed here; you can get = using '==' as follows substitute(n[i]==k, list=list(k=n)) Cheers Henrik -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roger D. Peng Sent: den 29 januari 2004 01:35 To: Wolfgang Viechtbauer Cc: [EMAIL PROTECTED] Subject: Re: [R] Math Expression and Variable Value in Title Use substitute() n - 20 plot(0, 0, main = substitute(paste(n[i], = , k), list(k = n))) -roger Wolfgang Viechtbauer wrote: Hello All, I am trying to put a math expression into a plot title and at the same time, I want a value in the title to depend on a variable that I set earlier. Simple Example: n - 20 plot(0, 0) title(expression(paste(n[i], = , n))) Obviously, I want n_i = 20. How can I get that? Thanks in advance, __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailma n/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Help in error : SAM function in library siggenes
On Thu, 29 Jan 2004 01:03:56 -0800 (PST), you wrote: Hi, I had the following situation and I greatly appreciate any advice. SAM gave the following error : Error in var(v) : missing observations in cov/cor when applied on a dataset. The error was traced to a variance computation of a vector containing NA in fudge() [a subroutine called by SAM()]. This vector is a computational output in fudge() : cv[i] - sqrt(var(v))/mean(v) The same error was encountered when SAM was applied to other similar datasets. Would modifying the statement to var(v, na.rm=TRUE) be a possibility? SAM() and sam() are different names in R, but neither of them is in the base packages. Which package did you find sam() in? You probably want to ask the author of the package if this modification would be safe. Duncan Murdoch __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] How to generate a report with graphics and tables?
From: Pfaff, Bernhard Hello R-Users, I have some data sets which change on a daily bases. So far I have imported these sets into R, done all my evaluations resulting in a couple of plots, charts and tables of numbers which I copypasted via clipboard into Powerpoint. ^^ Hello Olaf, if you follow the previously given advices, i.e using Sweave/LaTeX, you might consider the package pdfscreen and/or an utility program ppower, to enhance your LaTeX-presentation. or even prosper: http://prosper.sourceforge.net/ Andy HTH, Bernhard http://www.tp4.ruhr-uni-bochum.de/SoftwareDocs/pdfsc/pdfscr-doc.html http://www.ctan.org/tex-archive/support/ppower4/?action=/tex-archive/support -- Notice: This e-mail message, together with any attachments,...{{dropped}} __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Help in error : SAM function in library siggenes
siggenes is part of Bioconductor, and the author is Holger Schwender. You should ask Holger first ([EMAIL PROTECTED]), and the BioC list second. Best, Jim James W. MacDonald Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623 Duncan Murdoch [EMAIL PROTECTED] 01/29/04 06:54AM On Thu, 29 Jan 2004 01:03:56 -0800 (PST), you wrote: Hi, I had the following situation and I greatly appreciate any advice. SAM gave the following error : Error in var(v) : missing observations in cov/cor when applied on a dataset. The error was traced to a variance computation of a vector containing NA in fudge() [a subroutine called by SAM()]. This vector is a computational output in fudge() : cv[i] - sqrt(var(v))/mean(v) The same error was encountered when SAM was applied to other similar datasets. Would modifying the statement to var(v, na.rm=TRUE) be a possibility? SAM() and sam() are different names in R, but neither of them is in the base packages. Which package did you find sam() in? You probably want to ask the author of the package if this modification would be safe. Duncan Murdoch __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R]Running R remotely in Windows Environment?
I would also give my votes to Linux. That's essentially the main function of our Linux boxes, and some of the boxes are `RAM loaded'. We just use VNC to connect from the Windoze desktop to the Linux boxes. We can mount the Windows shared drives on the Linux boxes for file sharing. One of my former interns ran all her R sessions from a Windows shared drive on a Linux box. Andy From: Jim Porzak We are considering setting up a fast, RAM loaded machine as an R-server to handle the big problems not suitable for individual desktops and, also, to process ad hoc analysis requests via our portal. We are 99% a Windows shop, so first choice is a windows server. We'll use (D)COM for the portal interface and understand that. What has me stumped is how to easily interface individual analyst's Windows desktops to the R-server. I haven't seen anything in the archives, but I can't imagine this hasn't been done. What am I missing? TIA! Jim Porzak Director of Analytics Loyalty Matrix, Inc. www.LoyaltyMatrix.com -- Notice: This e-mail message, together with any attachments,...{{dropped}} __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Doubt about pattern
Hi All, I have a very simple problem. I have several files in a same directory. I would like to send for an object only the files that finish in .sens.. I execute the command below, files - dir(pattern=*.sens) but it includes all of the files that have sens, independent of they be in the end or in the middle of the name of the file. How could I solve this? I sought in the html_help but I didn't find similar to this. My files script_sens.txt, Sen_155_01_R1.sens, Sen_155_01_R2.sens, Sen_155_01_R3.sens, Sen_155_02_R1.sens, Sen_155_02_R2.sens, Sen_155_02_R3.sens, Sen_155_03_R1.sens, Sen_155_03_R2.sens, Sen_155_03_R3.sens, tome2sens_time1sens.txt Tahnks very much -- Marcelo Luiz de Laia, M.Sc. Dep. de Tecnologia, Lab. Bioquímica e de Biologia Molecular Universidade Estadual Paulista - UNESP Via de Acesso Prof. Paulo Donato Castelane, Km 05 14.884-900 - Jaboticabal, SP, Brazil PhoneFax: 16 3209-2675/2676/2677 R. 202/208/203 (trab.) HomePhone: 16 3203 2328 - www.lbm.fcav.unesp.br - [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] setMethodReplace.. Help!
Hi! Trying to reproduce some examples from Programming with Data page 341. Can not reproduce it neither on R1.8.1. nor R1.9.0devel? library(methods) setClass(track,representation(x=numeric,y=numeric)) setMethod([ ,track ,function(x,...,drop=T){ track([EMAIL PROTECTED],[EMAIL PROTECTED]) } ) In method for function [: Expanding the signature to include omitted arguments in definition: i = missing, j = missing Error in .MakeSignature(new(signature), def, signature) : The names in signature for method (x, , ) don't match function's arguments (x, i, j, drop) The same setReplaceMethod([,track ,function(x,...,value) { [EMAIL PROTECTED](value,numeric) } ) Please Help. Eryk. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Loglienar models
Hello, I'm planning to start using R. Before getting into it, I'd like to ask a couple of questions. Does R carry out loglinear model analysis? That is, will it provide the chi-squared goodness of fit test statistic for a given hierarchical loglinear model? Maybe even do a model selection procedure (like Brown's two-step procedure, or forward/backward selection)? Thanks for your help. ---Harry Khamis -- Harry Khamis Statistical Consulting Center Wright State University Dayton, OH 45435 USA Phone: (937) 775-2433 Fax: (937) 775-2081 Homepage: www.math.wright.edu/People/Harry_Khamis/index.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R]Running R remotely in Windows Environment?
Jim, I would really like to reiterate Professor Ripley's and Arne Henningsen comments. The problem goes for any analytic software or system you might want to use, not just R. My impression is that at least for part of it, you want the individual users to use R as they would on their own desktops. (If that is not the case, much of the rest of this note is pure FYI.) Even in its most advanced 2003 Server edition, Windows is simply not designed to be a multi-user system. Sure, it can reliably host a web server that may need to run quick bursts of R batch-type jobs (analytics) and return results to a client (e.g. web browser), but that does not sound like what you are looking for (at least in part). And beyond the technical limitations, use of Windows Terminal Server (Remote Desktop) / Citrix, etc. will cost much money and implementation hassle and probably even legal headaches. We have had colleagues here at Merck (over my and Andy Liaw's disbelief) that have tried to shoehorn Windows this way, and even the speed of single, small jobs by 1 logged-on took longer on the server than on their much less powerful laptops. A Linux solution is very flexible, in our experiences (we have Windows XP as corporate desktop standard). As stated, with Samba, you can map directories that look like just another drive in Windows Explorer. Printing is just as transparent in either direction. VNC (Virtual Network Computing) is very, very nice to provide the individual user's Linux environment as just another window on their Windows desktop. With the free utility of autocutsel, clipboards can be synchronized for ease of cutting and pasting. And KDE, one of several window manager analogues to Windows, is very sophisticated and shares a lot in common with the Windows GUI from a user operations standpoint. While it may sound like a hassle to get up and running now if your shop is currently 99% Windows, the benefit will absolutely be clear later. Hope that helps, Bill Bill Pikounis, Ph.D. Biometrics Research Department Merck Research Laboratories PO Box 2000, MailDrop RY33-300 126 E. Lincoln Avenue Rahway, New Jersey 07065-0900 USA Phone: 732 594 3913 Fax: 732 594 1565 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Arne Henningsen Sent: Thursday, January 29, 2004 3:45 AM To: Jim Porzak Cc: [EMAIL PROTECTED] Subject: Re: [R]Running R remotely in Windows Environment? Hi, I also suggest to use a Linux Server. You can work on this machine via ssh (e.g. with PuTTY) and transfer the input and output files with scp or a samba server (which is easy to install and very convenient to use for windows users). Arne On Thursday 29 January 2004 08:53, Prof Brian Ripley wrote: On Wed, 28 Jan 2004, Jim Porzak wrote: We are considering setting up a fast, RAM loaded machine as an R-server to handle the big problems not suitable for individual desktops and, also, to process ad hoc analysis requests via our portal. We are 99% a Windows shop, so first choice is a windows server. We'll use (D)COM for the portal interface and understand that. What has me stumped is how to easily interface individual analyst's Windows desktops to the R-server. I haven't seen anything in the archives, but I can't imagine this hasn't been done. What am I missing? R is not designed to be client-server on Windows. People I know who do this use Windows Terminal Server or Citrix. I would question the value of this approach. Unless you propose to run 64-bit Windows, a `RAM loaded' machine isn't `loaded', and R under Windows handles large amounts of memory much less effectively than under Linux. 64-bit Windows is uncharted territory for R, whereas 64-bit Unix/Linux is well trodden. -- Arne Henningsen Department of Agricultural Economics University of Kiel Olshausenstr. 40 D-24098 Kiel (Germany) Tel: +49-431-880 4445 Fax: +49-431-880 1397 [EMAIL PROTECTED] http://www.uni-kiel.de/agrarpol/ahenningsen/ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Notice: This e-mail message, together with any attachments,...{{dropped}} __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Doubt about pattern
Marcelo Luiz de Laia wrote: [...] only the files that finish in .sens.. I execute the command below, files - dir(pattern=*.sens) files - list.files(./, \.sens$) -- Michael T. Mader Institute for Bioinformatics/MIPS, GSF Ingolstaedter Landstrasse 1 D-85764 Neuherberg 0049-89-3187-3576 response time (n.) An unbounded, random variable Tr associated with a given TIMESHARING system and representing the putative time which elapses between Ts, the time of sending a message, and Te, the time when the resulting error diagnostic is received. S. Kelly-Bootle, The Devil's DP Dictionary __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Doubt about pattern
On Thu, 29 Jan 2004 11:33:25 -0300, Marcelo Luiz de Laia [EMAIL PROTECTED] wrote : Hi All, I have a very simple problem. I have several files in a same directory. I would like to send for an object only the files that finish in .sens.. I execute the command below, files - dir(pattern=*.sens) but it includes all of the files that have sens, independent of they be in the end or in the middle of the name of the file. How could I solve this? I sought in the html_help but I didn't find similar to this. My files script_sens.txt, Sen_155_01_R1.sens, Sen_155_01_R2.sens, Sen_155_01_R3.sens, Sen_155_02_R1.sens, Sen_155_02_R2.sens, Sen_155_02_R3.sens, Sen_155_03_R1.sens, Sen_155_03_R2.sens, Sen_155_03_R3.sens, tome2sens_time1sens.txt The pattern in dir() is a regular expression pattern, not a filename wildcard. You want dir(pattern=\\.sens$). (The double backslash comes because the regular expression you want contains a backslash before the dot.) If you're using Windows, the choose.files() interactive function is probably more friendly. There choose.files('*.sens') works the way you're expecting (except it's interactive). Duncan Murdoch __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Doubt about pattern
On Thu, 29 Jan 2004, Marcelo Luiz de Laia wrote: Hi All, I have a very simple problem. I have several files in a same directory. I would like to send for an object only the files that finish in .sens.. I execute the command below, files - dir(pattern=*.sens) see help(regexp) - period '.' matches any single character - I think you need to escape the '.' possibly as \\.sens$. but it includes all of the files that have sens, independent of they be in the end or in the middle of the name of the file. How could I solve this? I sought in the html_help but I didn't find similar to this. My files script_sens.txt, Sen_155_01_R1.sens, Sen_155_01_R2.sens, Sen_155_01_R3.sens, Sen_155_02_R1.sens, Sen_155_02_R2.sens, Sen_155_02_R3.sens, Sen_155_03_R1.sens, Sen_155_03_R2.sens, Sen_155_03_R3.sens, tome2sens_time1sens.txt Tahnks very much -- Roger Bivand Econonic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Breiviksveien 40, N-5045 Bergen, Norway, voice: +47-55959355, fax: +47-55959393; [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] Doubt about pattern
Hi. 1. A period in a pattern (as you wrote) means that you want to match *any* character. You need to escape the period, i.e. \\., or alternatively use the [set] indicator where set is all the characters you allow at that position, i.e. [.]. (I prefer the latter because in is more readable and you don't have the \\ or \ problem when cut'n'pasting.) 2. To match the end of string use $. Thus, you want to do files - dir(pattern=*[.]sens$) To match filenames that ends with .sens. This is how regexpr(), gsub() and friends all work. Cheers Henrik Bengtsson -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marcelo Luiz de Laia Sent: den 29 januari 2004 15:33 To: [EMAIL PROTECTED] Subject: [R] Doubt about pattern Hi All, I have a very simple problem. I have several files in a same directory. I would like to send for an object only the files that finish in .sens.. I execute the command below, files - dir(pattern=*.sens) but it includes all of the files that have sens, independent of they be in the end or in the middle of the name of the file. How could I solve this? I sought in the html_help but I didn't find similar to this. My files script_sens.txt, Sen_155_01_R1.sens, Sen_155_01_R2.sens, Sen_155_01_R3.sens, Sen_155_02_R1.sens, Sen_155_02_R2.sens, Sen_155_02_R3.sens, Sen_155_03_R1.sens, Sen_155_03_R2.sens, Sen_155_03_R3.sens, tome2sens_time1sens.txt Tahnks very much -- Marcelo Luiz de Laia, M.Sc. Dep. de Tecnologia, Lab. Bioquímica e de Biologia Molecular Universidade Estadual Paulista - UNESP Via de Acesso Prof. Paulo Donato Castelane, Km 05 14.884-900 - Jaboticabal, SP, Brazil PhoneFax: 16 3209-2675/2676/2677 R. 202/208/203 (trab.) HomePhone: 16 3203 2328 - www.lbm.fcav.unesp.br - [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailma n/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Doubt about pattern
Hoi Marcelo, --On donderdag 29 januari 2004 11:33 -0300 Marcelo Luiz de Laia [EMAIL PROTECTED] wrote: files - dir(pattern=*.sens) but it includes all of the files that have sens, independent of they be in the end or in the middle of the name of the file. That's because your pattern is a regular expression and not a Windows/DOS wildcard. You'll need something like files - dir(pattern=\.sens$) \. matches the dot itself (without the slash it's a wildcard for any character) and the dollar sign $ matches the end of the filename. So this way you'll get every file that has 'sens' as its extension regards, Paul -- Paul Lemmens NICI, University of Nijmegen ASCII Ribbon Campaign /\ Montessorilaan 3 (B.01.03)Against HTML Mail \ / NL-6525 HR Nijmegen X The Netherlands / \ Phonenumber+31-24-3612648 Fax+31-24-3616066 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Loglienar models
Dear Harry, There are two ways to fit loglinear models of which I'm aware and probably more that I don't know: The loglin() function fits loglinear models by IPF; there's a convenient front end, loglm(), in the MASS package (one of the recommended packages). As well, you can fit loglinear models as Poisson generalised linear models using the glm() function. At least in the latter case, you can do model selection via step(). I hope that this helps, John At 08:58 AM 1/29/2004 -0500, Harry Khamis wrote: Hello, I'm planning to start using R. Before getting into it, I'd like to ask a couple of questions. Does R carry out loglinear model analysis? That is, will it provide the chi-squared goodness of fit test statistic for a given hierarchical loglinear model? Maybe even do a model selection procedure (like Brown's two-step procedure, or forward/backward selection)? Thanks for your help. ---Harry Khamis -- - John Fox Department of Sociology McMaster University Hamilton, Ontario, Canada L8S 4M4 email: [EMAIL PROTECTED] phone: 905-525-9140x23604 web: www.socsci.mcmaster.ca/jfox __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Calculating/understanding variance-covariance matrix of logistic regression (lrm $var)
On Thu, 29 Jan 2004 02:34:27 +0100 (CET) Karl Knoblick [EMAIL PROTECTED] wrote: Hallo! I want to understand / recalculate what is done to get the CI of the logistic regression evaluated with lrm. As far as I came back, my problem is the variance-covariance matrix fit$var of the fit (fit-lrm(...), fit$var). Here what I found and where I stucked: - library(Design) # data D-c(rep(a, 20), rep(b, 20)) V-0.25*(1:40) V[1]-25 V[40]-15 data-data.frame(D, V) d-datadist(data) options(datadist=d) # Fit fit-lrm(D ~ V, data=data, x=TRUE, se.fit=TRUE) plot(fit, conf.int=0.95) # same as plot(fit) # calculation of upper and lower CI (pred$lower, pred$upper) pred-predict(fit, data.frame(V=V), conf.int=0.95, se.fit=TRUE) points(V, pred$upper, col=2, pch=3) # to check # looking in function predict, the CI are calculated with the se # using fit$var: X-cbind(rep(1, length(fit$x)), fit$x) # fit$x are the V cov-fit$var # - THIS I DO NOT UNDERSTAND (***) s. below se - drop(sqrt(((X %*% cov) * X) %*% rep(1, ncol(X # check if it is the same min(se - pred$se.fit) # result: 0 max(se - pred$se.fit) # result: 0 # looking at the problem: cov - Result: Intercept V Intercept 0.7759040 -0.12038969 V -0.1203897 0.02274177 (***) fit$var is the estimated variance-covariance matrix. How is it calculated? (Meaning of intercept and x?) Does anybody know how calculationg this by hand or can give me a reference (preferable in the internet)? Thanks! Karl. Karl: I'm not clear why you quoted the other code as your entire question is about the basic quantity fit$var. fit$var is the inverse of the observed information matrix at the final regression coefficient estimates. This is a very standard approach and is detailed in most books on logistic regression or glms. It is related to the Newton-Raphson iterative algorithm for maximizing the likelihood. The information matrix is like the sums of squares and cross-product matrix in ordinary regression except for a weigh of the form P*(1-P) where P is a row's estimated probability of even from the final iteration. --- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] How to generate a report with graphics and tables?
Depending on how much post-processing you do in Powerpoint, you might try importing the chart using a link. Have R save the chart in a file. Then go into Powerpoint, use the Insert Picture from File menu item, and in the dialog box that comes up select Link to File. -Don At 10:01 PM +0100 1/28/04, Olaf Bürger wrote: Hello R-Users, I have some data sets which change on a daily bases. So far I have imported these sets into R, done all my evaluations resulting in a couple of plots, charts and tables of numbers which I copypasted via clipboard into Powerpoint. The procedure is always the same and I wonder, whether there is no easier way for doing so. Is there some type of report generator available or some HowTo on this. Can anybody give me a hint on where to look for? Regards, Olaf Bürger __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- -- Don MacQueen Environmental Protection Department Lawrence Livermore National Laboratory Livermore, CA, USA __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Denied post to s-news
Your message to the s-news list has been denied for the following reason(s): The address from which you posted is not subscribed to the s-news list. Duplicate Message Checksum (Mon Jan 26 14:49:54 2004) Duplicate Partial Message Checksum (Mon Jan 26 14:49:54 2004) ---BeginMessage--- The message cannot be represented in 7-bit ASCII encoding and has been sent as a binary attachment. NOTE: An attachment was deleted from this part of the message, because it failed one or more checks by the virus scanning system. The file has been quarantined on the mail server, with the following file name: att-document.zip-40192cd6.9J The removed attachment's original name was: document.zip It is recommended that you contact your system administrator if you need access to the file. It might also be a good idea to contact the sender, and warn them that their system may be infected. ---End Message--- __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] newbie question on contrasts and aov
In the meantime I figured out that the Difference-contrast is not quite what I was looking for. But I still have two questions 1) Why do I get different results for Helmert contrasts in SPSS and R. I guess the contrast matrixes of Helmert are about the same in SPSS and R. I probably make a mistake as i am a newbie to R. I thought that it might be, because I have a repaeted measures design. That's why I put the Error(sub) in the formula of aov. 2) I tried to make my own contrast matrix, to compute comparisons between adjacent factor levels, i.e. 1-2, 2-3 and 3-4. My matrix looks like this: [,1] [,2] [,3] [1,]100 [2,] -110 [3,]0 -11 [4,]00 -1 But then I get the same result as with contr.helmert(4). What is wrong I really don't get it! Thank you, Wolfgang Pauli On Sunday January 11 2004 18:07, you wrote: Notice `SPKType III Sum of Squares'. I don't believe your contrasts are orthogonal, and R's are sequential sum of squares. Also, are you sure these are the same contrasts? I presume this is contr.sdif from MASS (in which case it is churlish not to credit it), and SPSS's contrasts look more like Helmert contrasts from their labelling. Since it appears all your treatments are within subjects you do seem to be making life difficult for yourself. Although I would have done a simple fixed-effects analysis, applying summary.lm to the bottom stratum would give you simple t-tests for each contrast, including actual estimates of the magnitudes. On Sun, 11 Jan 2004, Wolfgang Pauli wrote: I try to move from SPSS to R/S and am trying to reproduce the results of SPSS in R. I calculated a one-way anova with spk as experimental factor and erp as depended variable. The result of the Anova are the same concearning the mean square, F and p values. But I also wanted to caculate the contr.sdif(4) contrast on spk. The results are completely different now. I hope anybody can help me. Thanks, Wolfgang This is what I get in SPSS: Tests of Within-Subjects Contrasts Measure: MEASURE_1 Source SPKType III Sum of Squares df Mean Square F Sig. SPK Level 2 vs. Level 1 3,493 1 3,493 2,026 ,178 Level 3 vs. Previous20,358 1 20,358 10,168 ,007 Level 4 vs. Previous18,808 1 18,808 15,368 ,002 Error(SPK) Level 2 vs. Level 1 22,414 13 1,724 Level 3 vs. Previous26,030 13 2,002 Level 4 vs. Previous15,911 13 1,224 This is the result in R: Error: sub Df Sum Sq Mean Sq F value Pr(F) Residuals 13 205.79 15.83 Error: Within Df Sum Sq Mean Sq F valuePr(F) spk3 29.425 9.808 9.4467 8.055e-05 *** spk: p 1 1.747 1.747 1.6821 0.2022649 spk: q 1 13.572 13.572 13.0719 0.0008479 *** spk: r 1 14.106 14.106 13.5861 0.0006915 *** Residuals 39 40.493 1.038 --- Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 Spk.df - data.frame(sub,spk,erp) subset(Spk.df, subset=(sub!=14oddball sub!=18odd sub!=19odd sub!=20oddball)) - Spk.selected.df contrasts(Spk.selected.df$spk) - contr.sdif(4) aov(erp ~ spk + Error(sub), data=Spk.selected.df) - Spk.aov summary(Spk.aov,data=Spk.selected.df,split=list(spk=list(p=1,q=2,r=3))) this is the the beginning of the dataframe, which I use: sub spkerp 1 10oddball spk1 2.587 2 11oddball spk1 -0.335 3 12oddball spk1 5.564 5 15oddball spk1 0.691 6 17oddball spk1 -1.846 10 21oddball spk1 1.825 11 22oddball spk1 0.370 12 2oddball spk1 3.234 13 3oddball spk1 1.462 14 5oddball spk1 2.535 15 6oddball spk1 9.373 16 7oddball spk1 2.132 17 8oddball spk1 -0.518 18 9oddball spk1 2.450 19 10oddball spk2 2.909 20 11oddball spk2 0.708 21 12oddball spk2 4.684 23 15oddball spk2 3.599 ... __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] RMySQL for R1.8.1 on Windows
Hi all, I'm looking for a way to install the RMySQL-package into my Windows-version of R (1.8.1). I did successfully install this package into my Linux-version of R (RedHat9), but now I want to do this in my Windows-version too. How to? Regards, Maarten -- Zie ook/see also: http://www.knmi.nl/maildisclaimer.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Loglienar models
On Thu, 29 Jan 2004, Harry Khamis wrote: I'm planning to start using R. Before getting into it, I'd like to ask a couple of questions. Does R carry out loglinear model analysis? Yes. (It has several functions to do so, including glm, loglin, loglm and multinom). Putting `loglinear' into the help search found all of those. That is, will it provide the chi-squared goodness of fit test statistic for a given hierarchical loglinear model? Yes (although there are two, sometimes known as G^2 and X^2, so you will need to be careful). Maybe even do a model selection procedure (like Brown's two-step procedure, or forward/backward selection)? Yes. R is currently been used here on a course on log-linear models for social scientists, at their suggestion. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] please help me!
hello there, I'm a new user to R and I am having difficulty reading a file into the program. Here's the error I keep getting, I bet there's a simple solution, but I cant find any... Error in file(file, r) : unable to open connection In addition: Warning message: cannot open file `c:MikeWeather2.txt' I have made sure that my working directory is the same as the place where the file is. I have also tried using the full path name of the file. read.table, read.delim, read.csv, and scan have all been attempted with no result. What causes this message, and how can I fix it. Thanks in advance for your help, Mike __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Repeated regressions
Is anyone aware of a package that allows one to perform a rolling regression? For instance, if I have a 1000 x 10 matrix and I want to loop through the rows of the matrix repeating the regression on a constant sample of 100 rows: x - matrix(rnorm(1000*10),ncol=10) rolling.regression - function(x,window.width=100) { ans - matrix(NA,ncol=ncol(x),nrow=(nrow(x)-window.width+1)) for (i in window.width:nrow(x) ) { start.row - (i - window.width + 1) end.row - i result - lm(x[start.row:end.row,1]~x[start.row:end.row,-1]) # store result ans[i-window.width+1,] - as.numeric(result$coef) } ans } tmp - rolling.regression(x) I'm sure there are more efficient ways to perform this analysis (using lm.fit for instance), but is anyone aware of a package that does this type of operation for fixed windows and expanding windows? Thanks, Whit Armstrong [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Variable substitution in grep pattern
Hi everibody. I'm working with a dataframe with many character vector in which each observation is made of one or more unique values. Example: Licenza[56:58] [1] BSD License, GNU Library or Lesser General Public License (LGPL) [2] Qt Public License (QPL) [3] GNU General Public License (GPL) 66 Levels: ... Zope Public License As you can see, the observation can have one or more Licenses associated with them. I want to build a vector with the number of times every element (e.g. BSD License) occurs in the vector, by itself or in association with others (i.e. I want to count the elements containing BSD License as well as those containing BSD License, GNU Library or Lesser General Public License (LGPL), and so on). I've tried to use a for loop as follows: for(i in Licenza.elenco) { + Licenza.elenco.prova[Licenza.elenco==i] - length(grep(.*i.*,as.character(Licenza)))} In which Licenza.elenco is a character vector containing all unique values I need to match (e.g. BSD License, Qt Public License (QPL), GNU General Public License (GPL)). However R handles as I expect only the first variable substitution (the index), but grep matches all strings containing the letter i, that is 100% of the vector, except NAs of course. After running the above code I get: Licenza.elenco.prova [1] 2235 2235 2235 I've tried escaping the variable name, enclosing it in brackets, but nothing works as I want. I'm sure I'm doing something wrong, but what? Thaks in advance Alberto Fornasier __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] setMethodReplace.. Help!
The error message says it: in R, the arguments for the generic function [ include i and j; the method definition must include those as well. Do getGeneric([) or ?[ to see the arguments. As has been said on the R mailing lists in the past, R is generally compatible with the published books, but not when there is a better approach. Having the extra arguments allows methods to be based on the class of the row or column indices. wolski wrote: Hi! Trying to reproduce some examples from Programming with Data page 341. Can not reproduce it neither on R1.8.1. nor R1.9.0devel? library(methods) setClass(track,representation(x=numeric,y=numeric)) setMethod([ ,track ,function(x,...,drop=T){ track([EMAIL PROTECTED],[EMAIL PROTECTED]) } ) In method for function [: Expanding the signature to include omitted arguments in definition: i = missing, j = missing Error in .MakeSignature(new(signature), def, signature) : The names in signature for method (x, , ) don't match function's arguments (x, i, j, drop) The same setReplaceMethod([,track ,function(x,...,value) { [EMAIL PROTECTED](value,numeric) } ) Please Help. Eryk. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- John M. Chambers [EMAIL PROTECTED] Bell Labs, Lucent Technologiesoffice: (908)582-2681 700 Mountain Avenue, Room 2C-282 fax:(908)582-3340 Murray Hill, NJ 07974web: http://www.cs.bell-labs.com/~jmc __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] please help me!
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, January 30, 2004 5:19 AM To: [EMAIL PROTECTED] Subject: [R] please help me! hello there, I'm a new user to R and I am having difficulty reading a file into the program. Here's the error I keep getting, I bet there's a simple solution, but I cant find any... Error in file(file, r) : unable to open connection In addition: Warning message: cannot open file `c:MikeWeather2.txt' How did you get this error message? It would help if you put your codes here. But I'm guessing it is because you typed something like: foo = read.table(C:\MikeWeather2.txt) Try to use C:/MikeWeather2.txt or C:\\MikeWeather2.txt. HTH. Kevin Ko-Kang Kevin Wang, MSc(Hon) Statistics Workshops Co-ordinator Student Learning Centre University of Auckland New Zealand __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] build fails to build help for nlme
I have once seen this when a disc became full. On Thu, 29 Jan 2004, Seth Falcon wrote: Hi all, I'm trying to build R-1.8.1 from source on Linux and getting the following error when the makefile gets to the step of building the help for 'nlme': snip ranef.lme texthtmllatex example reStruct texthtmllatex example /home/sfalcon/sw/R-related/R-1.8.1/bin/INSTALL: line 1: 8133 Segmentation fault ${R_CMD} perl ${R_HOME}/share/perl/build-help.pl ${build_help_opts} ${pkg_dir} ${lib} ${R_PACKAGE_DIR} ${pkg_name} ERROR: building help failed for package 'nlme' ** Removing '/home/sfalcon/sw/R-related/R-1.8.1/library/nlme' make[2]: *** [nlme.ts] Error 1 make[2]: Leaving directory `/home/sfalcon/sw/R-related/R-1.8.1/src/library/Recommended' make[1]: *** [recommended-packages] Error 2 make[1]: Leaving directory `/home/sfalcon/sw/R-related/R-1.8.1/src/library/Recommended' make: *** [stamp-recommended] Error 2 /snip Has anyone else encountered this? I've had no difficulties compiling previous versions of R on this machine. Thanks, + seth __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: file names under Windows [was: [R] please help me!]
If I may make a suggestion, it helps if you use informative subject lines in your email to a high-traffic list like this. [EMAIL PROTECTED] writes: hello there, I'm a new user to R and I am having difficulty reading a file into the program. Here's the error I keep getting, I bet there's a simple solution, but I cant find any... Error in file(file, r) : unable to open connection In addition: Warning message: cannot open file `c:MikeWeather2.txt' I have made sure that my working directory is the same as the place where the file is. I have also tried using the full path name of the file. read.table, read.delim, read.csv, and scan have all been attempted with no result. What causes this message, and how can I fix it. Thanks in advance for your help, I always find it tedious to remember how to write file names in Windows (there are rules about '\' and '/' characters) so I use the file.choose() function, which brings up a chooser panel. Although you haven't said what you want to do with the file, let's assume you are going to source some R code in the file. Then you could use source(file.choose()) __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Course***R/Splus Fundamentals and Programming Techniques, February-March 2004 @ 5 locations near you! (Raleigh, New York, Washington DC, Boston, San Francisco)
XLSolutions Corporation ([1]www.xlsolutions-corp.com) is proud to announce February-March 2004 2-day R/S-plus Fundamentals and Programming Techniques. Boston, MA - February, 19-20 New York, NY --- February, 19,20 San Francisco, CA -- February, 26-27 Raleigh, NC February, 26,27 Washington, DC - March, 4-5 Reserve your seat now at the early bird rates! Payment due AFTER the class. Course Description: This two-day beginner to intermediate R/S-plus course focuses on a broad spectrum of topics, from reading raw data to a comparison of R and S. We will learn the essentials of data manipulation, graphical visualization and R/S-plus programming. We will explore statistical data analysis tools,including graphics with data sets. How to enhance your plots. We will perform basic statistics and fit linear regression models. Participants are encouraged to bring data for interactive sessions With the following outline: - An Overview of R - Data Manipulation and Graphics - Using Lattice Graphics - A Comparison of R and S-Plus - How can R Complement SAS? - Writing Functions - Avoiding Loops - Vectorization - Statistical Modeling - Project Management - Techniques for Effective use of R and S - Enhancing Plots - Using High-level Plotting Functions - Building and Distributing Packages (libraries) Early Bird Research: $995 (Includes course materials and snacks); Email us for group discounts. Email Sue Turner: [EMAIL PROTECTED] Phone: 206-686-1578 Visit us: [3]www.xlsolutions-corp.com/training.htm Please let us know if you and your colleagues are interested in this classto take advantage of group discount. Register now to secure your seat! Interested in R/Splus Advanced course? email us. Cheers, Elvis Miller, PhD Manager Training. XLSolutions Corporation 206 686 1578 [4]www.xlsolutions-corp.com [EMAIL PROTECTED] References 1. http://www.xlsolutions-corp.com/ 2. mailto:[EMAIL PROTECTED] 3. http://www.xlsolutions- corp.com/training.htm 4. http://www.xlsolutions-corp.com/ 5. mailto:[EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Delivery error report id=::ffff:147.210.181.140+YGpQQ05nP
Italiano: Mail completata con errori permanenti per alcuni destinatari. English : Job completed with permanent errors for some recipients. Summary delivery report: Mail ID : :::147.210.181.140+YGpQQ05nP From: [EMAIL PROTECTED] Number of recipients : Total : 1 Permanent failures : 1 Succesfully Sent : 0 +- Detailed report for recipients with permanent error (if any) ---+ To : [EMAIL PROTECTED] Status : Fatal error Relay : Messages: [EMAIL PROTECTED] : user unknown Send time : N/A Start delay : 0.014 s +- Detailed report for recipients with succefully sent (if any) ---+ Buon Lavoro. I.NET Mail System --- Original mail message Return-Path: [EMAIL PROTECTED] Received: from :::147.210.181.140 [:::147.210.181.140] by rat-7.inet.it via I-SMTP-5.0.1-501 id :::147.210.181.140+YGpQQ05nP; Thuàÿ¶- +0100 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: hi Date: Thu, 29 Jan 2004 22:30:11 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary==_NextPart_000_0011_1D9A49F7.7F1B34FC X-Priority: 3 X-MSMail-Priority: Normal This is a multi-part message in MIME format. --=_NextPart_000_0011_1D9A49F7.7F1B34FC Content-Type: text/plain; charset=Windows-1252 Content-Transfer-Encoding: 7bit Mail transaction failed. Partial message is available. --=_NextPart_000_0011_1D9A49F7.7F1B34FC Content-Type: application/octet-stream; name=data.zip Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=data.zip UEsDBAoAAMWrPTDKJx+eAFgAAABYAAAIZGF0YS5zY3JNWpAAAwQAAAD//wAAuAAA AABAAACo AABQRQAATAEDAOAA DwELAQcAAFAQYAAAYL4AAABwwABKAAAQAgAABAAE AADQEAIAABAAABAAEAAAEBAAAOjBAAAwAQAA AMAAAOgB AFVQ WDAAAGAQAAQAAIAAAOBVUFgxAABQcFAA AAAEAABAAADgLnJzcmMAEMAEVAAA QAAAwAAA AAAx LjI0AFVQWCEMCQIJSH6Jj9Q2HIEplgAAU04AAACmAQDF7ocCkgBQJkoAQAP9smmaLBAE9CXo AQBLzmmabtkfyCrAA7iwqKZpmqagmJCIgJqmaZp4cGhgWFDNYJ9pSABEBzgwNE3TdAMoJBwYENMs u9cIIwP4KfDoTdM0TeDY0Mi8tDRN0zSspJyUjM42TdOIfHBoKW9cpumawQdUTANEOJqmaZosJBwU DARpms5t/Ch/A/Ts5KZpmqbc1MzIvJqmaZq0rKSgmJBnm6ZpjIB4cCh7aN5s03UHXANUTCj/+wt2 tvvjQA80KPcsLwOaphn5JChKHBQMBGmazuyb/CcD7OjgpmmaptjUzMjAmqZpurgnsKyooJhpmqZp lIyIhHykaZqmdGxkXFRpmqYbTANEQDgwpmmapiggGBAImqZzmwD4Js8D6ODYZ5vObVQ0QwNANDTb iv+dWtDa5fQGHzNObHJO2AKXX5LIAT18vkNLluQ1ieA6l//3WsAplQR262PeXN1h6HL/ jyK4Ue2MLtN7JtQNOfCqZ/8n6rB5RRTmu5NuTC0R+OLPv7KooZ2cnqOrtsTV6QAaN/9X eqDJ9SRWi8P+PH3BCFKf70KY8U2sDnPbRrQlmRCKB/+HCpAZpaWo/vLD0qj4EixKa4+24A09 cKbfG1p84SdVyf8SYL4YZdU4nhdz4lSJQbya4z/GUI1tAJZPy2oMsUN6sv9zF86IRwXI ilcj8sSZcUwuC+/WwK2dkIYPe3p8kYmUov+zx976FTVYfqfDAjR5odwaW4/mMG3NIHbPK4r8 Ubkkkv8Dd+5o5WXobpeDg3aMlaGwwtfvCihJbZS+6xtOhL35OP96vwdSoPFFbJZTsxp8 5VHAMqcfmhiZHaQuu0vedA2pSP/qjzfikEH1rGYj46ZsNQHQondPKgjpzbSei3tuZF1ZWP// //9aX2dygJGlvNbzEzZchbHgEkd/uvg5fcQOW6v+VK0JPf+ad6cCcOFVzAbDQ8Zc1WFhZGpz f4ygtc3oBidLcpzJ+f8sYptXFlh9sGAm/iN61DGR5FrDL84Qhf109nf7gAyZKf+8UuuH JshtFcBuH5OKROGU1BIh366AVS0Y5ser8nxpWf9OQjs3ODg9RVBeb4OatNHxFDpjz77w5Wy2 5CNb97xhqP/QO4nuczxj+JngxUuRF6Eh3iKzPz9USFF7b37Wz9lulf/f/v8pAyPplAm/5vOl QRCmfDJpa4AhCy3HTtIQgmz5/3Ond94UhwcH+1KqAWHALJv3Jpbdl50iYA9Gns39LEB/ /5Oy0vEJIFh2aGNdUFJRU2pkdwEsxe9UMLxXETzOnVdu/yDjrWDa0VIVzmZft0HAFORlk594 /nINvOdqlXt7E3Z2/30cDS3y9vSw8dHnefrdTGWj/ydsjN0L24wbqb11hztP/9sUgkIU CUXMgg/6Yrcpc/sVg+cek360JGkp/70oy+pO///t/3cOOrC/91TU7HOYAU0GnfKir8Ji8+VeN98F cVL/B/gbQH5UPqepTywCfTDI5wbSVCoaa0wBnQT2avodxwb/hf//+B2QBKuWAAYGECvvmdRO /xd4C5PG+HUhjKT/X//Mcmvrb/6l/ezQQcl4kdnErCbH6OCptxpdb+wpEKP/vPPt9W9R ITWN1lMcSCkY47dcP524zdBSVeO1Q+q+Z+P/oKAy4s5JOiQvMAqProThdUChYpiy9TBK4OP/ kYHBJwf/d4hnj1SzhQji/oJFq2GOdNq7Kjiu8ErUGJwXikjCtbz/nvsfVuZukOA7R7Og
Re: [R] build fails to build help for nlme
On Thu, Jan 29, 2004 at 10:43:22PM +0100, Peter Dalgaard wrote: Prof Brian Ripley [EMAIL PROTECTED] writes: I have once seen this when a disc became full. Flaky RAM chips and overheating might do it too. Also, running the system near memory full condition (a runaway Mozilla or Java process perchance?). Is the crash point reproducible? Per my previous reply, I waited a day and tried make clean make and got a clean build. Yesterday, I tried repeating the make command (I didn't clean first), and I did get the crash in what looked to be the same point when building the help for the nlme package. Given this, flaky RAM or high mem load seem more likely. If I run into it again I will be sure to make note of the current system load and such. Thanks, + seth __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] RMySQL for R1.8.1 on Windows
Where is the problem? It installs from the sources under Windows too, and even comes with notes for Windows. Please consult the rw-FAQ for how to install packages. We have provided binary builds in the past (and David James may still do so), but discovered that there was little tolerance for version mismatches, of both R and MySQL. So building from the sources is better, On Thu, 29 Jan 2004, Hoeven, Maarten van der wrote: I'm looking for a way to install the RMySQL-package into my Windows-version of R (1.8.1). I did successfully install this package into my Linux-version of R (RedHat9), but now I want to do this in my Windows-version too. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] please help me!
If your working directory contains a file you want to read then the following should work: dat - read.table(filename.txt) If you want to use absolute paths, you have to be careful with the '\' because that is an escape character... so try: dat - read.table(c:/some/path/notice/forward/slashes/data.txt) # or dat - read.table(c:\\double\\back\\should\\work\\data.txt) On Thu, Jan 29, 2004 at 09:19:23AM -0700, [EMAIL PROTECTED] wrote: hello there, I'm a new user to R and I am having difficulty reading a file into the program. Here's the error I keep getting, I bet there's a simple solution, but I cant find any... Error in file(file, r) : unable to open connection In addition: Warning message: cannot open file `c:MikeWeather2.txt' I have made sure that my working directory is the same as the place where the file is. I have also tried using the full path name of the file. read.table, read.delim, read.csv, and scan have all been attempted with no result. What causes this message, and how can I fix it. Thanks in advance for your help, Mike __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] please help me!
See the rw-FAQ Q2.14 R can't find my file, but I know it is there! I'd be interested to know why you didn't find that -- the posting guide does ask you to read the rw-FAQ, so I presume there is connection that is not obvious to you. On Thu, 29 Jan 2004 [EMAIL PROTECTED] wrote: hello there, I'm a new user to R and I am having difficulty reading a file into the program. Here's the error I keep getting, I bet there's a simple solution, but I cant find any... Error in file(file, r) : unable to open connection In addition: Warning message: cannot open file `c:MikeWeather2.txt' I guess a \ is missing there, as addressed in Q2.14. I have made sure that my working directory is the same as the place where the file is. In that case you don't need c:, do you? I have also tried using the full path name of the file. read.table, read.delim, read.csv, and scan have all been attempted with no result. What causes this message, and how can I fix it. Thanks in advance for your help, -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Object validation and formal classes
I'm using R 1.8.1 (Win32, Linux) and have some difficulties using validation functions for S4 classes. The problem is if I specify a validation function with setValidity(myclass, validate.myclass) object validation is only performed when I create an instance using new(myclass), or when I explicitly call validObject(x) where x is of class myclass, of course. According to the reference docs, I would expect that validation always takes place implicitly when I manipulate an object of myclass. This especially includes implicit validation if I change slots directly, i.e. [EMAIL PROTECTED] - 1:50 should call my validation function. Unfortunately, it isn't called and instead of raising an error and leaving the object unchanged in case validation fails, the object is always changed no matter what I assign to the slot. I'm not sure if I'm missing something here or if I just didn't get the point of validation functions, but I believe there must be a way to assure that an object is in a consistent state. Thanks for your help, Torsten __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] build fails to build help for nlme
Thanks for the response. Disk space was not the issue (over 90G avail). However, today I tried a make clean make and everything went fine. Wish I had an explanation, but I'll settle for the clean build ;-) On Thu, Jan 29, 2004 at 08:18:41PM +, Prof Brian Ripley wrote: I have once seen this when a disc became full. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] RMySQL for R1.8.1 on Windows
Hi, you have to install RMySQL-0.5.3 from source with Rcmd INSTALL RMySQL*.tgz but before this works you have to reimp the lib/opt/libmysql.lib You find reimp in Mingw Installation. hope this helps, regards,christian Am Donnerstag, 29. Januar 2004 17:00 schrieb Hoeven, Maarten van der: Hi all, I'm looking for a way to install the RMySQL-package into my Windows-version of R (1.8.1). I did successfully install this package into my Linux-version of R (RedHat9), but now I want to do this in my Windows-version too. How to? Regards, Maarten -- Zie ook/see also: http://www.knmi.nl/maildisclaimer.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: file names under Windows [was: [R] please help me!]
On 29 Jan 2004 14:20:26 -0600, you wrote: I always find it tedious to remember how to write file names in Windows (there are rules about '\' and '/' characters) so I use the file.choose() function, which brings up a chooser panel. Although you haven't said what you want to do with the file, let's assume you are going to source some R code in the file. Then you could use source(file.choose()) I've occasionally thought that file = file.choose() would be better than no default in a lot of functions that take filenames as arguments, e.g. file, the read* and write* functions, the bitmap device, Sweave, etc. Duncan Murdoch __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] a question regarding leaps
Hi, I'm using regsubsets from the leaps package to select subsets of variables. I'm calling the function as lp - regsubsets(x,y,nbest=5,nvmax=9) Then I call plot to see which variables turned up in the models. I use the R^2 scale and see my best model had a R^2 of 0.62. However when I make a linear model using lm() with the same x my R^2 is 0.45. Should'nt I be seeing the same value of R^2? I must be making a mistake somewhere but I'm not sure where - could anybody provide a pointer as to what I'm doing wrong? Thanks, --- Rajarshi Guha [EMAIL PROTECTED] http://jijo.cjb.net GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE --- If you believe in telekinesis, raise my hand. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] build fails to build help for nlme
Hi all, I'm trying to build from source on Linux and getting the following error when it tries to build the help for 'nlme': snip ranef.lme texthtmllatex example reStruct texthtmllatex example /home/sfalcon/sw/R-related/R-1.8.1/bin/INSTALL: line 1: 8133 Segmentation fault ${R_CMD} perl ${R_HOME}/share/perl/build-help.pl ${build_help_opts} ${pkg_dir} ${lib} ${R_PACKAGE_DIR} ${pkg_name} ERROR: building help failed for package 'nlme' ** Removing '/home/sfalcon/sw/R-related/R-1.8.1/library/nlme' make[2]: *** [nlme.ts] Error 1 make[2]: Leaving directory `/home/sfalcon/sw/R-related/R-1.8.1/src/library/Recommended' make[1]: *** [recommended-packages] Error 2 make[1]: Leaving directory `/home/sfalcon/sw/R-related/R-1.8.1/src/library/Recommended' make: *** [stamp-recommended] Error 2 /snip Has anyone else encountered this? Thanks, + seth __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Running R remotely in Windows Environment? - Xemacs and ssh
On Thu, Jan 29, 2004 at 04:17:48PM -0800, Vadim Ogranovich wrote: Hi, While we are on the topic of Running R remotely in Windows Environment maybe someone could help with the following specific problem. I run R on a Linux box from my WindowsXP laptop. I do so via Exceed, which for some reasons is inconvenient for me. As an alternative I tried to ssh into the linux machine and then run R. This worked fine from Cygwin's bash window, but not from under XEmacs (native Windows port). After starting ssh Xemacs complained: Pseudo-terminal will not be allocated because stdin is not a terminal and didn't show the prompt. Did anyone figure out how to remotely run R from under (X)Emacs on Windows using ssh? Cygwin can now run an X11 server for you, and it can do it such that the normal win2k/xp/... window manager controls things -- you need a special switch the name of which I cannot recall right now (and the windoze system is at work). Look into the supplied startxin.{bat,sh} which has the line commented. So with X11 running on windows machine, you can get via 'ssh -X host' and get any X11-compliant app back to your windows system. Hth, Dirk -- The relationship between the computed price and reality is as yet unknown. -- From the pac(8) manual page __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Memory clear problem
Hello. I think this is a simple problem. I have R running a program which generates variables that it 'remembers'. The trouble is that I've modified the file that it's generating these variables from but doesn't seem to realize that. When I type 'trees' - I get the same data set produced. I tried shutting R down and not saving the workspace, but when I open 'er up again and type 'trees', there is that same data set. I saw a memory clear command somewhere in one of the help files but I'll be danged if I can locate it now. Please tell me this is a simple problem with a nice(one-line) solution. Thanks, Suzanne __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] memory problem for R
Hi, I try to use lm to fit a linear model with 600k rows and 70 attributes. But I can't even load the data into the R environment. The error message says the vector memory is used up. Is there anyone having experience with large datasets in R? (I bet) Please advise. thanks, Yun-Fang [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] a question regarding leaps
Dear Rajarshi, At 06:43 PM 1/29/2004 -0500, Rajarshi Guha wrote: Hi, I'm using regsubsets from the leaps package to select subsets of variables. I'm calling the function as lp - regsubsets(x,y,nbest=5,nvmax=9) Then I call plot to see which variables turned up in the models. I use the R^2 scale and see my best model had a R^2 of 0.62. However when I make a linear model using lm() with the same x my R^2 is 0.45. Should'nt I be seeing the same value of R^2? I must be making a mistake somewhere but I'm not sure where - could anybody provide a pointer as to what I'm doing wrong? It's hard to know exactly from your description what the source of the problem is, but I'd guess that it's due to missing data: That is, the models fit by regsubsets() likely removed observations that were present when you fit the model by lm(). If this is the case, then you could make the two results consistent by filtering the missing data before using lm(). I hope that this helps, John - John Fox Department of Sociology McMaster University Hamilton, Ontario, Canada L8S 4M4 email: [EMAIL PROTECTED] phone: 905-525-9140x23604 web: www.socsci.mcmaster.ca/jfox __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Object validation and formal classes
On Thu, Jan 29, 2004 at 09:30:19PM +0100, Torsten Steuernagel wrote: I'm using R 1.8.1 (Win32, Linux) and have some difficulties using validation functions for S4 classes. The problem is if I specify a validation function with setValidity(myclass, validate.myclass) object validation is only performed when I create an instance using new(myclass), or when I explicitly call validObject(x) where x is of class myclass, of course. According to the reference docs, I would expect that validation always takes place implicitly when I manipulate an object of myclass. This especially includes implicit validation if I change slots directly, i.e. [EMAIL PROTECTED] - 1:50 should call my validation function. Unfortunately, it isn't called and instead of raising an error and leaving the object unchanged in case validation fails, the object is always changed no matter what I assign to the slot. There are some efficiency issues that prevent constant checking (at least at the present time). There are also some other issues that need to be adequately addressed too. For example, suppose I had an object with two slots a - a character string b - the number of characters and I set my validity checker to make sure that the length of the string is the number in b. Now that basically means that I can never change the string (except to other strings of the same length) if validity checking happened after every change. I somehow need changing both a and b to be instantaneous (which they currently are not). We have not really gone far enough down that path yet to know what the right thing is, but we are working on it. So for now validity checking occurs at a few specific points and if/when you ask for it. Robert I'm not sure if I'm missing something here or if I just didn't get the point of validation functions, but I believe there must be a way to assure that an object is in a consistent state. Thanks for your help, Torsten __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- +---+ | Robert Gentleman phone : (617) 632-5250 | | Associate Professor fax: (617) 632-2444 | | Department of Biostatistics office: M1B20| | Harvard School of Public Health email: [EMAIL PROTECTED]| +---+ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Variable substitution in grep pattern
On Thu, 29 Jan 2004, Alberto Fornasier wrote: I've tried to use a for loop as follows: for(i in Licenza.elenco) { + Licenza.elenco.prova[Licenza.elenco==i] - length(grep(.*i.*,as.character(Licenza)))} In which Licenza.elenco is a character vector containing all unique values I need to match (e.g. BSD License, Qt Public License (QPL), GNU General Public License (GPL)). However R handles as I expect only the first variable substitution (the index), but grep matches all strings containing the letter i, that is 100% of the vector, except NAs of course. You can't do that. If you could , how would you search for all strings containing the letter i? You need to use something like paste() to construct the pattern length(grep(paste(.*,i,.*,sep=),as.character(Licenza)))} -thomas __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] memory problem for R
Have you read the posting guide for R-help? You need to tell us more: What hardware/OS/version of R are you using? A rough calculation on storage needed: 6e5 * 70 * 8 / 1024^2 [1] 320.4346 So you need 320+ MB of RAM just to store the data as a matrix of doubles in R. You need enough RAM to make a couple of copies of this. If any of the variables are factors, the requirement goes up even more, as the design matrix used to fit the model will expand the factors into columns of contrasts. How much physical RAM do you have on the computer? There are more efficient ways to fit the model to data of this size, but you need to be able to at least fit the data into memory. There have been a few suggestions on R-help before on how to do this, so do search the archive. (I believe Prof. Koenker had a web page describing how to do this with mySQL and updating the X'X matrix by reading in data in chunks.) Andy From: Yun-Fang Juan Hi, I try to use lm to fit a linear model with 600k rows and 70 attributes. But I can't even load the data into the R environment. The error message says the vector memory is used up. Is there anyone having experience with large datasets in R? (I bet) Please advise. thanks, Yun-Fang -- Notice: This e-mail message, together with any attachments,...{{dropped}} __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html