[Rd] demo enhancement
Hello, I have a package for working with Bayesian networks (RHugin - on R- Forge for those interested). It contains a function RHExample that does the same thing as the demo function in the utils package except that it does not display any output in the R console. I use it to build simple networks in the examples section of my .Rd documentation files. Anyway, I thought it would be useful if this functionality was also part of the demo function. The attached diff adds an echo argument to demo which, when set to FALSE, makes demo behave the same as my RHExample function. Please feel free to use it if you think it would be helpful. Kjell __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] demo enhancement
Kjell Konis wrote: Hello, I have a package for working with Bayesian networks (RHugin - on R- Forge for those interested). It contains a function RHExample that does the same thing as the demo function in the utils package except that it does not display any output in the R console. I use it to build simple networks in the examples section of my .Rd documentation files. Anyway, I thought it would be useful if this functionality was also part of the demo function. The attached diff adds an echo argument to demo which, when set to FALSE, makes demo behave the same as my RHExample function. Please feel free to use it if you think it would be helpful. Your attachment got lost, but by coincidence, I was wanting an echo=FALSE argument to demo a couple of days ago. I didn't add it yet, because - I'd like consistency with example(), which suggests putting echo ahead of verbose - I'd rather not add a parameter in the middle of the list, just in case someone has used positional args - example() has other args not in demo(), i.e. local, setRNG, ask, prompt.prefix. Should some or all of those be added at the same time? Since the first two items above are contradictory, I decided this needed thinking about, but I haven't taken the time to do that yet. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] demo enhancement
I put the diff here http://smat.epfl.ch/~konis/grabbag/demo.diff Kjell On 16 févr. 09, at 12:35, Duncan Murdoch wrote: Kjell Konis wrote: Hello, I have a package for working with Bayesian networks (RHugin - on R- Forge for those interested). It contains a function RHExample that does the same thing as the demo function in the utils package except that it does not display any output in the R console. I use it to build simple networks in the examples section of my .Rd documentation files. Anyway, I thought it would be useful if this functionality was also part of the demo function. The attached diff adds an echo argument to demo which, when set to FALSE, makes demo behave the same as my RHExample function. Please feel free to use it if you think it would be helpful. Your attachment got lost, but by coincidence, I was wanting an echo=FALSE argument to demo a couple of days ago. I didn't add it yet, because - I'd like consistency with example(), which suggests putting echo ahead of verbose - I'd rather not add a parameter in the middle of the list, just in case someone has used positional args - example() has other args not in demo(), i.e. local, setRNG, ask, prompt.prefix. Should some or all of those be added at the same time? Since the first two items above are contradictory, I decided this needed thinking about, but I haven't taken the time to do that yet. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Box.test (PR#13532)
Full_Name: Jukka Nyblom Version: 2.8.0 OS: Submission from: (NULL) (130.234.5.137) In Box.test function it is now possible to give the degrees of freedom due to estimation of ARMA parameters. The p value is correct but the df in the output component is without subtraction. Jukka Nyblom __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Newbie - how do I debug a crash of RGUI.EXE
Hi- I'm running Vista64 Business and trying to use a package called RGraphViz. Unfortunately, when I try to plot a graph using this package it causes RGUI.EXE to crash. This package has no problem working in WinXP 32-bit. Is there any way to get useful information as to why it crashes? Here's my commands: > library(Rgraphviz) Loading required package: graph Loading required package: grid Warning message: In fun(...) : Rgraphviz built with Graphviz version 2.20. Found Graphviz version 2.21. > sessionInfo() R version 2.9.0 Under development (unstable) (2009-01-21 r47661) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] grid stats graphics grDevices utils datasets methods [8] base other attached packages: [1] Rgraphviz_1.21.7 graph_1.21.3 loaded via a namespace (and not attached): [1] cluster_1.11.12 tools_2.9.0 > I then define a graph using the following G = new("graphNEL", nodes = c("A","B","C")) plot(G) And RUI.exe crashes... Any help would be most appreciated. Thanks, Fraser __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Update today broke foreign package (PR#13533)
Hi, I'm running R 2.8.1 on Ubuntu, and today I got updates for a couple of packages, including foreign (r-cran-foreign, now at version 0.8.32). Subsequent to the upgrade, attempts to invoke read.spss produce the following error: Error in inherits(x, "factor") : object "cp" not found and the call to read.spss fails. I forced a downgrade to 0.8.26, and read.spss works again. Cheers, Paul Rubin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Newbie - how do I debug a crash of RGUI.EXE
"Sim, Fraser" writes: > Hi- > > I'm running Vista64 Business and trying to use a package called > RGraphViz. Unfortunately, when I try to plot a graph using this package > it causes RGUI.EXE to crash. This package has no problem working in > WinXP 32-bit. > > Is there any way to get useful information as to why it crashes? > > Here's my commands: > >> library(Rgraphviz) > Loading required package: graph > Loading required package: grid > Warning message: > In fun(...) : Rgraphviz built with Graphviz version 2.20. > Found Graphviz version 2.21. It might be worth while to match your Graphviz with the one Rgraphviz was built against (2.20) -- the problem is almost certainly at the C level where this could matter. Duncan Murdoch has hints here http://www.stats.uwo.ca/faculty/murdoch/software/debuggingR/ If 'newbie' means an inexperienced C programmer then this will be a lot of work. A first step will be to install tools required to build R from source, and to rebuild Rgraphviz from source with flags set to generate debugging information. Again Duncan's pages will come in handy. Hope that helps. Martin >> sessionInfo() > R version 2.9.0 Under development (unstable) (2009-01-21 r47661) > i386-pc-mingw32 > > locale: > LC_COLLATE=English_United States.1252;LC_CTYPE=English_United > States.1252;LC_MONETARY=English_United > States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 > > attached base packages: > [1] grid stats graphics grDevices utils datasets methods > > [8] base > > other attached packages: > [1] Rgraphviz_1.21.7 graph_1.21.3 > > loaded via a namespace (and not attached): > [1] cluster_1.11.12 tools_2.9.0 >> > > > I then define a graph using the following > > G = new("graphNEL", nodes = c("A","B","C")) > plot(G) > > And RUI.exe crashes... > > Any help would be most appreciated. > > Thanks, > Fraser > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M2 B169 Phone: (206) 667-2793 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Summary: Identifying graphics files produced by R
Thanks to all those that responded to the question below, either on-list or privately. The bottom line is that there's no identifying information from R in the metadata for PNG or JPG files (and R doesn't produce GIFs). I did however figure out a way to automate a search for PDF and PostScript files produced by R, and the details are here: http://blog.revolution-computing.com/2009/02/r-graphics-in-the-media.html Thanks, # David Smith On Fri, Feb 13, 2009 at 1:15 PM, David M Smith < da...@revolution-computing.com> wrote: > 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 web? And of so, would such evidence > necessarily be obliterated in post-processing (e.g cropping)? > > I'm trying to do an informal survey of R's use to create statistical > graphics on the web, and if there's a way to identify graph files I > see as coming from R it would help a lot. > > Thanks, > # David Smith > > -- > David M Smith > Director of Community, REvolution Computing www.revolution-computing.com > Tel: +1 (206) 577-4778 x3203 (Seattle, USA) > -- David M Smith Director of Community, REvolution Computing www.revolution-computing.com Tel: +1 (206) 577-4778 x3203 (Seattle, USA) [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Inheriting from "environment" and similar object types
Attributes can't be assigned to objects of type "environment" or similar types such as external pointers or names (symbols). The objects are references, not normal R objects, and are not copied by the internal duplicate() routine, so any attribute (including "class") overwrites the same object. This means that classes, either S4 or S3, can't inherit from these types directly. A mechanism has been added to r-devel (version r47933) that allows S4 classes to contain "environment" and similar types. The mechanism uses a reserved slot name to hold the reference. Code in various places recognizes S4 objects with this slot and coerces the object to the corresponding type. See ?setClass. The mechanism is transparent for quite a few computations, but there can't be a full guarantee, since low-level code can operate directly using the object type, which of course will not correspond to "environment". Usually, a workaround is to pass in as(object, "environment") instead of object. The same mechanism is used to allow extending "externalptr" and "name", and other similar types will likely be added after some more testing. Details of the mechanism are still experimental, and may change. John __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Update today broke foreign package (PR#13533)
foregin_0.8-32 was testsd aginst 2.8.1 prior to release, and I've just tested it again. This might be a locale issue (but I also tested in a latin1 and C locale), but I think it is specific to some files. So can we have both the output of sessionInfo() and a file that causes the problem (it appears not to be one of the test files in the 'tests' subdirectory), and I'll investigate further. On Mon, 16 Feb 2009, ru...@msu.edu wrote: Hi, I'm running R 2.8.1 on Ubuntu, and today I got updates for a couple of packages, including foreign (r-cran-foreign, now at version 0.8.32). Subsequent to the upgrade, attempts to invoke read.spss produce the following error: Error in inherits(x, "factor") : object "cp" not found and the call to read.spss fails. I forced a downgrade to 0.8.26, and read.spss works again. Cheers, Paul Rubin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Brian D. Ripley, rip...@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 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Update today broke foreign package (PR#13533)
I posted links to five SPSS .sav files in response to a very similar problem with read.spss(). Maybe you can use them to test the function. http://www.nabble.com/reading-SPSS-.sav-files-(PR-13509)-td21889920.html So can we have both the output of sessionInfo() and a file that causes the problem (it appears not to be one of the test files in the 'tests' subdirectory), and I'll investigate further. On Mon, 16 Feb 2009, ru...@msu.edu wrote: -- View this message in context: http://www.nabble.com/Update-today-broke-foreign-package-%28PR-13533%29-tp22045004p22052065.html Sent from the R devel mailing list archive at Nabble.com. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel