[Rd] file.rename(): Guaranteed to be complete or not at all?

2011-03-01 Thread Henrik Bengtsson
Hi, assume I have an existing file 'pathname' and I want to rename it to 'pathnameN' (which does not exist). I use: res - file.rename(pathname, pathnameN); Is it guaranteed that: (1) if res == TRUE, the file now have name 'pathnameN' and there is no file with name 'pathname'? (2) if res ==

[Rd] Using src/ to create executable - how to not build shared objects?

2011-02-21 Thread Henrik Bengtsson
Hi. I can use the src/ directory to create executable, cf. Section 'Package subdirectories' in 'Writing R Extensions: A few packages use the src directory for purposes other than making a shared object (e.g. to create executables). Such packages should have files src/Makefile and

Re: [Rd] Set up new CRAN mirror; but have questions before finalizing.

2011-02-19 Thread Henrik Bengtsson
On Fri, Feb 18, 2011 at 10:43 PM, Friedrich Leisch friedrich.lei...@stat.uni-muenchen.de wrote: On Fri, 18 Feb 2011 22:00:28 -0600, Paul Johnson (PJ) wrote:   Hi, everybody   I have an account on Dreamhost.com and when I renewed it recently,   their message said my usage of storage and

Re: [Rd] R 2.13.0 on Windows: R CMD check and 'du' not found

2011-02-15 Thread Henrik Bengtsson
On Sun, Feb 13, 2011 at 5:30 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 11-02-12 4:57 PM, Henrik Bengtsson wrote: FYI, I'm sure the following is a temporary issue, but in case it slips through, I want to raise it here.  On Windows 7 64-bit, running Rcmd check on R devel gives: I

[Rd] matrixStats: Extend to arrays too (Was: Re: Suggestion: Adding quick rowMin and rowMax functions to base package)

2011-02-15 Thread Henrik Bengtsson
Hi. On Sun, Feb 13, 2011 at 10:18 AM, TakeoKatsuki takeo.kats...@gmail.com wrote: Hi Henrik, It would be nice if functions of the matrixStats package can handle array data. For example, rowSums() of the base package sums along the third axis of an array by rowSums(x, dim=2). That is a

[Rd] Wish: Iterate over any data type/object 'xs' in for (x in xs) { ... }

2011-02-13 Thread Henrik Bengtsson
Hi, this is about iterating over any data type/object 'xs' in the for-loop constructor: for (x in xs) { ... } From help(for), on can read that 'xs' has to be An expression evaluating to a vector (including a list and an expression) or to a pairlist or NULL. A factor value will be coerced to a

[Rd] R 2.13.0 on Windows: R CMD check and 'du' not found

2011-02-12 Thread Henrik Bengtsson
FYI, I'm sure the following is a temporary issue, but in case it slips through, I want to raise it here. On Windows 7 64-bit, running Rcmd check on R devel gives: * using R version 2.13.0 Under development (unstable) (2011-02-11 r54330) * using platform: x86_64-pc-mingw32 (64-bit) * using

Re: [Rd] large vignette problem

2011-02-12 Thread Henrik Bengtsson
On Sat, Feb 12, 2011 at 4:26 PM, Henrik Bengtsson h...@biostat.ucsf.edu wrote: Never ever use JPEG for bitmap data plots. Use PNG instead.  See attach image (origin unknown; it is *not* an xkcd comics). Oops - missed to include the following: To generate PNGs, you can do it manually

Re: [Rd] using rasterImage within image

2011-02-09 Thread Henrik Bengtsson
On Wed, Feb 9, 2011 at 11:25 AM, Simon Urbanek simon.urba...@r-project.org wrote: Ben, I have committed something analogous to R-devel (your rotation code was not unlike mine, I replicated the color handling from R internals to be consistent, I fixed the drawing limits and added a check for

Re: [Rd] using rasterImage within image

2011-02-09 Thread Henrik Bengtsson
On Wed, Feb 9, 2011 at 11:53 AM, Simon Urbanek simon.urba...@r-project.org wrote: On Feb 9, 2011, at 2:36 PM, Henrik Bengtsson wrote: On Wed, Feb 9, 2011 at 11:25 AM, Simon Urbanek simon.urba...@r-project.org wrote: Ben, I have committed something analogous to R-devel (your rotation code

Re: [Rd] Save and serialize

2011-02-07 Thread Henrik Bengtsson
Also, if it it adds any value to what you are looking for, the output of serialize() also has header information, cf. R-devel thread 'Small inconsistency in serialize() between R versions and implications on digest()' started March 7, 2007:

Re: [Rd] Save and serialize

2011-02-07 Thread Henrik Bengtsson
be passed to serialize(), but it doesn't sound like it is too urgent to add that. Any updates to digest() will also be backward compatible, so as long as you use digest() you shouldn't have to worry about consistency. /Henrik Hadley On Mon, Feb 7, 2011 at 4:06 PM, Henrik Bengtsson h

Re: [Rd] [.raster bug {was str() on raster objects fails ..}

2011-02-01 Thread Henrik Bengtsson
On Tue, Feb 1, 2011 at 4:46 PM, Paul Murrell p.murr...@auckland.ac.nz wrote: Hi On 1/02/2011 9:22 p.m., Martin Maechler wrote: Henrik Bengtssonh...@biostat.ucsf.edu     on Mon, 31 Jan 2011 11:16:59 -0800 writes:      Hi, str() on raster objects fails for certain dimensions.  For      

[Rd] str() on raster objects fails for certain dimensions

2011-01-31 Thread Henrik Bengtsson
Hi, str() on raster objects fails for certain dimensions. For example: str(as.raster(0, nrow=1, ncol=100)) 'raster' chr [1, 1:100] #00 #00 #00 #00 ... str(as.raster(0, nrow=1, ncol=101)) Error in `[.raster`(object, seq_len(max.len)) : subscript out of bounds This seems to

[Rd] data.frame(A=X): Prepend A. also for single-column X:s [WISH]

2011-01-30 Thread Henrik Bengtsson
Hi. The following results in a data.frame with column names starting with A.: X - data.frame(x=1:2, y=1:2) X x y 1 1 1 2 2 2 data.frame(A=X) A.x A.y 1 1 1 2 2 2 whereas with a single-column matrix you won't get A.: Y - X[,1,drop=FALSE]; Y x 1 1 2 2 data.frame(A=Y); x

Re: [Rd] Possibility for memory improvement: x - as.vector(x) always(?) duplicates

2010-11-29 Thread Henrik Bengtsson
message (below). Browsing the SVN logs for R devel I see that Brian Ripley is the one who has done all the great work related to this one. Thank you! /Henrik On Tue, Nov 23, 2010 at 6:12 AM, Henrik Bengtsson h...@biostat.ucsf.edu wrote: Hi, I've noticed that as.vector() always allocates a new

Re: [Rd] Unexpected behavior with \r in Rgui 2.12.0

2010-11-29 Thread Henrik Bengtsson
] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base /Henrik (Just wanted to share these observations; not really using this feature myself). On Thu, Nov 25, 2010 at 10:12 AM, Henrik Bengtsson h

Re: [Rd] tar R command

2010-11-28 Thread Henrik Bengtsson
First, if you look carefully, then you see that argument 'files' should specify *filepaths*, i.e. directories and not specific files. Thus, if you for instance place your files in directory foo/ and then call tar(foo.tar, files=foo/); you would do the right thing. HOWEVER, looking at the

Re: [Rd] Unexpected behavior with \r in Rgui 2.12.0

2010-11-25 Thread Henrik Bengtsson
FYI, this topic was discussed in R-help thread 'cat(), Rgui, and support for carriage return \r...' on March 17-29, 2006: https://stat.ethz.ch/pipermail/r-help/2006-March/101863.html Some modifications to Rgui's behavior was brought up and (I think) implemented at the time. As far as I

Re: [Rd] Unexpected behavior with \r in Rgui 2.12.0

2010-11-25 Thread Henrik Bengtsson
On Thu, Nov 25, 2010 at 10:02 AM, Henrik Bengtsson h...@biostat.ucsf.edu wrote: FYI, this topic was discussed in R-help thread 'cat(), Rgui, and support for carriage return \r...' on March 17-29, 2006:  https://stat.ethz.ch/pipermail/r-help/2006-March/101863.html Some modifications

[Rd] Possibility for memory improvement: x - as.vector(x) always(?) duplicates

2010-11-23 Thread Henrik Bengtsson
Hi, I've noticed that as.vector() always allocates a new object, e.g. x - 1:10; x - as.vector(x); tracemem(x); [1] 0x05622db8 x - as.vector(x); tracemem[0x05622db8 - 0x05622ec0]: as.vector x - as.vector(x); tracemem[0x05622ec0 - 0x05622f18]: as.vector

Re: [Rd] Trying to understand the search path and namespaces

2010-11-15 Thread Henrik Bengtsson
On Mon, Nov 15, 2010 at 3:26 PM, Hadley Wickham had...@rice.edu wrote: Hi all, I'm trying to understand how the search path and namespaces interact. For example, take the devtools package which suggests the testthat package.  Here's what the search path looks like after I load each of those

Re: [Rd] opening graphics device with a given number

2010-11-13 Thread Henrik Bengtsson
See devSet() in R.utils, e.g. library(R.utils); graphics.off(); devSet(6); devSet(myFigure); # Also possible print(devList()); myFigure Device 6 26 /Henrik On Sat, Nov 13, 2010 at 2:44 AM, Petr Savicky savi...@cs.cas.cz wrote: I am preparing a script, which uses three

Re: [Rd] inst/ and hidden files/directories, especially inst/.svn/?

2010-11-04 Thread Henrik Bengtsson
2010/11/4 Uwe Ligges lig...@statistik.tu-dortmund.de: On 03.11.2010 19:26, Henrik Bengtsson wrote: On Wed, Nov 3, 2010 at 9:50 AM, Uwe Ligges lig...@statistik.tu-dortmund.de  wrote: Yes, .svn is special cased. Good. Note that it does not seem to be the case for the *.zip archive, only

Re: [Rd] Using sample() to sample one value from a single value?

2010-11-04 Thread Henrik Bengtsson
Hi. On Thu, Nov 4, 2010 at 7:42 AM, Tim Hesterberg timhesterb...@gmail.com wrote: On Wed, Nov 3, 2010 at 3:54 PM, Henrik Bengtsson h...@biostat.ucsf.eduwrote: Hi, consider this one as an FYI, or a seed for further discussion. I am aware that many traps on sample() have been reported over

Re: [Rd] Calling C in R in Windows 64 bit

2010-11-03 Thread Henrik Bengtsson
Is the dash in –lR really a dash? Shouldn't it be -lR so it is interpreted as a flag/option?! My $.02 /H On Wed, Nov 3, 2010 at 5:20 AM, aysun.cetinyu...@ulg.ac.be wrote: Dear developers, I am trying to run some C/ Fortran code in R. Although I have experience with that in Windows

[Rd] Using sample() to sample one value from a single value?

2010-11-03 Thread Henrik Bengtsson
Hi, consider this one as an FYI, or a seed for further discussion. I am aware that many traps on sample() have been reported over the years. I know that these are also documents in help(sample). Still I got bitten by this while writing sample(units, size=length(units)); where 'units' is an

Re: [Rd] Using sample() to sample one value from a single value?

2010-11-03 Thread Henrik Bengtsson
in R? /Henrik On Wed, Nov 3, 2010 at 3:54 PM, Henrik Bengtsson h...@biostat.ucsf.eduwrote: Hi, consider this one as an FYI, or a seed for further discussion. I am aware that many traps on sample() have been reported over the years.  I know that these are also documents in help(sample).  Still

Re: [Rd] Using sample() to sample one value from a single value?

2010-11-03 Thread Henrik Bengtsson
On Wed, Nov 3, 2010 at 11:07 AM, Henrik Bengtsson h...@biostat.ucsf.edu wrote: On Wed, Nov 3, 2010 at 11:02 AM, Henrique Dallazuanna www...@gmail.com wrote: The resample function in the example section from sample help page does it or not? Yes, I just noticed that one [at the very end

Re: [Rd] inst/ and hidden files/directories, especially inst/.svn/?

2010-11-03 Thread Henrik Bengtsson
On Wed, Nov 3, 2010 at 9:50 AM, Uwe Ligges lig...@statistik.tu-dortmund.de wrote: Yes, .svn is special cased. Good. Note that it does not seem to be the case for the *.zip archive, only for the *.tar.gz archive, as I showed. /H Uwe Ligges On 02.11.2010 23:53, Henrik Bengtsson wrote

[Rd] inst/ and hidden files/directories, especially inst/.svn/?

2010-11-02 Thread Henrik Bengtsson
In Section 'Package subdirectories' of 'Writing R Extensions', it says about the inst/ directory that: The contents of the inst subdirectory will be copied recursively to the installation directory (except perhaps hidden files with names starting with ‘.’). Indeed, on Windows with R v2.12.0

Re: [Rd] list2env() is broken

2010-10-29 Thread Henrik Bengtsson
On Fri, Oct 29, 2010 at 10:53 AM, Hervé Pagès hpa...@fhcrc.org wrote: Hi, On 10/29/2010 12:17 AM, Prof Brian Ripley wrote: I have no idea what 'timeout' means, but that *should* take an extraordinarily long time (it is at least quadratic in the input length). This is the point of hashing --

[Rd] Documentation of option 'help.ports' not in help(options)

2010-10-27 Thread Henrik Bengtsson
FYI, the option 'help.ports' is not document under help(options). Should it? It is documented under help(startDynamicHelp, package=tools). This is for for R v2.13.0dev and Rv2.12.0. /Henrik __ R-devel@r-project.org mailing list

[Rd] CRAN: Windows builds/pages outdated?

2010-10-22 Thread Henrik Bengtsson
FYI, in case you are not aware of it, both http://cran.r-project.org/bin/windows/base/rpatched.html http://cran.r-project.org/bin/windows/base/rdevel.html link to old builds (2010-10-14 r53300). /Henrik __ R-devel@r-project.org mailing list

Re: [Rd] Very slow plot rendering with X11 on CentOS 5.5

2010-09-28 Thread Henrik Bengtsson
For whatever it is worth, a long time ago I had this problem when ssh -X connecting to a server and doing simple plots such as plot(1:10). It was painfully slow and I could see how each data points was plotted. After using X11.options(type=Xlib) in R things was back to normal (fast) again. I

[Rd] OT: Reason/history behind ## notation for comments?

2010-09-22 Thread Henrik Bengtsson
Off topic, but since I've observe both styles, does anyone know the history behind/reason for using ## instead of a single # to start comments in R. I know some editors do this by default. Is it because in C it is easier to distinguish (search/replace/...) comments from C preprocessor directives

[Rd] Crash report: regexpr(a{2-}, )

2010-09-21 Thread Henrik Bengtsson
Each of the following calls crash (core dumps) R (R --vanilla) on various versions and OSes: regexpr(a{2-}, ) sub(a{2-}, ) gsub(a{2-}, ) EXAMPLES: sessionInfo() R version 2.11.1 Patched (2010-09-16 r52949) Platform: i386-pc-mingw32 (32-bit) ... regexpr(a{2-}, ) Assertion failed: iter-max ==

Re: [Rd] Crash report: regexpr(a{2-}, )

2010-09-21 Thread Henrik Bengtsson
, 2010, at 11:04 PM, Henrik Bengtsson wrote: Each of the following calls crash (core dumps) R (R --vanilla) on various versions and OSes: regexpr(a{2-}, ) sub(a{2-}, ) gsub(a{2-}, ) EXAMPLES: sessionInfo() R version 2.11.1 Patched (2010-09-16 r52949) Platform: i386-pc-mingw32 (32-bit

Re: [Rd] Crash report: regexpr(a{2-}, )

2010-09-21 Thread Henrik Bengtsson
On Tue, Sep 21, 2010 at 9:20 PM, David Winsemius dwinsem...@comcast.net wrote: On Sep 22, 2010, at 12:12 AM, Henrik Bengtsson wrote: David's post made me realize that I got the sub()/gsub() lines wrong. It should be: regexpr(a{2-}, ) sub(a{2-}, , ) gsub(a{2-}, , ) Still no crash

[Rd] R-forge: Web server down / no space left

2010-09-15 Thread Henrik Bengtsson
FYI and for the R-forge maintainers information: Trying to access http://r-forge.r-project.org/ at this very moment gives: An error occured in the logger. ERROR: could not extend relation 1663/19060/19983: No space left on device HINT: Check free disk space. /Henrik

[Rd] Suggestion: Add DESCRIPTION 'Date' to R CMD check log header

2010-09-14 Thread Henrik Bengtsson
Hi, in R CMD check, the version of the package being checked is reported, e.g. Thu Sep 9 05:02:30 2010: Checking package R.utils (SVN revision 399) ... * using log directory ‘/srv/R/R.check/R-devel/PKGS/R.utils.Rcheck’ * using R version 2.12.0 Under development (unstable) (2010-09-07 r52876) *

Re: [Rd] warning or error upon type/storage mode coercion?

2010-09-14 Thread Henrik Bengtsson
On Tue, Sep 14, 2010 at 6:23 PM, Benjamin Tyner bty...@gmail.com wrote: Hi, I'm aware that the language definition states R objects are often coerced to different types during computations. Two questions: 1. Is it possible to configure the R environment so that, for example, coercion from

Re: [Rd] Internal state indicating if a data object has NAs/no NAs/not sure (Was: Re: Speeding up matrix multiplies)

2010-08-23 Thread Henrik Bengtsson
Hi, I'm just following your messages the overhead that the code for dealing with possible NA/NaN values brings. When I was setting up part of the matrixStats package, I've also though about this. I was thinking of having an additional logical argument 'hasNA'/'has.na' where you as a user can

Re: [Rd] R.exe crashes on R v2.12.0dev (Windows Vista)

2010-07-28 Thread Henrik Bengtsson
trying to figure out how that tool works. On Mon, Jul 26, 2010 at 5:20 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 26/07/2010 10:25 AM, Henrik Bengtsson wrote: Shame on me; I put important only in the subject line. It's Windows Vista Business 32-bit (Service Pack 2) English

Re: [Rd] R.exe crashes on R v2.12.0dev (Windows Vista)

2010-07-28 Thread Henrik Bengtsson
On Wed, Jul 28, 2010 at 6:24 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 28/07/2010 11:06 AM, Duncan Murdoch wrote: On 28/07/2010 9:37 AM, Henrik Bengtsson wrote: Hi, by pure luck, I discovered that it has to do with the number of characters (or similar) in the Windows system

Re: [Rd] R.exe crashes on R v2.12.0dev (Windows Vista)

2010-07-26 Thread Henrik Bengtsson
: 9431192a7274b0ee769861df31ecee58 Additional Information 3: f768 Additional Information 4: 930d06d3f6aed4162dca7601993082f5 Anyone knows if there anything else I can do to provide more debug information on this? /Henrik On Sat, May 22, 2010 at 10:37 AM, Henrik Bengtsson h...@stat.berkeley.edu wrote

Re: [Rd] R.exe crashes on R v2.12.0dev (Windows Vista)

2010-07-26 Thread Henrik Bengtsson
Shame on me; I put important only in the subject line. It's Windows Vista Business 32-bit (Service Pack 2) English with the latest updates. /Henrik On Mon, Jul 26, 2010 at 1:30 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 26/07/2010 5:15 AM, Henrik Bengtsson wrote: Just FYI: Problem

Re: [Rd] Suggestion for serialization performance improvement on Windows

2010-07-13 Thread Henrik Bengtsson
On Fri, Jul 9, 2010 at 6:49 AM, Bryan W. Lewis bwaynele...@gmail.com wrote: Dear R developers,  The slow performance of serializing to a raw vector on Windows is an issue that has appeared in this list before. My guess is that you are referring to: [Rd] serialize() to via temporary file is

Re: [Rd] pass-by-reference

2010-07-08 Thread Henrik Bengtsson
See packages R.oo and proto. If you wish to do it yourself, you want to utilize environments for this. /Henrik On Thu, Jul 8, 2010 at 6:52 AM, Paul Bailey pdbai...@umd.edu wrote: I'm working with a large object that I want to modify slightly in a function. Pass-by-reference would make a lot

Re: [Rd] pass-by-reference

2010-07-08 Thread Henrik Bengtsson
...and for tracing memory allocations/duplications, see tracemem(). /Henrik On Thu, Jul 8, 2010 at 9:14 AM, Henrik Bengtsson h...@stat.berkeley.edu wrote: See packages R.oo and proto. If you wish to do it yourself, you want to utilize environments for this. /Henrik On Thu, Jul 8, 2010

Re: [Rd] arr.ind argument to which.min and which.max

2010-07-06 Thread Henrik Bengtsson
On Tue, Jul 6, 2010 at 11:53 AM, Martin Maechler maech...@stat.math.ethz.ch wrote: HenrikB == Henrik Bengtsson h...@stat.berkeley.edu     on Mon, 5 Jul 2010 22:53:59 +0200 writes:    HenrikB ...and, of course, just after sending it off I found out that from R    HenrikB v2.11.0

Re: [Rd] arr.ind argument to which.min and which.max

2010-07-05 Thread Henrik Bengtsson
For what it's worth, see arrayIndex() in R.utils, e.g. # Single index print(arrayIndex(21, dim=c(4,3,3))) # Multiple indices print(arrayIndex(20:23, dim=c(4,3,3))) # Whole array x - array(1:30, dim=c(5,6)) print(arrayIndex(1:length(x), dim=dim(x))) # Find (row,column) of maximum value m -

Re: [Rd] arr.ind argument to which.min and which.max

2010-07-05 Thread Henrik Bengtsson
...and, of course, just after sending it off I found out that from R v2.11.0 there is now an arrayInd() in the 'base' package doing exactly the same thing. See help(arrayInd). /Henrik On Mon, Jul 5, 2010 at 10:49 PM, hb h...@stat.berkeley.edu wrote: For what it's worth, see arrayIndex() in

[Rd] codetools: Suggestion to detect potentially unassigned variables

2010-06-01 Thread Henrik Bengtsson
This is just a note/wishlist/for the record: With foo1 - function() { res; } foo2 - function() { for (i in c()) res - 1; res; } foo3 - function() { while (FALSE) res - 1; res; } foo4 - function() { if (FALSE) res - 1; res; } we get: foo1() Error in foo1() : object 'res' not

Re: [Rd] require( foo (= 2.1) )

2010-05-31 Thread Henrik Bengtsson
On Mon, May 31, 2010 at 10:41 AM, Barry Rowlingson b.rowling...@lancaster.ac.uk wrote: On Sun, May 30, 2010 at 5:50 PM, Romain Francois rom...@r-enthusiasts.com wrote: Hi, Sure. I could and I would provide a patch. Since this is more of a nice to have, I wanted to first find out whether

[Rd] R.exe crashes on R v2.12.0dev (Windows Vista)

2010-05-22 Thread Henrik Bengtsson
Using the latest developers version of R [2.12.0 Under development (unstable) (2010-05-21 r52061)], R.exe crashes: %ProgramFiles%/R/R-2.12.0dev/bin/i386/R.exe with Windows reporting: Problem signature: Problem Event Name: APPCRASH Application Name: R.exe Application Version:

[Rd] Suggestion: Add DESCRIPTION/NEWS files to the Rtools compilations

2010-05-20 Thread Henrik Bengtsson
Hi, I'd like to suggest that DESCRIPTION and/or NEWS files, or other information revealing the version, would be added to the different Rtools compilations (http://www.murdoch-sutherland.com/Rtools/). Currently it's not easy to figure out which version is installed. Another suggestion is to have

[Rd] R for Windows FAQ: Minor comment on 32- and 64-bit installation paths

2010-05-13 Thread Henrik Bengtsson
In 'R for Windows FAQ' for R version 2.11.0 Patched (2010-05-11 r51982) you can read: [2.29] Can both 32- and 64-bit R be installed on the same machine? Obviously, only relevant if the machine is running a 64-bit version of Windows. Yes, with a little care. For R 2.11.x they should be installed

Re: [Rd] S4 Inheritance of environments

2010-04-25 Thread Henrik Bengtsson
On Sun, Apr 25, 2010 at 1:09 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 24/04/2010 1:15 PM, Christopher Brown wrote: I looked through the documentation and the mailing lists and could not find an answer to this.  My apologies if it has already been answered.  If it has, a pointer

Re: [Rd] CRAN: MacOS X binary: not available, see check log?

2010-04-20 Thread Henrik Bengtsson
Hi, On Thu, Apr 15, 2010 at 3:45 PM, Simon Urbanek simon.urba...@r-project.org wrote: On Apr 15, 2010, at 2:26 AM, Henrik Bengtsson wrote: For a couple of days, MacOS X binaries are not build on CRAN (for my recently uploaded packages only?): AFAICS your package was posted on Apr 13 so

Re: [Rd] callNextMethod() and NAMESPACE

2010-04-20 Thread Henrik Bengtsson
It could be that you define the below in two different source files and you are only updating the first and it is overwritten by the second which you never edit? /Henrik On Thu, Apr 15, 2010 at 4:21 PM, Adrian Waddell adr...@waddell.ch wrote: Hello there, I define a accessor method for one of

Re: [Rd] CRAN: MacOS X binary: not available, see check log?

2010-04-20 Thread Henrik Bengtsson
On Tue, Apr 20, 2010 at 3:58 PM, Simon Urbanek simon.urba...@r-project.org wrote: On Apr 20, 2010, at 2:57 AM, Henrik Bengtsson wrote: Hi, On Thu, Apr 15, 2010 at 3:45 PM, Simon Urbanek simon.urba...@r-project.org wrote: On Apr 15, 2010, at 2:26 AM, Henrik Bengtsson wrote: For a couple

Re: [Rd] R CMD check tells me 'no visible binding for globalvariable ', what does it mean?

2010-04-16 Thread Henrik Bengtsson
: On Mon, 12 Apr 2010, William Dunlap wrote: -Original Message- From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On Behalf Of Henrik Bengtsson Sent: Monday, April 12, 2010 8:24 AM To: Duncan Murdoch Cc: r-devel; Michael Dewey Subject: Re: [Rd] R CMD check tells

Re: [Rd] R CMD check tells me 'no visible binding for globalvariable ', what does it mean?

2010-04-16 Thread Henrik Bengtsson
On Fri, Apr 16, 2010 at 5:51 PM, Thomas Lumley tlum...@u.washington.edu wrote: On Fri, 16 Apr 2010, Simon Urbanek wrote: On Apr 16, 2010, at 4:38 AM, Henrik Bengtsson wrote: I think what people are also thinking about is that the policy for publishing a package on CRAN is that it have

[Rd] CRAN: MacOS X binary: not available, see check log?

2010-04-15 Thread Henrik Bengtsson
For a couple of days, MacOS X binaries are not build on CRAN (for my recently uploaded packages only?): The R.oo package is listed as MacOS X binary: not available, see check log?, but the 'check log' show no errors URL: http://cran.r-project.org/web/packages/R.oo/ Is this a known issue?

Re: [Rd] R CMD check tells me 'no visible binding for global variable ', what does it mean?

2010-04-12 Thread Henrik Bengtsson
On Mon, Apr 12, 2010 at 5:08 PM, Duncan Murdoch murd...@stats.uwo.ca wrote: On 12/04/2010 10:51 AM, Michael Dewey wrote: When I run R CMD check on a package I have recently started work on I get the following: * checking R code for possible problems ... NOTE addlinear: no visible binding

Re: [Rd] generic '[' for a non-exported class

2010-04-07 Thread Henrik Bengtsson
On Wed, Apr 7, 2010 at 6:13 PM, Seth Falcon s...@userprimary.net wrote: On 4/7/10 1:09 AM, Christophe Genolini wrote: Hi all, I define a S4 class 'foo'. I define '[' and '[-' for it. I do not want to export foo, so I do not put it in NAMESPACE. I do not want to export '[' and '[-' either

[Rd] Is it valid to do x == Inf?

2010-04-01 Thread Henrik Bengtsson
Hi, I found in a bit of code the following test for infinity: if (x == Inf) ... Is that valid, or should it be (as I always thought): if (is.infinite(x)) ...? Does it depend on whether 'x' is float or integer? My question is related to testing for missing values where is.na(x) is

Re: [Rd] Suggestion: Adding quick rowMin and rowMax functions to base package

2010-03-30 Thread Henrik Bengtsson
See rowMins(), rowMaxs() and rowRanges() in matrixStats (on CRAN). The matrixStats package was created for the purpose of providing such row*/col*() methods. First the functionality is provided, then the methods are optimized for speed and memory, e.g. vectorizing, implementing in native code,

Re: [Rd] Possible improvements/clarifications for R-forge (Was: Re: Using SVN + SSH on windows)

2010-03-29 Thread Henrik Bengtsson
On Mon, Mar 29, 2010 at 12:15 PM, cgeno...@u-paris10.fr wrote: Getting back to the original poster who may have been forgotten in all this, alternatives are switching to Linux and using R-Forge with that (if such a switch in platforms is feasible) or using googlecode (that's the largest

Re: [Rd] Using SVN + SSH on windows

2010-03-29 Thread Henrik Bengtsson
Christophe, if you want to solve your problem, please see if you first can do it *without* ssh-keys. *Only* when that is working, worry about the ssh keys. For detailed information on both cases, see by Thread '[Rd] Setting up TortoiseSVN and PuTTY on Windows for r-forge.r-project.org' on

Re: [Rd] Setting up TortoiseSVN and PuTTY on Windows for r-forge.r-project.org (Was: Re: Using SVN + SSH on windows)

2010-03-28 Thread Henrik Bengtsson
Here are some notes/observations I've done on my setup that works for me. Hopefully it will be added to some r-forge documentation/wiki. I use: Windows Vista Business SP2 32bit TortoiseSVN 1.6.7 (Build 18415 - 32 Bit , 2010/01/22 17:55:06) PuTTY v0.60 (with Pageant v0.60) I have a deprecated

Re: [Rd] Using SVN + SSH on windows

2010-03-27 Thread Henrik Bengtsson
On Sat, Mar 27, 2010 at 3:12 PM, Christophe Genolini cgeno...@u-paris10.fr wrote: Hi the list, I try to use R-Forge for developping a projet. I am using tortoise SVN (last version) but I do not manage to Commit. I read the R-Forge user Manual and some post on  but I do not manage to find the

Re: [Rd] Using SVN + SSH on windows

2010-03-27 Thread Henrik Bengtsson
2010/3/27 hb h...@stat.berkeley.edu: On Sat, Mar 27, 2010 at 3:12 PM, Christophe Genolini cgeno...@u-paris10.fr wrote: Hi the list, I try to use R-Forge for developping a projet. I am using tortoise SVN (last version) but I do not manage to Commit. I read the R-Forge user Manual and some

Re: [Rd] Using SVN + SSH on windows

2010-03-27 Thread Henrik Bengtsson
2010/3/27 Christophe Genolini cgeno...@u-paris10.fr: Henrik Bengtsson a écrit : 2010/3/27 hb h...@stat.berkeley.edu: On Sat, Mar 27, 2010 at 3:12 PM, Christophe Genolini cgeno...@u-paris10.fr wrote: Hi the list, I try to use R-Forge for developping a projet. I am using tortoise SVN

Re: [Rd] Using SVN + SSH on windows

2010-03-27 Thread Henrik Bengtsson
PM, Henrik Bengtsson h...@stat.berkeley.edu wrote: 2010/3/27 Christophe Genolini cgeno...@u-paris10.fr: Henrik Bengtsson a écrit : 2010/3/27 hb h...@stat.berkeley.edu: On Sat, Mar 27, 2010 at 3:12 PM, Christophe Genolini cgeno...@u-paris10.fr wrote: Hi the list, I try to use R-Forge

Re: [Rd] Suggestion: Not having to export .conflicts.OK in name spaces

2010-03-27 Thread Henrik Bengtsson
Hi. On Mon, Mar 22, 2010 at 5:36 PM, Seth Falcon s...@userprimary.net wrote: On 3/22/10 3:57 AM, Martin Maechler wrote: SF == Seth Falcons...@userprimary.net     on Fri, 19 Mar 2010 13:47:17 -0700 writes:     SF  On 3/17/10 9:11 AM, Henrik Bengtsson wrote:      Currently library

[Rd] DESCRIPTION: Imports: assertion of version?

2010-03-19 Thread Henrik Bengtsson
Hi, from 'Writing R Extensions' [R version 2.11.0 Under development (unstable) (2010-03-16 r51290)] one can read: The optional `Imports' field lists packages whose name spaces are imported from but which do not need to be attached. [...] Versions can be specified, but will not be checked when

[Rd] Suggestion: Move \alias{.conflicts.OK} to base/man/library.Rd instead.

2010-03-17 Thread Henrik Bengtsson
Currently help.search(.conflicts.OK) gives: methods::.conflicts.OKAdditional (Support) Functions for Methods However, help(.conflicts.OK, package=methods) provides no information on the term .conflicts.OK. Check the R-devel SVN source code, this is only because there is an:

[Rd] Suggestion: Not having to export .conflicts.OK in name spaces

2010-03-17 Thread Henrik Bengtsson
Currently library() and attach() fail to locate an existing '.conflicts.OK' in a package wit name space, unless it is exported. Since there should be little interest in exporting '.conflicts.OK' otherwise, one may argue that those methods should look for '.conflicts.OK' even if it is not exported.

Re: [Rd] [PATCH] R ignores PATH_MAX and fails in long directories (PR#14228)

2010-03-11 Thread Henrik Bengtsson
Thanks for the troubleshooting, I just want to second this patch; it would be great if PATH_MAX could be used everywhere. In case someone else searches the archives later, but also for those who don't know what this is about, PATH_MAX specifies the maximum number of symbols allowed in a

Re: [Rd] R logo as SVG ?

2010-03-03 Thread Henrik Bengtsson
My Wednesday procrastination: There's quite some number of decimals in the SVG and some whitespace, so some dummy trimming gives: x - readLines(http://developer.r-project.org/Logo/Rlogo-1.svg;); nx - sum(nchar(x))+length(x); for (kk in 2:0) { # Keep only K decimals pattern -

Re: [Rd] system.time provides inaccurate sys.child (PR#14210)

2010-02-21 Thread Henrik Bengtsson
FYI, you're much more likely to get a response/see actions on this if you report issues using the most recent stable version (R v2.10.1) and/or even the developers version (R v2.11.0). You're current version is, as you see, more than 2 years old. It is likely that the threshold to compare the

Re: [Rd] Rubbish values written with zero-length vectors (PR#14217)

2010-02-20 Thread Henrik Bengtsson
Confirmed behavior on R version 2.10.1 Patched (2010-01-12 r50990) and R version 2.11.0 Under development (unstable) (2010-02-14 r51138) [Windows Vista]: INTEGERS: v - integer(5) v [1] 0 0 0 0 0 v[[2]] - integer(0) v [1] 0 2892960 0 0 0 v[[4]] - 1L[c()] v [1] 0

[Rd] R-forge down

2010-02-20 Thread Henrik Bengtsson
FYI/to the maintainers of r-forge: R-forge seems to be down: 1. http://r-forge.r-project.org/ gives minimal page R-Forge Could Not Connect to Database:. 2. svn+ssh://user name@svn.r-forge.r-project.org/ - svn requests does not work. 3. ping svn.r-forge.r-project.org does indeed respond. /Henrik

[Rd] FYI: A case that the code validation of R CMD check misses

2010-02-16 Thread Henrik Bengtsson
Hi, I discovered a case where the code validation of R CMD check fails to detect this issue. If a non-existing is defined/assigned in the same function as a non-existing object is used, it passes unnoticed. For example, foo - function(...) { nonExistingDummy1 - nonExistingDummy1(...);

Re: [Rd] Darwinian software development and the library function

2010-02-13 Thread Henrik Bengtsson
Hi. Here are some guidelines that I find useful: - Avoid changing the arguments of generic functions provided by the default R packages, especially the ones in base. Just, accept those arguments. If there are extra arguments you don't like, you can always add '...' to your method and they will

Re: [Rd] R Startup configuration file

2010-02-12 Thread Henrik Bengtsson
FYI, a while ago I was looking into the problem with generic settings files. I didn't find an omnibus/perfect solution, but have a look at the Settings class in the R.utils package (R/Settings.R in the source code). It tries to deal with automatic loading and saving of settings (robust

Re: [Rd] CRAN: No MacOS X binary builds since January 7

2010-01-19 Thread Henrik Bengtsson
, at 7:53 , Henrik Bengtsson wrote: On Mon, Jan 18, 2010 at 1:36 AM, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: Not an issue for *this* list! I used this list to share this with package developers - not particularly MacOS X users.  As a package provider  I'd like to know when packages

[Rd] CRAN: No MacOS X binary builds since January 7

2010-01-18 Thread Henrik Bengtsson
FYI, no MacOS X binaries have been built for CRAN since 2010-01-07: url - http://cran.r-project.org/bin/macosx/universal/contrib/r-release/;; x - readLines(url); pattern - .*([0-9]{2}-[A-Za-z]{3}-[0-9]{4}) ([0-9]{2}:[0-9]{2}).*; y - grep(pattern, x, value=TRUE); y - grep(PACKAGE, y,

Re: [Rd] CRAN: No MacOS X binary builds since January 7

2010-01-18 Thread Henrik Bengtsson
and you can always install from the sources (in the vast majority of cases with no extra tools other than Xcode). On Sun, 17 Jan 2010, Henrik Bengtsson wrote: FYI, no MacOS X binaries have been built for CRAN since 2010-01-07: url - http://cran.r-project.org/bin/macosx/universal/contrib/r

[Rd] Wishlist: system.file(... package) throw an error if package not installed/path not found

2010-01-14 Thread Henrik Bengtsson
Currently, system.file() on a non-existing package returns an empty string: path - system.file(package=foo); print(path); [1] The same goes for non-existing paths in existing package directories: path - system.file(foo, package=base); print(path); [1] Is there a rationale for this, or is it

Re: [Rd] Human-style sort() of alphanum strings?

2010-01-07 Thread Henrik Bengtsson
in gtools.  Also on http://gsubfn.googlecode.com see mixsort example in the section starting ### more examples On Tue, Jan 5, 2010 at 6:34 PM, Henrik Bengtsson h...@stat.berkeley.edu wrote: I know it is fairly easy to implement (though not always well defined), but is there an existing sort

Re: [Rd] Human-style sort() of alphanum strings?

2010-01-07 Thread Henrik Bengtsson
Thanks, and sorry - I missed those two missing letter ed and though you only refer to that URL for extra example code. mixsort() does it for me. /H On Thu, Jan 7, 2010 at 3:50 PM, Henrik Bengtsson h...@stat.berkeley.edu wrote: Follow up/bug: mixedsort() gets confused when there are periods

[Rd] Human-style sort() of alphanum strings?

2010-01-05 Thread Henrik Bengtsson
I know it is fairly easy to implement (though not always well defined), but is there an existing sort function out there that takes alphanum strings and sort them in a human fashion? For example, instead of: z1.doc z10.doc z100.doc z101.doc z11.doc z2.doc it should out put: z1.doc z2.doc

[Rd] Should file.access(as.character(NA)) return -1 (now 0)?

2009-12-30 Thread Henrik Bengtsson
Should file.access(as.character(NA)) return -1 to be consisting with non-existing files? file.access(c(Non-existing-file, NA), mode=1) Non-existing-file NA -1 0 file.access(c(Non-existing-file, NA), mode=2) Non-existing-file NA

Re: [Rd] Rcpp: Clarifying the meaning of GPL?

2009-12-23 Thread Henrik Bengtsson
I guess one problem is who is in charge of the name Rcpp on CRAN. For instance, can I fork of yet another version of Rcpp (or any other CRAN package) and submit it to CRAN? Can the original author submit a completely different Rcpp package breaking all the additions made by the new contributors?

[Rd] x[c()] - value sets the mode to mode(value)

2009-12-08 Thread Henrik Bengtsson
Only for the record, an unnecessary overhead when nothing is assigned: x - integer(10) str(x) int [1:10] 0 0 0 0 0 0 0 0 0 0 x[c()] - 1.0; str(x) num [1:10] 0 0 0 0 0 0 0 0 0 0 'x' could equally well have renamed untouched. /Henrik __

Re: [Rd] Sending signals to current R process from R running under MS Windows (c.f. Esc)

2009-11-28 Thread Henrik Bengtsson
Hi, here is some discussion/information in the same vein: (1) R-help thread '[R] The R fork', March 18, 2006: https://stat.ethz.ch/pipermail/r-help/2006-March/101913.html (2) R-devel thread '[Rd] New simpleExit() condition (Was: Re: Can example() code stop the example without generating an

[Rd] Suggestion: Clarification in Rd for utils::getAnywhere()

2009-11-20 Thread Henrik Bengtsson
In order to clarify that getAnywhere(str) where str is a character string object, will look for object with name str and not the value of 'str', I suggest the following Rd updated for utils::getAnywhere(): Update the argument list: \item{x}{a [literal] character string or name.} The term

<    3   4   5   6   7   8   9   10   11   >