[Rd] [PATCH] typo in R-lang

2009-02-13 Thread Peter Cowan
Here is a patch for a small typo in the description of do.call() in case the inline version is unsuitable: Index: /Users/peter/manual/R-lang.texi === --- /Users/pet

Re: [Rd] re ading SPSS .sav files (PR#13509)

2009-02-13 Thread HBaize
I've uploaded sample SPSS sav files to my web space. This file was made with SPSS verion 13.0 and does NOT crash R 2.8.1 on my machine: http://www.3dculture.com/images/Florida2000ElectionData.sav This is the same file, but saved with SPSS ver 17.0, it does not crash but returns warnings: http

Re: [Rd] re ading SPSS .sav files (PR#13509)

2009-02-13 Thread HBaize
Repeated trials have produced no crashes with SPSS sav files from version 10.0.5, 11.0, 12.0, or 14.0. SPSS sav files from Version 17.0 consistently crashes R. Some version 13.0 files will crash R. The version 13.0 files that crash R were sent to me by a colleague. My locally produced 13.0 files

Re: [Rd] re ading SPSS .sav files (PR#13509)

2009-02-13 Thread HBaize
Yes the GUI crashes with the message: "R for Windows GUI front-end has encountered a problem and needs to close." giving two options debug ro close. Either button will close R. Additional information: I have replicated the crash using SPSS sav files from version 13.0 and 17.0. It does not crash

Re: [Rd] re ading SPSS .sav files (PR#13509)

2009-02-13 Thread Peter Dalgaard
HBaize wrote: I have experience the same problem reading SPSS sav files using R 2.8.0 and 2.8.1 on Windows XP and Tinn-R version 2.1.1.6. I'm using SPSS 17.0 so it is probably not related to SPSS version 11. I might add that I have been having problems interfacing Tinn-R 2.1.1.6 with R although

Re: [Rd] re ading SPSS .sav files (PR#13509)

2009-02-13 Thread HBaize
Full session info as R with packages as loaded when the crash occurs (note that the session is lost as R closes with the crash): R version 2.8.1 (2008-12-22) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252

Re: [Rd] re ading SPSS .sav files (PR#13509)

2009-02-13 Thread HBaize
Correction to my earlier post. The SPSS file that I was accessing was not produced by SPSS 17.0. It was from 13.0, specifically: SPSS DATA FILE MS Windows Release 13.0 spssio32.dll My R version info: _ platform i386-pc-mingw32 arch

Re: [Rd] re ading SPSS .sav files (PR#13509)

2009-02-13 Thread HBaize
I have experience the same problem reading SPSS sav files using R 2.8.0 and 2.8.1 on Windows XP and Tinn-R version 2.1.1.6. I'm using SPSS 17.0 so it is probably not related to SPSS version 11. I might add that I have been having problems interfacing Tinn-R 2.1.1.6 with R although it may be unre

[Rd] Identifying graphics files produced by R

2009-02-13 Thread David M Smith
Oftentimes, I see graphs on the web that *look* like they've been produced by R, but I can never be sure. Or can I? I notice that PostScript files include a "%%%Creator: R Software" line, but do R graphics drivers encode any identifying information in GIF or PNG files more commonly used on the we

Re: [Rd] proposed simulate.glm method

2009-02-13 Thread Martin Maechler
Thank you, Heather and Ben, > "HT" == Heather Turner > on Fri, 13 Feb 2009 15:52:37 + writes: HT> Yes, thanks to Ben for getting the ball rolling. His HT> code was more streamlined than mine, pointing to further HT> simplifications which I've included in the extended

Re: [Rd] proposed simulate.glm method

2009-02-13 Thread Paul Gilbert
If you are generalizing this, the saving of the RNG information to reproduce normally distribution random number also needs to save the normal generator information. (This looks like an omission in simulate.lm.) You might want to consider adding the simple functions setRNG and getRNG from my se

Re: [Rd] Generate random numbers in Fortran

2009-02-13 Thread Wacek Kusnierczyk
you can always try to get hold of the extensive nag fortran libraries: http://www.nag.co.uk/numeric/fl/FLdescription.asp comsider also 'numerical recipes' by press et al., of which there are fortran, c, and c++ editions (i think there was a pascal edition too), and where there are a choice of rou

Re: [Rd] Generate random numbers in Fortran

2009-02-13 Thread Kjell Konis
Take a look at section 6.6 in Writing R Extensions. It describes how to call C functions from FORTRAN. Basically it just boils down to this, in a C file define the functions void F77_SUB(fseedi)(void) { int x = 100; seed_in(&x); } void F77_SUB(fseedo)(void) { int x = 100; seed_out(&

[Rd] Generate random numbers in Fortran

2009-02-13 Thread Fabio Mathias
Hi!!! It would like to know if it exists a form to use the functions to generate variates in FORTRAN with the same easiness I use that them in C? Or not? If yes. They would have some example? I would like to use the functions rbeta, rlnorm and others! Sorry my english..rsrsrs Thanks!!!   Â

Re: [Rd] reading SPSS .sav files (PR#13509)

2009-02-13 Thread Prof Brian Ripley
Please can we have the reproducible example we asked for (in the FAQ, the posting guide ...). We also need to know the version of foreign that worked, so can we have the output of sessionInfo() for both sessions (see the posting guide for what we need). read.spss is able to read the old SPSS

Re: [Rd] proposed simulate.glm method

2009-02-13 Thread Heather Turner
Yes, thanks to Ben for getting the ball rolling. His code was more streamlined than mine, pointing to further simplifications which I've included in the extended version below. The code for the additional families uses functions from MASS and SuppDists - I wasn't sure about the best way to do this

Re: [Rd] proposed simulate.glm method

2009-02-13 Thread Martin Maechler
Thanks a lot, Heather, > "HT" == Heather Turner > on Fri, 13 Feb 2009 11:49:06 + writes: HT> Dear Martin, HT> I think a simulate.glm method ought to be able to work for gnm objects HT> too. David Firth and I started to work on this a long time ago, but HT> stopped

Re: [Rd] proposed simulate.glm method

2009-02-13 Thread Heather Turner
Dear Martin, I think a simulate.glm method ought to be able to work for gnm objects too. David Firth and I started to work on this a long time ago, but stopped part-way through when simulate.lm was introduced, thinking that simulate.glm was probably in the pipeline and we were duplicating effort.

Re: [Rd] proposed simulate.glm method

2009-02-13 Thread Martin Maechler
> "BB" == Ben Bolker > on Thu, 12 Feb 2009 11:29:14 -0500 writes: BB> I have found the "simulate" method (incorporated BB> in some packages) very handy. As far as I can tell the BB> only class for which simulate is actually implemented BB> in base R is lm ... this is a