Re: [Rd] troubles with R CMD check and examples under Ubuntu gutsy
G'day Patrick, since you seem to be hell-bent on having r-devel in this discussion, I guess I might CC this there too. :) On Mon, 05 May 2008 08:50:04 +0200 Patrick Giraudoux <[EMAIL PROTECTED]> wrote: > There has been a threat on something similar in R-devel on August > 2007... but I cannot understand the meaning. It might be a good idea to provide a link to that discussion. Perhaps others can understand the meaning and judge the relevance to this thread. > > Did you look at the file in pgirmess.Rcheck that I mentioned? > You'll find a copy of pgirmess-Ex.R, but I cannot get what is the > meaning of this file... This file collects all the code in the example sections of your documentation file, and puts some necessary code in front, in between the examples and at the end. This file is then sourced to run all the examples and the output can be found in pgrimess-Ex.Rout. And it was this file that I suggested you look at to see if it provides further clues about what goes wrong. > > Also, did you try to load the version of the library in > > pgrimess.Rcheck in a R session and check if you find the PermTest > > function in that case? > Yes indeed. I found PermTest in the R folder and in the R-ex folder > of the pgirmess folder in the pgirmess.Rcheck folder. I am surprised to hear this. R-ex holds all the code from the example sections in the Rd files, so it is no surprise that you will find a file PermTest.R in the R-ex folder, it just contains the code from the example section of PermTest.Rd, at last on my machine. It definitely does not contain the definition of the funcion. And on my machine, after running `R CMD check' on the tar.gz file, the R folder in pgirmess.Rcheck/pgirmess contains the files pgirmess, pgirmess.rdb and pgirmess.rdx, but no files with R code. So how did you find PermTest in the R folder? Is lazy-loading somehow switched off in your version of `R CMD check'? > > With these problems, I am a bit of a trial-and-error person, so if I > > cannot reproduce the error, I cannot find out what the problem > > is > Thanks anyway for the hints. It may help. I would suggest the following: 1) remove the directore pgirmess.Rcheck 2) run `R CMD check pgirmess' and see if the error occurs again 3) look at pgirmess.Rcheck/pgirmess/R. Does it contain the three files that I mentioned or the original source files. If the latter, check whether PermTest.R is in that directory and whether it really contains the commands that define that function. If the former, start an R session and issue the following commands: R> env <- new.env() R> lazyLoad("/path/to/pgirmess.Rcheck/pgirmess/R/pgirmess", envir=env) R> ls(envir=env) Make sure to replace the /path/to part above with the correct path. Do you see the PermTest function listed? This should establish whether the file that contains the PermTest function is part of the sources that you believe make up your package source. At the moment, I am leaning towards agreeing with Brian that the most likely reason for your problem is that the PermTest function got lost from your sources and is not installed. Best wishes, Berwin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] S4 / S3 / Sweave problem
> "PaulG" == Paul Gilbert <[EMAIL PROTECTED]> > on Sun, 04 May 2008 21:46:18 -0400 writes: PaulG> Prof Brian Ripley wrote: >> I'm not sure what the issue being asked about here is. The peculiar >> printing I don't see and may well be a locale issue. (Is this UTF-8 and >> TeX has not been told so?) PaulG> It seems to happen in locales UTF-8, POSIX and C. I have not tried others. >> >> The other issue is that when printing an object with attributes, there >> is no consideration of S4 classes amongst the attributes. That was >> either an undocumented design decision or an omission. This is >> different from >> >>> print(attributes(zz)) >> $tsp >> [1] 1 10 1 >> >> $class >> [1] "ts" >> >> $Meta >> An object of class “TSmetax” >> Slot "serIDs": >> [1] "whatever" >> >> Slot "ExtractionDate": >> NULL >> >> since although attributes are internally a pairlist and printed by a >> special C function, attributes() returns a list. >> >> It would be fairly easy to include a branch for S4 objects, but there >> are ambuiguities still over what they are (I wrote up a set of questions >> over a year ago about this). But it would seem fairly safe to send them >> to show() in the same circumstances that autoprinting does for >> apparently S4 objects. PaulG> Yes, I do have the impression that print() does not do exactly what one PaulG> might like when it finds an S4 attribute in an S3 object. I hope this is PaulG> not a design decision. It would make it very difficult to migrate toward PaulG> S4 if it is not possible to include S4 objects in S3 objects this way. I'm pretty sure that this has *not* been a design decision, but rather an oversight till now. To me, it seems even a "natural" oversight: If you are working for fully designed classes, it seems awkward to simultaneously use attributes of S3- (or "no class"-) objects. I do understand though that there can be situations, in particular migrations ones, where you want to do this ... and should be allowed to and should see print() working. Martin >> On Sun, 4 May 2008, Paul Gilbert wrote: >> >>> I'm not sure if this as a bug or something I am doing wrong. It occurs >>> in both 2.7.0 and 2.6.2. >> >> My guess is that it was never intended that S4 objects be used as >> attributes, in the same way that one of the unanswered questions is if S4 >> objects should be allowed to have attributes (other than slots). >> >>> >>> require("methods") >>> >>> setClassUnion("OptionalPOSIXct", c("POSIXct", "NULL")) >>> >>> setClass("TSmetax", >>> representation(serIDs="character", ExtractionDate="OptionalPOSIXct" )) >>> >>> setGeneric("TSmetax", >>> def= function(x, ...) standardGeneric("TSmetax")) >>> >>> setMethod("TSmetax", signature(x="character"), >>> definition= function(x, ...){ >>> new("TSmetax", serIDs=x, ExtractionDate=Sys.time()) >>> } ) >>> z <- new("TSmetax", serIDs="whatever", ExtractionDate= NULL) print(z) >>> An object of class "TSmetax" >>> Slot "serIDs": >>> [1] "whatever" >>> >>> Slot "ExtractionDate": >>> NULL >>> >>> Now if I make this an attribute of an S3 class an print, I get zz <- ts(1:10) attr(zz, "Meta") <- z print(zz) >>> Time Series: >>> Start = 1 >>> End = 10 >>> Frequency = 1 >>> [1] 1 2 3 4 5 6 7 8 9 10 >>> attr(,"Meta") >>> >>> attr(,"serIDs") >>> [1] "whatever" >>> attr(,"ExtractionDate") >>> `NULL` >>> attr(,"class") >>> [1] "TSmetax" >>> attr(,"class")attr(,"package") >>> [1] ".GlobalEnv" >>> >>> The `NULL` shows up i >>> shows up in the tex file generated by a vignette as >>> NULL which causes tex (pdftex) to throw an error. >>> (It also seems to mess up my mail tool, so I hope this goes through.) >> >> PaulG> PaulG> La version française suit le texte anglais. PaulG> PaulG> This email may contain privileged and/or confidential information, and the Bank of PaulG> Canada does not waive any related rights. Any distribution, use, or copying of this PaulG> email or the information it contains by other than the intended recipient is PaulG> unauthorized. If you received this email in error please delete it immediately from PaulG> your system and notify the sender promptly by email that you have done so. PaulG> PaulG> Le présent courriel peut contenir
Re: [Rd] S4 / S3 / Sweave problem
On Mon, 5 May 2008, Martin Maechler wrote: "PaulG" == Paul Gilbert <[EMAIL PROTECTED]> on Sun, 04 May 2008 21:46:18 -0400 writes: PaulG> Prof Brian Ripley wrote: >> I'm not sure what the issue being asked about here is. The peculiar >> printing I don't see and may well be a locale issue. (Is this UTF-8 and >> TeX has not been told so?) PaulG> It seems to happen in locales UTF-8, POSIX and C. I have not tried others. >> >> The other issue is that when printing an object with attributes, there >> is no consideration of S4 classes amongst the attributes. That was >> either an undocumented design decision or an omission. This is >> different from >> >>> print(attributes(zz)) >> $tsp >> [1] 1 10 1 >> >> $class >> [1] "ts" >> >> $Meta >> An object of class “TSmetax” >> Slot "serIDs": >> [1] "whatever" >> >> Slot "ExtractionDate": >> NULL >> >> since although attributes are internally a pairlist and printed by a >> special C function, attributes() returns a list. >> >> It would be fairly easy to include a branch for S4 objects, but there >> are ambuiguities still over what they are (I wrote up a set of questions >> over a year ago about this). But it would seem fairly safe to send them >> to show() in the same circumstances that autoprinting does for >> apparently S4 objects. PaulG> Yes, I do have the impression that print() does not do exactly what one PaulG> might like when it finds an S4 attribute in an S3 object. I hope this is PaulG> not a design decision. It would make it very difficult to migrate toward PaulG> S4 if it is not possible to include S4 objects in S3 objects this way. I'm pretty sure that this has *not* been a design decision, but rather an oversight till now. To me, it seems even a "natural" oversight: If you are working for fully designed classes, it seems awkward to simultaneously use attributes of S3- (or "no class"-) objects. I do understand though that there can be situations, in particular migrations ones, where you want to do this ... and should be allowed to and should see print() working. But you do! The issue is that S4 uses show() and not print(), and it was print() that is being called. And the nub is print(z) An object of class “TSmetax” Slot "serIDs": [1] "whatever" Slot "ExtractionDate": NULL calls show() whereas we have print(z, digits=7) attr(,"serIDs") [1] "whatever" attr(,"ExtractionDate") `NULL` attr(,"class") [1] "TSmetax" attr(,"class")attr(,"package") [1] ".GlobalEnv" This happens in print(zz) because printAttributes calls print() with a 'digits' setting -- it has to because it does not know where it is called from. It does seem reasonable for print(zz) to do as it did: the real problem is that show(zz) does not work correctly. I've altered printAttributes in r-devel to call show() on S4 objects, but that does mean that arguments such as 'digits' will not be respected. (There is potentially a problem if show() then calls print() which I have yet to analyse.) Martin >> On Sun, 4 May 2008, Paul Gilbert wrote: >> >>> I'm not sure if this as a bug or something I am doing wrong. It occurs >>> in both 2.7.0 and 2.6.2. >> >> My guess is that it was never intended that S4 objects be used as >> attributes, in the same way that one of the unanswered questions is if S4 >> objects should be allowed to have attributes (other than slots). >> >>> >>> require("methods") >>> >>> setClassUnion("OptionalPOSIXct", c("POSIXct", "NULL")) >>> >>> setClass("TSmetax", >>> representation(serIDs="character", ExtractionDate="OptionalPOSIXct" )) >>> >>> setGeneric("TSmetax", >>> def= function(x, ...) standardGeneric("TSmetax")) >>> >>> setMethod("TSmetax", signature(x="character"), >>> definition= function(x, ...){ >>> new("TSmetax", serIDs=x, ExtractionDate=Sys.time()) >>> } ) >>> z <- new("TSmetax", serIDs="whatever", ExtractionDate= NULL) print(z) >>> An object of class "TSmetax" >>> Slot "serIDs": >>> [1] "whatever" >>> >>> Slot "ExtractionDate": >>> NULL >>> >>> Now if I make this an attribute of an S3 class an print, I get zz <- ts(1:10) attr(zz, "Meta") <- z print(zz) >>> Time Series: >>> Start = 1 >>> End = 10 >>> Frequency = 1 >>> [1] 1 2 3 4 5 6 7 8 9 10 >>> attr(,"Meta") >>> >>> attr(,"serIDs") >>> [1] "whatever" >>> attr(,"ExtractionDate") >>> `NULL` >>> attr(,"class") >>> [1] "TSmetax" >>> attr(,"class")attr(,"package") >>> [1] ".GlobalEnv" >>> >>> The `NULL` shows up i >>> shows up in the tex file generated by a vignette as >>> NULL which causes tex (pdftex) to throw an error. >>> (It also seems to mess up my mail tool, so I hope this goes through.) -- Brian D. Ripley, [EMA
[Rd] OS_type
We've now implemented an OS_type field in a package's DESCRIPTION file, which if set has to match .Platform$OS.type (possible values "unix" and "windows"). CRAN has set up some overrides and added this field to packages known to be Unix-only or Windows-only, but authors should do so for themselves in future. Unsuitable packages will not be offered by available.packages(), will not be installed by R CMD INSTALL, and R CMD check will select --no-install. This happens in R-devel and R-patched, and is intended to simplify automated installation and checking. -- 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 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] troubles with R CMD check and examples under Ubuntu gutsy
I would suggest the following: 1) remove the directore pgirmess.Rcheck 2) run `R CMD check pgirmess' and see if the error occurs again 3) look at pgirmess.Rcheck/pgirmess/R. Does it contain the three files that I mentioned or the original source files. If the latter, check whether PermTest.R is in that directory and whether it really contains the commands that define that function. If the former, start an R session and issue the following commands: R> env <- new.env() R> lazyLoad("/path/to/pgirmess.Rcheck/pgirmess/R/pgirmess", envir=env) R> ls(envir=env) Make sure to replace the /path/to part above with the correct path. Do you see the PermTest function listed? This should establish whether the file that contains the PermTest function is part of the sources that you believe make up your package source. At the moment, I am leaning towards agreeing with Brian that the most likely reason for your problem is that the PermTest function got lost from your sources and is not installed. So I did actually removing everything (on Prof. Ripley's advise) and restarting from the version downloaded from CRAN (the one I sent yesterday to Kurt Hornik !!!)... And he does work Agh and all those sort of things... A least now I know the trouble does not come from Ubuntu but likely from the way I copied files created under Windows to Linux. Maybe more than a clue... Sorry to have taken time from you both for so few (I was really messing on the wrong tracks) and heartly thanks, Patrick Best wishes, Berwin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] OS_type
On Mon, May 05, 2008 at 11:56:47AM +0100, Prof Brian Ripley wrote: > We've now implemented an OS_type field in a package's DESCRIPTION file, > which if set has to match .Platform$OS.type (possible values "unix" and > "windows"). CRAN has set up some overrides and added this field to > packages known to be Unix-only or Windows-only, but authors should do so > for themselves in future. > > Unsuitable packages will not be offered by available.packages(), will not > be installed by R CMD INSTALL, and R CMD check will select --no-install. > > This happens in R-devel and R-patched, and is intended to simplify > automated installation and checking. Good idea. Just yesterday, someone was just wondering on the r-sig-finance list why his Linux box was bringing in RBloomberg and thusly RDCOMClient when retrieving the default task view set for Finance. As maintainer of the task view, I had no good answer other than the default of howling at Achim and calling it a ctv feature. But yes, it really was a design issue and this should fix it. So thanks. Dirk -- Three out of two people have difficulties with fractions. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] ~/.Rprofile executed twice by R.app under Mac OS X (PR#11380)
Thanks, fixed in r5128. (For completeness this happened if the open and startup directories were the same thus each of them triggered a .Rprofile load for the same directory). Cheers, Simon On May 4, 2008, at 2:50 PM, [EMAIL PROTECTED] wrote: All is in the title. My config is: Version: platform = i386-apple-darwin8.10.1 arch = i386 os = darwin8.10.1 system = i386, darwin8.10.1 status = major = 2 minor = 7.0 year = 2008 month = 04 day = 22 svn rev = 45424 language = R version.string = R version 2.7.0 (2008-04-22) GUI: R-GUI 1.24 (5102) Locale: en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 Search Path: .GlobalEnv, tools:RGUI, package:stats, package:graphics, package:grDevices, package:utils, package:datasets, package:methods, Autoloads, package:base -- ..<°}))>< ) ) ) ) ) ( ( ( ( (Prof. Philippe Grosjean ) ) ) ) ) ( ( ( ( (Numerical Ecology of Aquatic Systems ) ) ) ) ) Mons-Hainaut University, Belgium ( ( ( ( ( .. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] A patch for extending pdf device to embed popup text and web links
Dear Paul and Tobias, Thank you for your positive comments. I agree your comments. Firstly, I am learning how to make an R package, and RSVGTipsDevice is a good pointer for me. Secondly, in a package of extended pdf device, I will try to follow the R coding style. For example, text and mtext functions will be overwritten to accept "href" and "popup" options. Then, we extend the functions simply and can keep compatibility. This is also possible for rect function. In short, we don't have to have any new functions! Regards, Tadashi Kadowaki 2008/5/5 Paul Murrell <[EMAIL PROTECTED]>: > Hi > > > > > Tobias Verbeke wrote: > > Dear Tadashi, > > > > Thank you very much for sharing your work. > > > >> I am sending a patch for R-2.7.0 for extending pdf device to embed pop > >> up text and > >> web links. The patch is available at > >> > http://www.okada.jp.org/RWiki/?plugin=attach&pcmd=open&file=R-2.7.0.patch&refer=pdf%20device%20patch > >> You can see what the patch can do through a sample output, which is > available at > >> > http://www.okada.jp.org/RWiki/?plugin=attach&pcmd=open&file=sample2.pdf&refer=pdf%20device%20patch > >> An script is at > >> > http://www.okada.jp.org/RWiki/?plugin=attach&pcmd=open&file=sample2.r&refer=pdf%20device%20patch > >> > >> Ei-ji Nakama kindly build Windows binary, which can be obtained from > >> http://prs.ism.ac.jp/~nakama/tadakadosan/cran/ > >> An installer, R-2.7.0pat-win32.exe, will install programs in > >> C:\Program Files\R\R-2.7.0pat > >> so that you can use both of original and patched version simultaneously. > > > > I think it would be most useful if you could bundle your patched version > > of the pdf device in a separate device package, similar to the > > RSVGTipsDevice. > > > I would second that approach, at least in the meantime. This sort of > functionality is interesting and useful, but needs careful thought to > make it compatible with the existing graphics facilities in R. > > One major consideration is that the graphics system tries to be mostly > device-independent, so that R graphics code can be run on any device. > This would need adjustments to the common graphics engine/device C code > rather than just to the C code underlying the PDF device. > > There is also the issue of following standard R coding style and > semantics. Rather than your approach of ... > > text(5, 2, "text test") > pdf.link.on.text("http://www.google.com";) > > ... where the second call relies on a global setting to relate to the > appropriate text, it would be better to have something like ... > > linkedText(5, 2, "text test", href="http://www.google.com";) > > ... so that the association is explicit. > > By developing your ideas as an add-on package, people can try out your > ideas without having to recompile R. As Tobias has pointed out, the > RSVGTipsDevice package might be a good place to start. > > Paul > > > > > > What do you think ? > > > > Kind regards, > > Tobias > > > > __ > > R-devel@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-devel > > -- > Dr Paul Murrell > Department of Statistics > The University of Auckland > Private Bag 92019 > Auckland > New Zealand > 64 9 3737599 x85392 > [EMAIL PROTECTED] > http://www.stat.auckland.ac.nz/~paul/ > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] A patch for extending pdf device to embed popup text and web links
Paul Murrell wrote: Hi Tobias Verbeke wrote: Dear Tadashi, Thank you very much for sharing your work. I am sending a patch for R-2.7.0 for extending pdf device to embed pop up text and web links. The patch is available at http://www.okada.jp.org/RWiki/?plugin=attach&pcmd=open&file=R-2.7.0.patch&refer=pdf%20device%20patch You can see what the patch can do through a sample output, which is available at http://www.okada.jp.org/RWiki/?plugin=attach&pcmd=open&file=sample2.pdf&refer=pdf%20device%20patch An script is at http://www.okada.jp.org/RWiki/?plugin=attach&pcmd=open&file=sample2.r&refer=pdf%20device%20patch Ei-ji Nakama kindly build Windows binary, which can be obtained from http://prs.ism.ac.jp/~nakama/tadakadosan/cran/ An installer, R-2.7.0pat-win32.exe, will install programs in C:\Program Files\R\R-2.7.0pat so that you can use both of original and patched version simultaneously. I think it would be most useful if you could bundle your patched version of the pdf device in a separate device package, similar to the RSVGTipsDevice. I would second that approach, at least in the meantime. This sort of functionality is interesting and useful, but needs careful thought to make it compatible with the existing graphics facilities in R. One major consideration is that the graphics system tries to be mostly device-independent, so that R graphics code can be run on any device. This would need adjustments to the common graphics engine/device C code rather than just to the C code underlying the PDF device. Yes, more thought about how to integrate standard R graphics with extras like popups could be very useful. I wrote RSVGTipsDevice to be compatible with R graphics, in the sense that code that generated a plot on RSVGTipsDevice could generate a plot on any device (the information specific to RSVGTipsDevice would just be discarded when plotting on other devices.) I'd love to see more discussion of this, especially if it could lead to a more general solution that could be used across multiple formats like SVG, PDF, etc, so here's a recap of the issues and approach in RSVGTipsDevice. The features I wanted in RSVGTipsDevice were: -- a popup "tooltip" on a graphics shape (a title + one or two lines of text) -- a clickable hyperlink on a graphics shape A difference to the PDF device enhancements being discussed here is that RSVGTipsDevice did not support adding any annotations to text. The challenge in implementing this was that the R graphics commands for shapes, like points(), rect(), polygon() etc did not provide any way of accepting additional arguments (like tooltiptext= or url=) and passing them down to the device-specific graphics functions (written in C). The approach I took was to provide extra R functions that could be used like this: setSVGShapeToolTip(title="A triangle", desc1="green", desc2="big") setSVGShapeURL("http://www.r-project.org";) These would set up info for the next graphics shape drawn, saving the info in the C level graphics structure for the next call to a shape drawing function. If the next call to points() (or rect(), etc) drew multiple shapes, only the first shape would get a tooltip or a hyperlink. This is a definite limitation -- but I couldn't see a good way to provide info for multiple shapes (other than by allowing vectorized arguments to setSVGShapeToolTip, which seemed sort of clunky). I was hoping for some more discussion about a better way to implement this sort of thing in general. These function calls were made "compatible" with any R graphics device by having them check if the current device was RSVGTipsDevice -- if it wasn't they would simply discard the info. This means that for code using these function calls to run successfully when drawing on other devices, the RSVGTipsDevice package must be loaded. All this was done in a standard R package, so that as Paul says, people could try it out without having to recompile R. These attempts with RSVGTipsDevice (which were features added to the RSvgDevice package written by T Jake Luciani) were just a first attempt and I'd welcome any discussion or suggestions on how they could be better implemented and integrated with R graphics, or integrated with similar functionality for other devices. -- Tony Plate There is also the issue of following standard R coding style and semantics. Rather than your approach of ... text(5, 2, "text test") pdf.link.on.text("http://www.google.com";) ... where the second call relies on a global setting to relate to the appropriate text, it would be better to have something like ... linkedText(5, 2, "text test", href="http://www.google.com";) ... so that the association is explicit. By developing your ideas as an add-on package, people can try out your ideas without having to recompile R. As Tobias has pointed out, the RSVGTipsDevice package might be a good place to start. Paul What do you think ?
Re: [Rd] [R-SIG-Mac] Starting tcltk without Tk
It turns out that the behavior of starting just Tcl was actually a bug. Apparently the intention was to attempt to start Tk regardless of the DISPLAY variable, because some TclTk implementation such as Aqua Tcl/Tk don't require DISPLAY and thus would not be loaded. Due to a bug (HAVE_AQUA was not included in Rconfig.h before R 2.7.0), though, this was not the case. I'll leave it to tcltk users/maintainers to decide the right way forward. Essentially I see two options: 1) status quo: tcltk always attempts to load Tk and fails on an error 2) allow some (possibly cross-platform) way of specifying that it is ok to not load Tk - essentially make failure to load Tk non-fatal. Right now there is no (semantically correct) way to inhibit the loading of Tk (DISPLAY is a sort of abuse and not a solution). Cheers, Simon (CC to R-devel where this started...) On May 5, 2008, at 9:12 AM, Simon Urbanek wrote: Philippe, I'm not quite sure why you are asking on a Mac list, but the error comes from Tcl/Tk. I'd suggest asking on R-devel, the Tcl/Tk used in the R binary is the same for R 2.6.x and 2.7.0 so it must be a change in tcltk. Cheers, Simon On May 4, 2008, at 7:01 AM, Philippe Grosjean wrote: Hello, Up to R 2.6.2, I used to start Tcl *without Tk* (I need only Tcl for some part of my work, like a socket server written in Tcl only, for instance) with this code under Mac OS X (particularly on this system, because I don't want to start X11 just to use Tcl code, which is required for Tk!): > Sys.unsetenv("DISPLAY") > library(tcltk) I got then the message "no DISPLAY variable so Tk is not available", but could work with Tcl without problems. Now, with R 2.7.0, I got the following and Tcl failed to load: Loading Tcl/Tk interface ... Error in fun(...) : no display name and no $DISPLAY environment variable Error : .onLoad failed in 'loadNamespace' for 'tcltk' Error: package/namespace load failed for 'tcltk' I try to locate the message "no display name and no $DISPLAY environment variable" in the code but I cannot find it. Could someone help me please? I understand that starting Tcl without Tk from R is not an intended behaviour, but would it be possible to include an option to do so? > sessionInfo() R version 2.7.0 Patched (2008-04-22 r45460) i386-apple-darwin8.10.1 locale: en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base Many thanks, Philippe Grosjean -- ..<°}))>< ) ) ) ) ) ( ( ( ( (Prof. Philippe Grosjean ) ) ) ) ) ( ( ( ( (Numerical Ecology of Aquatic Systems ) ) ) ) ) Mons-Hainaut University, Belgium ( ( ( ( ( .. ___ R-SIG-Mac mailing list [EMAIL PROTECTED] https://stat.ethz.ch/mailman/listinfo/r-sig-mac ___ R-SIG-Mac mailing list [EMAIL PROTECTED] https://stat.ethz.ch/mailman/listinfo/r-sig-mac __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Is there any way to find out how a certain functions are implemented in R?
Hello I wrote a bootstrap program in C language that is called and run by R. When I tried it, it is slow and I'm trying to write and run the whole thing in C. But I cannot use handy functions in R and need to figure out how to write those functions by myself. Is there any way that I can get the actual codes that implement functions in R so that I can translate them into other languages? For example, after I generate bootstrap samples in C, I want to simplify the new dataset just like I did it in R using "aggregate(data$variable1, list(data$variable2,data$variable3), length) or aggregate(data$variable1, list(data$variable2,data$variable3), sum) etc". How could I do that in C and is there any way to find out how it is implemented in R? Thank you. Kyeongmi Univ. Memphis __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] [R-SIG-Mac] Starting tcltk without Tk
On Mon, May 05, 2008 at 02:22:03PM -0400, Simon Urbanek wrote: > It turns out that the behavior of starting just Tcl was actually a bug. > Apparently the intention was to attempt to start Tk regardless of the > DISPLAY variable, because some TclTk implementation such as Aqua Tcl/Tk > don't require DISPLAY and thus would not be loaded. Due to a bug > (HAVE_AQUA was not included in Rconfig.h before R 2.7.0), though, this > was not the case. I'll leave it to tcltk users/maintainers to decide the > right way forward. Essentially I see two options: > > 1) status quo: tcltk always attempts to load Tk and fails on an error > 2) allow some (possibly cross-platform) way of specifying that it is ok > to not load Tk - essentially make failure to load Tk non-fatal. > > Right now there is no (semantically correct) way to inhibit the loading > of Tk (DISPLAY is a sort of abuse and not a solution). FWIW this requirement was also biting Debian's automated builders in the tail. A hack remedy was to just remove tcltk from lazy-load. A slightly better fix is to run 'R CMD INSTALL ...' with a prefix of 'xvfb-run' which uses the virtual framebuffer x11 driver to make tcl/tk (or any other user of x11; I think gtk2 may fall in the same camp) happy whether or not the box is actually headless. Dirk -- Three out of two people have difficulties with fractions. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Is there any way to find out how a certain functions are implemented in R?
This comment won't help you much, but still... there are usually a lot of ways you can do to implement a bootstrap, and a lot of the approaches people use (especially if they are used to think in C-like terms) are pretty slow. But it can be made quite fast. So: are you sure you have optimized it? You could try profiling. Have you looked at the boot library? Kasper On May 5, 2008, at 11:58 AM, Kyeongmi Cheon wrote: Hello I wrote a bootstrap program in C language that is called and run by R. When I tried it, it is slow and I'm trying to write and run the whole thing in C. But I cannot use handy functions in R and need to figure out how to write those functions by myself. Is there any way that I can get the actual codes that implement functions in R so that I can translate them into other languages? For example, after I generate bootstrap samples in C, I want to simplify the new dataset just like I did it in R using "aggregate(data$variable1, list(data$variable2,data$variable3), length) or aggregate(data$variable1, list(data$variable2,data$variable3), sum) etc". How could I do that in C and is there any way to find out how it is implemented in R? Thank you. Kyeongmi Univ. Memphis __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] gfortran: Command not found
Hi, All: How do I get information about the "R CMD check / build / install" process, especially regarding what software to install and how to configure it under Windows XP? I ask, because "R CMD check" complained, "gfortran: Command not found". I found 'gfortran-sjlj.exe' in 'C:\Program Files\R\Rtools\MinGW\bin', which is in the path. This was on a package that I built successfully in January under R 2.6.2. Now with R 2.7.0, I can't get it to work. Thanks for your help. Spencer Graves ## Contents of "00install.out": installing R.css in D:/spencerg/statmtds/splines/DierckxSpline/DierckxSpline.Rcheck -- Making package DierckxSpline adding build stamp to DESCRIPTION installing NAMESPACE file and metadata making DLL ... gfortran -O3 -c bispev.f -o bispev.o make[3]: gfortran: Command not found make[3]: *** [bispev.o] Error 127 make[2]: *** [srcDynlib] Error 2 make[1]: *** [all] Error 2 make: *** [pkg-DierckxSpline] Error 2 *** Installation of DierckxSpline failed *** Removing 'D:/spencerg/statmtds/splines/DierckxSpline/DierckxSpline.Rcheck/DierckxSpline' # sessionInfo(): R version 2.7.0 (2008-04-22) 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] stats graphics grDevices utils datasets methods base # PATH = C:\Program Files\R\Rtools\bin;C:\Program Files\R\Rtools\perl\bin;C:\Program Files\R\Rtools\MinGW\bin;c:\perl\bin\;c:\program files\thinkpad\utilities;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\program files\intel\wireless\bin\;c:\program files\hummingbird\connectivity\11.00\accessories\;c:\program files\intel\wireless\bin\;c:\program files\ati technologies\ati.ace\;c:\program files\r\r-2.7.0\bin;c:\program files\miktex 2.5\miktex\bin;c:\program files\html help workshop;c:\mingw\bin;C:\Program Files\MATLAB\R2007a\bin;C:\Program Files\MATLAB\R2007a\bin\win32;c:\program files\matlab\r2006b\bin;c:\program files\matlab\r2006b\bin\win32;C:\Program Files\MATLAB\MATLAB Component Runtime\v76\runtime\win32;C:\Program Files\Common Files\Lenovo;C:\Program Files\Intel\Wireless\Bin\;C:\Program Files\Intel\Wireless\Bin\ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] gfortran: Command not found
On 05/05/2008 8:37 PM, Spencer Graves wrote: Hi, All: How do I get information about the "R CMD check / build / install" process, especially regarding what software to install and how to configure it under Windows XP? You can check the R-admin manual, which has a complete description, or get the latest info is at www.murdoch-sutherland.com/Rtools. I ask, because "R CMD check" complained, "gfortran: Command not found". I found 'gfortran-sjlj.exe' in 'C:\Program Files\R\Rtools\MinGW\bin', which is in the path. This was on a package that I built successfully in January under R 2.6.2. Now with R 2.7.0, I can't get it to work. You need to update your Rtools. Version 2.7 or 2.8 should work for you. (They are almost the same right now, but 2.7 is frozen, and 2.8 will evolve until R 2.8.0 is released in the fall.) Duncan Murdoch Thanks for your help. Spencer Graves ## Contents of "00install.out": installing R.css in D:/spencerg/statmtds/splines/DierckxSpline/DierckxSpline.Rcheck -- Making package DierckxSpline adding build stamp to DESCRIPTION installing NAMESPACE file and metadata making DLL ... gfortran -O3 -c bispev.f -o bispev.o make[3]: gfortran: Command not found make[3]: *** [bispev.o] Error 127 make[2]: *** [srcDynlib] Error 2 make[1]: *** [all] Error 2 make: *** [pkg-DierckxSpline] Error 2 *** Installation of DierckxSpline failed *** Removing 'D:/spencerg/statmtds/splines/DierckxSpline/DierckxSpline.Rcheck/DierckxSpline' # sessionInfo(): R version 2.7.0 (2008-04-22) 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] stats graphics grDevices utils datasets methods base # PATH = C:\Program Files\R\Rtools\bin;C:\Program Files\R\Rtools\perl\bin;C:\Program Files\R\Rtools\MinGW\bin;c:\perl\bin\;c:\program files\thinkpad\utilities;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\program files\intel\wireless\bin\;c:\program files\hummingbird\connectivity\11.00\accessories\;c:\program files\intel\wireless\bin\;c:\program files\ati technologies\ati.ace\;c:\program files\r\r-2.7.0\bin;c:\program files\miktex 2.5\miktex\bin;c:\program files\html help workshop;c:\mingw\bin;C:\Program Files\MATLAB\R2007a\bin;C:\Program Files\MATLAB\R2007a\bin\win32;c:\program files\matlab\r2006b\bin;c:\program files\matlab\r2006b\bin\win32;C:\Program Files\MATLAB\MATLAB Component Runtime\v76\runtime\win32;C:\Program Files\Common Files\Lenovo;C:\Program Files\Intel\Wireless\Bin\;C:\Program Files\Intel\Wireless\Bin\ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] gfortran: Command not found
On Mon, 5 May 2008, Spencer Graves wrote: Hi, All: How do I get information about the "R CMD check / build / install" process, especially regarding what software to install and how to configure it under Windows XP? The 'R Installation and Adminstration' manual. I ask, because "R CMD check" complained, "gfortran: Command not found". I found 'gfortran-sjlj.exe' in 'C:\Program Files\R\Rtools\MinGW\bin', which is in the path. You need to update your Rtools. This was on a package that I built successfully in January under R 2.6.2. Now with R 2.7.0, I can't get it to work. Thanks for your help. Spencer Graves ## Contents of "00install.out": installing R.css in D:/spencerg/statmtds/splines/DierckxSpline/DierckxSpline.Rcheck -- Making package DierckxSpline adding build stamp to DESCRIPTION installing NAMESPACE file and metadata making DLL ... gfortran -O3 -c bispev.f -o bispev.o make[3]: gfortran: Command not found make[3]: *** [bispev.o] Error 127 make[2]: *** [srcDynlib] Error 2 make[1]: *** [all] Error 2 make: *** [pkg-DierckxSpline] Error 2 *** Installation of DierckxSpline failed *** Removing 'D:/spencerg/statmtds/splines/DierckxSpline/DierckxSpline.Rcheck/DierckxSpline' # sessionInfo(): R version 2.7.0 (2008-04-22) 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] stats graphics grDevices utils datasets methods base # PATH = C:\Program Files\R\Rtools\bin;C:\Program Files\R\Rtools\perl\bin;C:\Program Files\R\Rtools\MinGW\bin;c:\perl\bin\;c:\program files\thinkpad\utilities;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\program files\intel\wireless\bin\;c:\program files\hummingbird\connectivity\11.00\accessories\;c:\program files\intel\wireless\bin\;c:\program files\ati technologies\ati.ace\;c:\program files\r\r-2.7.0\bin;c:\program files\miktex 2.5\miktex\bin;c:\program files\html help workshop;c:\mingw\bin;C:\Program Files\MATLAB\R2007a\bin;C:\Program Files\MATLAB\R2007a\bin\win32;c:\program files\matlab\r2006b\bin;c:\program files\matlab\r2006b\bin\win32;C:\Program Files\MATLAB\MATLAB Component Runtime\v76\runtime\win32;C:\Program Files\Common Files\Lenovo;C:\Program Files\Intel\Wireless\Bin\;C:\Program Files\Intel\Wireless\Bin\ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- 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 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] where obtain libR.a?
Hi, where can I to obtain the libR.a file in order to use with gcc? best wishes, Felipe Osorio. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel