On Wed, Oct 30, 2002 at 02:05:06PM -0200, Antonio Olinto wrote:> Hi, > > How to extract Std. Error values from a lm or a nls?You get them from the summary object, not the model fit itself. try something like... summary(lm(foo ~ bar))$coefficients Cheers Jason -- Indigo Industrial Controls Ltd. 64-21-343-545 jasont at indigoindustrial.co.nz -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
flusHi, I am connecting R to a PHP web script. The first effort attempted to use a named pipe but gave up on that because PHP could not read any data from the named pipe. I changed to using a temp file but it also has problems. It appears that the file to which R's output is redirected is not recieving any output until the pipe connection form PHP is closed. I think this means that R is buffering its output and there appears to be no flush function. I would like to use a sequence like: open pipe to R and incommand redirect R outout to file/fifo open file send R command read response from file close file open file send R command read response from file close file . . close pipe I checked the archives and there a function flush.console() was mentioned -- I looked for this in the docs but could not find it. The function does not appear to affect flushing of the R output to the file. This is a RedHat Linsux 7.3 on x86 install Has anyone any suggestions?? -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hi, How to extract Std. Error values from a lm or a nls? With coef(model), coef(model)[1], coef(model)[2] and df.residual(model) I can get the coeffcients and the degrees of freedom but I couldn't find a way to get Std. Error values. Thanks, Antonio Olinto -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Wed, 30 Oct 2002, Richard wrote:> flusHi,???> I am connecting R to a PHP web script. > > The first effort attempted to use a named pipe > but gave up on that because PHP could not read > any data from the named pipe. > > I changed to using a temp file but it also has problems. > It appears that the file to which R's output is redirected > is not recieving any output until the pipe connection form PHP > is closed. I think this means that R is buffering its output > and there appears to be no flush function.Redirected output is normally buffered: it's an issue for your OS's runtime system. R is just a C program.> I would like to use a sequence like: > > open pipe to R and incommand redirect R outout to file/fifo > > open file > send R command > read response from file > close file > > open file > send R command > read response from file > close file > . > . > close pipe > > I checked the archives and there a function > flush.console() was mentioned -- I looked for this in > the docs but could not find it. The function does not appear > to affect flushing of the R output to the file.Well, it is documented for the Windows GUI, where it does work. How can a function you can't find affect R when you can't run it?> This is a RedHat Linsux 7.3 on x86 installTry using connections, in particular a fifo and play with blocking. It would not be too hard to implement a flush() function if you want one (there is internal support for it in the design of connections): if you do write one, please contribute it. -- Brian D. Ripley, ripley at stats.ox.ac.uk 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 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Richard, I run into this problem when trying to control R from a Java program. Hopefully my solution can help you. After poking around the source code, I realized that when R starts up, it choose between interactive or non-interactive mode, based on whether there is a controlling TTY. Specifically, line 237 of src/unix/system.c has the line "R_Interactive = isatty(0);" My solution is to insert the following line immediately after line 237: "if ( getenv("R_FORCE_INTERACTIVE") != NULL ) R_Interactive = TRUE;" I then compile R. (You implied that you were adverse to learning how to compile from source, but it really isn't hard. See "R Installation and Administration" documentation from the R webpage.) Then, within Java, I set the environment variable "R_FORCE_INTERACTIVE" to "true" and launch R. I can then write commands to R and read the response, all without buffering or flushing issues. I hope this helps. I would be interest in knowing how well this works for you or what other solution you come up with. - - David Dahl -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._