Re: [Rd] abline and its documentation
> François Pinard writes: > Hi, people. The documentation of abline says: > Usage: > abline(a, b, untf = FALSE, ...) > abline(h=, untf = FALSE, ...) > abline(v=, untf = FALSE, ...) > abline(coef=, untf = FALSE, ...) > abline(reg=, untf = FALSE, ...) > so suggesting that h= and v= usages are exclusive. There are examples > in the mailing list archives of using both at the same time, and I find > convenient, for example, doing: > abline(h=0, v=0, ...) > for bolding the position of the origin or the axes through the origin. > By doing so, we are using undocumented capabilities of abline and > consequently, writing bugged R code. It does not matter so much > interactively, but scripts may be more sensitive. > Would it be acceptable to amend abline documentation, so to commit the > capability of abline to do both h= and v= at once? Or even combined > with intercept and slope? (abline is able to do all three at once > already!) Then, R users and code could more safely rely on this. > Just a suggestion, and not a big matter, of course! :-) Afaic, I would change the \usage to just given the function synopsis (removing \synopsis along the way), and indicate the various usage scenarios via details and/or examples. -k __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] proposed modifications to deprecated
> Robert Gentleman writes: > Hi, >Over the past six months we have had a few problems with deprecation > and Seth Falcon and I want to propose a few additions to the mechanism > that will help deal with cases other than the deprecation of functions. > In the last release one of the arguments to La.svd was deprecated, but > the warning message was very unclear and suggested that in fact La.svd > was deprecated. >Adding a third argument to .Deprecated, msg say (to be consistent > with the internal naming mechanism) that contains the message string > would allow for handling the La.svd issue in a more informative way. It > is a strict addition so no existing code is likely to be broken. That's a very nice idea afaic. >We also need to deprecate data from time to time. Since the field of > genomics is moving fast as good example from five years ago is often no > longer a good example today. This one is a bit harder, but we can modify >tools:::.make_file_exts("data") >to first look for a ".DEP" extension (this does not seem to be a > widely used extension), and if such a file exists, ie NameofData.DEP > one of two things happens: if it contains a character string we use > that for the message (we could source it for the message?), if not print > a standard message (just as .Deprecated does) and then continue with the > search using the other file extensions. >Defunct could be handled similarly. > Comments, alternative suggestions? I thought about more declarative (R-code-based) alternatives, but using a new extension seems most convenient (as it also achieves registration with no need for further code analysis). I would have a slight preference for using ".deprecated", and similar using ".defunct" if necessary. One of the annoying things about the current two-cycle deprecate/defunct process is that R CMD check can only catch usages in code run by the examples. It would be nice to use the codetools infrastructure for an improved code analysis here (checking for calling deprecated "global" variables or function arguments (e.g., for the La.svd() example). Of course, this would not only require that codetools can be made to work again for 2.4.0 (and we do pay a heavy price for the NULL environment changes here afaic), but also that we have a registry for deprecated things ... Btw, is there a formal way of deprecating arguments to functions? Part of the possible La.svd() confusion might come from using if(is.numeric(x) && method == "dgesvd") .Deprecated('La.svd(method = "dgesvd")') Best -k __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Cox survival model
Hi ALL, I am trying to modify Cox propotional hazard function according to my project needs. Is it possible to find source code of C procedures used for fittinf PHREG model: coxfit2.c and coxmart.c.? Thank you, Gregory Kotler __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Cox survival model
On Thu, 4 May 2006, Gregory Kotler wrote: > Hi ALL, > > I am trying to modify Cox propotional hazard function according to my > project needs. > Is it possible to find source code of C procedures used for fittinf > PHREG model: > coxfit2.c and coxmart.c.? They are in the source code package. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] R 2.3.0 and rgl on OS X 10.4.6 (PR#8833)
I just downloaded and installed R 2.3.0 on my Mac G5 running OS X 10.4.6. I also updated with R.app revision 3114 as recommended. Now, when I attemp to use package rgl I get the error > library(rgl) Error: package 'rgl' is not installed for 'arch=ppc' > I have tried reinstalling from CRAN using both binary and source. The source install fails, The binary install yields > Warning in install.packages(file.choose(), , NULL, type = "mac.binary") : argument 'lib' is missing: using /Users/neely/Library/R/library > and does not fix the problem. The same problem occurs with some packages (e1071, svmpath) but not others (gdata, gplots, gtools). Any advice would be greatly appreciated. Neely Atkinson [EMAIL PROTECTED] 713-792-2619 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R 2.3.0 and rgl on OS X 10.4.6 (PR#8833)
On 5/4/2006 2:08 PM, [EMAIL PROTECTED] wrote: > I just downloaded and installed R 2.3.0 on my Mac G5 running > OS X 10.4.6. I also updated with R.app revision 3114 as > recommended. Now, when I attemp to use package rgl > I get the error > >> library(rgl) > Error: package 'rgl' is not installed for 'arch=ppc' >> > > I have tried reinstalling from CRAN using both binary > and source. The source install fails, The binary install > yields > >> > Warning in install.packages(file.choose(), , NULL, type = "mac.binary") : >argument 'lib' is missing: using /Users/neely/Library/R/library >> > > and does not fix the problem. > > The same problem occurs with some packages (e1071, svmpath) > but not others (gdata, gplots, gtools). > > Any advice would be greatly appreciated. I expect you'll need to install from source, but I don't know who will be able to help you to diagnose why it is failing. I'd suggest trying on the R-SIG-Mac mailing list. If you can determine what the problem is and can fix it I'd be happy to incorporate your patch. Otherwise, all I can suggest is that you try a more commonly used platform. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Cox survival model
On Thu, 4 May 2006, Thomas Lumley wrote: > On Thu, 4 May 2006, Gregory Kotler wrote: > >> Hi ALL, >> >> I am trying to modify Cox propotional hazard function according to my >> project needs. >> Is it possible to find source code of C procedures used for fittinf >> PHREG model: >> coxfit2.c and coxmart.c.? > > They are in the source code package. I presume the level of problem here is that that user does not know about that, and is a Windows or Mac user. Go to your nearest CRAN mirror and visit the equivalent of http://cran.r-project.org/src/contrib/Descriptions/survival.html That has a link to 'Package source:' Download it, and it you are a Windows user unpack it using the tools from http://www.murdoch-sutherland.com/Rtools/ -- 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] Rgui, Startup, HOME, R_USER, ...
Hi, Main objective: Let Rgui find my ~/.Rprofile and ~/.Renviron files, where ~ is equal to getwd("~"). I have few comments/questions: (A) On my WinXP Pro installation, the system environment variable 'HOME' is not availble to R, e.g. Sys.getenv("HOME") is empty. I believe this is default case (correct me if I'm wrong). However, if I set the "Start in:" to %HOME% in the Properties for the Rgui.exe file, the working directory is indeed set to getwd("~"), so 'HOME' is available for the startup of R. Excuse me for my lack of understanding WinXP, but why is this? What sysenv variables are available to the R process? PS. I know I can add HOME= in the Rgui.exe properties, however I'm interested in the default lookup path. DS. (B) With the default "Start in:" value of "C:\Program Files\R\R-2.3.0pat", the ~/My Documents/.Rprofile is called. I tried to understand why exactly this path. Reading the R FAQ for Windows, it says that 'R_USER' is used as the default value for the home directory. Where/when is this set, and how? I don't set it myself. It looks like it is set equal to 'HOME' and if that is not set, the to the default %HOMEDRIVE%\%HOMEPATH%\My Documents\, e.g. M:\>set HOME= M:\>Rterm --quiet > Sys.getenv("R_USER") R_USER "C:\\Documents and Settings\\hb\\My Documents" M:\>set HOME=%HOMEDRIVE%\%HOMEPATH% M:\>Rterm --quiet > Sys.getenv("R_USER") R_USER "C:Documents and Settings\\hb" M:\>set HOME=%HOMEDRIVE%\%HOMEPATH%\foo M:\>Rterm --quiet > Sys.getenv("R_USER") R_USER "C:Documents and Settings\\hb\\foo" >From the above I found out that I should put .Rprofile etc in ~/My Documents/ for Rgui to find it by default. Is this behavior documented somewhere and why this specific directory? For parallelism to Unix etc, it would be more natural to have ~/.Rprofile search for by default, but that is not the case (unless I set HOME). (C) Is it possible to set HOME globally to %HOMEDRIVE%\%HOMEPATH% once and for all without editing the Rgui.exe properties? (D) Depending a little bit how and when R_USER is set, could I suggest the the default "Start in:" path for Rgui.exe is changed from the installation directory to %HOME% instead? This is more user friendly, especially to beginners, I think. Best, /Henrik __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Rgui, Startup, HOME, R_USER, ...
Just a few comments: - although one can use environment variables in Windows applications (I am referring to applications generally and not just R) its not the preferred way of doing things. Its ok to support environment variables but they should not be relied on as the preferred way to set configurations though they could be an alternate way. - HOME is really bad since it can conflict with other applications, usually ones that have been ported from UNIX - to find out how startup works I think you will likely have to review the startup source of code of R. I once tried to add some lookup of these to batchfiles (but I ultimately decided to simplify it to the point where none of them were required) and found that reviewing the R souce was the quickest way to be sure. That was a whlie ago though. On 5/4/06, Henrik Bengtsson (max 7Mb) <[EMAIL PROTECTED]> wrote: > Hi, > > Main objective: Let Rgui find my ~/.Rprofile and ~/.Renviron files, > where ~ is equal to getwd("~"). > > I have few comments/questions: > > (A) On my WinXP Pro installation, the system environment variable > 'HOME' is not availble to R, e.g. Sys.getenv("HOME") is empty. I > believe this is default case (correct me if I'm wrong). However, if I > set the "Start in:" to %HOME% in the Properties for the Rgui.exe file, > the working directory is indeed set to getwd("~"), so 'HOME' is > available for the startup of R. Excuse me for my lack of > understanding WinXP, but why is this? What sysenv variables are > available to the R process? PS. I know I can add HOME= in the > Rgui.exe properties, however I'm interested in the default lookup > path. DS. > > (B) With the default "Start in:" value of "C:\Program > Files\R\R-2.3.0pat", the ~/My Documents/.Rprofile is called. I tried > to understand why exactly this path. Reading the R FAQ for Windows, > it says that 'R_USER' is used as the default value for the home > directory. Where/when is this set, and how? I don't set it myself. > It looks like it is set equal to 'HOME' and if that is not set, the to > the default %HOMEDRIVE%\%HOMEPATH%\My Documents\, e.g. > > M:\>set HOME= > M:\>Rterm --quiet > > Sys.getenv("R_USER") >R_USER > "C:\\Documents and Settings\\hb\\My Documents" > M:\>set HOME=%HOMEDRIVE%\%HOMEPATH% > M:\>Rterm --quiet > > Sys.getenv("R_USER") >R_USER > "C:Documents and Settings\\hb" > > M:\>set HOME=%HOMEDRIVE%\%HOMEPATH%\foo > M:\>Rterm --quiet > > Sys.getenv("R_USER") > R_USER > "C:Documents and Settings\\hb\\foo" > > >From the above I found out that I should put .Rprofile etc in ~/My > Documents/ for Rgui to find it by default. Is this behavior > documented somewhere and why this specific directory? For parallelism > to Unix etc, it would be more natural to have ~/.Rprofile search for > by default, but that is not the case (unless I set HOME). > > (C) Is it possible to set HOME globally to %HOMEDRIVE%\%HOMEPATH% once > and for all without editing the Rgui.exe properties? > > (D) Depending a little bit how and when R_USER is set, could I suggest > the the default "Start in:" path for Rgui.exe is changed from the > installation directory to %HOME% instead? This is more user friendly, > especially to beginners, I think. > > Best, > > /Henrik > > __ > 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] !
On 5/4/2006 5:49 PM, Henrik Bengtsson (max 7Mb) wrote: > Hi, > > Main objective: Let Rgui find my ~/.Rprofile and ~/.Renviron files, > where ~ is equal to getwd("~"). > > I have few comments/questions: > > (A) On my WinXP Pro installation, the system environment variable > 'HOME' is not availble to R, e.g. Sys.getenv("HOME") is empty. I > believe this is default case (correct me if I'm wrong). However, if I > set the "Start in:" to %HOME% in the Properties for the Rgui.exe file, > the working directory is indeed set to getwd("~"), so 'HOME' is > available for the startup of R. On my system, doing that gives a different directory: the desktop. > Excuse me for my lack of > understanding WinXP, but why is this? Presumably Windows Explorer is doing something special with %HOME%. It's not simply an environment lookup. > What sysenv variables are > available to the R process? PS. I know I can add HOME= in the > Rgui.exe properties, however I'm interested in the default lookup > path. DS. > > (B) With the default "Start in:" value of "C:\Program > Files\R\R-2.3.0pat", the ~/My Documents/.Rprofile is called. I tried > to understand why exactly this path. Reading the R FAQ for Windows, > it says that 'R_USER' is used as the default value for the home > directory. Where/when is this set, and how? I don't set it myself. It's set by R during the startup if you didn't set it before that. In XP, some of the environment variables given to new processes started from Explorer are found in Control Panel|System|Advanced|Environment Variables Other ones are also set, e.g. HOMEDRIVE and HOMEPATH (which as we found last year, are not set consistently). > It looks like it is set equal to 'HOME' and if that is not set, the to > the default %HOMEDRIVE%\%HOMEPATH%\My Documents\, e.g. > > M:\>set HOME= > M:\>Rterm --quiet >> Sys.getenv("R_USER") > R_USER > "C:\\Documents and Settings\\hb\\My Documents" What you see in a command shell may be different, because variables can be set or cleared when the shell starts up. Whatever happens there is local to the shell, so programs started directly from Explorer won't see the changes. I imagine there's a way to change the global values from the shell, but I don't know it. Gabor probably does! > M:\>set HOME=%HOMEDRIVE%\%HOMEPATH% > M:\>Rterm --quiet >> Sys.getenv("R_USER") > R_USER > "C:Documents and Settings\\hb" > > M:\>set HOME=%HOMEDRIVE%\%HOMEPATH%\foo > M:\>Rterm --quiet >> Sys.getenv("R_USER") > R_USER > "C:Documents and Settings\\hb\\foo" > >>From the above I found out that I should put .Rprofile etc in ~/My > Documents/ for Rgui to find it by default. Is this behavior > documented somewhere and why this specific directory? It's in an appendix of the R Intro manual, "Invoking R under Windows". > For parallelism > to Unix etc, it would be more natural to have ~/.Rprofile search for > by default, but that is not the case (unless I set HOME). The ~ path is not a Windows concept, it's faked by R. Windows has a much more complicated idea of what a user environment is like than Unix does, with a few dozen special directories defined (google for the ShGetSpecialFolderLocation docs for the list). The normal place to put things that the user will edit corresponds to ~/My Documents. ~/Application Data is normally the place to store user-specific config files that the user won't edit directly. Nobody but Windows is supposed to write to the directory R calls ~. > (C) Is it possible to set HOME globally to %HOMEDRIVE%\%HOMEPATH% once > and for all without editing the Rgui.exe properties? You could, but you're not supposed to be writing there. > (D) Depending a little bit how and when R_USER is set, could I suggest > the the default "Start in:" path for Rgui.exe is changed from the > installation directory to %HOME% instead? This is more user friendly, > especially to beginners, I think. It might make sense (from a Windows point of view) to change it to the My Documents folder. I'm not sure what the official definition of %HOME% is. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Rgui, Startup, HOME, R_USER, ...
(Not sure if the previous message went out; sorry if this is a dupe. The only change is to fix the subject.) On 5/4/2006 5:49 PM, Henrik Bengtsson (max 7Mb) wrote: > Hi, > > Main objective: Let Rgui find my ~/.Rprofile and ~/.Renviron files, > where ~ is equal to getwd("~"). > > I have few comments/questions: > > (A) On my WinXP Pro installation, the system environment variable > 'HOME' is not availble to R, e.g. Sys.getenv("HOME") is empty. I > believe this is default case (correct me if I'm wrong). However, if I > set the "Start in:" to %HOME% in the Properties for the Rgui.exe file, > the working directory is indeed set to getwd("~"), so 'HOME' is > available for the startup of R. On my system, doing that gives a different directory: the desktop. > Excuse me for my lack of > understanding WinXP, but why is this? Presumably Windows Explorer is doing something special with %HOME%. It's not simply an environment lookup. > What sysenv variables are > available to the R process? PS. I know I can add HOME= in the > Rgui.exe properties, however I'm interested in the default lookup > path. DS. > > (B) With the default "Start in:" value of "C:\Program > Files\R\R-2.3.0pat", the ~/My Documents/.Rprofile is called. I tried > to understand why exactly this path. Reading the R FAQ for Windows, > it says that 'R_USER' is used as the default value for the home > directory. Where/when is this set, and how? I don't set it myself. It's set by R during the startup if you didn't set it before that. In XP, some of the environment variables given to new processes started from Explorer are found in Control Panel|System|Advanced|Environment Variables Other ones are also set, e.g. HOMEDRIVE and HOMEPATH (which as we found last year, are not set consistently). > It looks like it is set equal to 'HOME' and if that is not set, the to > the default %HOMEDRIVE%\%HOMEPATH%\My Documents\, e.g. > > M:\>set HOME= > M:\>Rterm --quiet >> Sys.getenv("R_USER") > R_USER > "C:\\Documents and Settings\\hb\\My Documents" What you see in a command shell may be different, because variables can be set or cleared when the shell starts up. Whatever happens there is local to the shell, so programs started directly from Explorer won't see the changes. I imagine there's a way to change the global values from the shell, but I don't know it. Gabor probably does! > M:\>set HOME=%HOMEDRIVE%\%HOMEPATH% > M:\>Rterm --quiet >> Sys.getenv("R_USER") > R_USER > "C:Documents and Settings\\hb" > > M:\>set HOME=%HOMEDRIVE%\%HOMEPATH%\foo > M:\>Rterm --quiet >> Sys.getenv("R_USER") > R_USER > "C:Documents and Settings\\hb\\foo" > >>From the above I found out that I should put .Rprofile etc in ~/My > Documents/ for Rgui to find it by default. Is this behavior > documented somewhere and why this specific directory? It's in an appendix of the R Intro manual, "Invoking R under Windows". > For parallelism > to Unix etc, it would be more natural to have ~/.Rprofile search for > by default, but that is not the case (unless I set HOME). The ~ path is not a Windows concept, it's faked by R. Windows has a much more complicated idea of what a user environment is like than Unix does, with a few dozen special directories defined (google for the ShGetSpecialFolderLocation docs for the list). The normal place to put things that the user will edit corresponds to ~/My Documents. ~/Application Data is normally the place to store user-specific config files that the user won't edit directly. Nobody but Windows is supposed to write to the directory R calls ~. > (C) Is it possible to set HOME globally to %HOMEDRIVE%\%HOMEPATH% once > and for all without editing the Rgui.exe properties? You could, but you're not supposed to be writing there. > (D) Depending a little bit how and when R_USER is set, could I suggest > the the default "Start in:" path for Rgui.exe is changed from the > installation directory to %HOME% instead? This is more user friendly, > especially to beginners, I think. It might make sense (from a Windows point of view) to change it to the My Documents folder. I'm not sure what the official definition of %HOME% is. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Rgui, Startup, HOME, R_USER, ...
On 5/4/06, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > I imagine there's a way to change the global values from the shell, but I have never tried it but I think it could be done using regedit by by setting the appropriate registry key: http://vlaurie.com/computers2/Articles/environment.htm It can also be done via vbscript, javascript or any programming language that can access COM objects, such as R with RDCOMClient or rcom, using the wscript.shell object: http://hacks.oreilly.com/pub/h/1107 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Data editor in Mac OS X (PR#8837)
Full_Name: Jason Rogers Version: 2.3.0 Framework 1.15 Gui OS: OS X Submission from: (NULL) (70.110.38.195) The data editor should allow you to change the variable name and type when you double click it, however it does not. I have search the web web and found others reporting the same problem. It might stem from Rcmdr __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel