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] 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] 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] 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,

[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] 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

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

[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 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

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] 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

[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

[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.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:

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] 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] 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

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] 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] 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] 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] 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] 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

[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

[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] 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] 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

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] 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

[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

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] 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] 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

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] 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] 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

[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] 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

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] 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

[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

[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

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      

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] 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

[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

[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

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

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

[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

[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 ==

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

2011-03-02 Thread Henrik Bengtsson
2011, Henrik Bengtsson wrote: 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

[Rd] Create an environment and assign objects to it in one go?

2011-03-09 Thread Henrik Bengtsson
Hi, I've just created: newEnvEval - function(..., hash=FALSE, parent=parent.frame(), size=29L) { envir - new.env(hash=hash, parent=parent, size=size); evalq(..., envir=envir); envir; } # newEnvEval() so that I can create an environment and assign objects to it in one go, e.g. env -

Re: [Rd] unique.matrix issue [Was: Anomaly with unique and match]

2011-03-10 Thread Henrik Bengtsson
It should be possible to run unique()/duplicated() column by column and incrementally update the set of unique/duplicated rows. This would avoid any coercing. The benefit should be even greater for data.frame():s. My $.02 /Henrik On Thu, Mar 10, 2011 at 12:29 AM, Petr Savicky

Re: [Rd] Create an environment and assign objects to it in one go?

2011-03-10 Thread Henrik Bengtsson
/Henrik On Thu, Mar 10, 2011 at 5:53 AM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On 3/10/11, Henrik Bengtsson h...@biostat.ucsf.edu wrote: Hi, I've just created: newEnvEval - function(..., hash=FALSE, parent=parent.frame(), size=29L) {   envir - new.env(hash=hash, parent=parent, size

Re: [Rd] hook for when R quits

2011-03-11 Thread Henrik Bengtsson
See onSessionExit() in the R.utils package, e.g. onSessionExit(function(...) { cat(Bye bye world!\n); }) quit(); Please pay attention to the Details section of help(onSessionExit); there are ways that R can exit that will not be detected/handled. /Henrik On Fri, Mar 11, 2011 at 10:37 AM,

Re: [Rd] hook for when R quits

2011-03-11 Thread Henrik Bengtsson
On Fri, Mar 11, 2011 at 11:07 AM, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: On Fri, 11 Mar 2011, Duncan Murdoch wrote: On 11/03/2011 1:37 PM, Michael Lawrence wrote: Thanks for the suggestion, but I don't think that R finalizes all of its objects when it quits. At least a simple test

[Rd] Excited about the near future...

2011-03-12 Thread Henrik Bengtsson
Some already know, but I think it deserves a bit of a attention here as well: It looks like we're about to get new features in R that will be very powerful! That should be a good enough teaser for now... /Henrik PS ...and thanks for making it available plus credits to similar efforts by

[Rd] .libPaths() on Windows may return duplicated paths

2011-03-15 Thread Henrik Bengtsson
In R v2.12.2 patched (2011-03-13 r54787) and also in R v2.13.0 devel (2011-03-15 r54806), .libPaths() may return the multiple paths referring to the same normalized path name. Here is an example from Rterm --vanilla using R v2.12.2 patched: paths - .libPaths(c(C:/, C:\\)) paths [1] C:/ [2]

[Rd] R CMD build processes inst/doc/Makefile only if there are vignette files?

2011-03-30 Thread Henrik Bengtsson
Hi, in Section 'Writing package vignettes' of 'Writing R Extensions' it says: Whenever a Makefile is found, then R CMD build will try to run make after the Sweave runs, so PDF manuals can be created from arbitrary source formats (plain LaTeX files, ...). [...] Note that the make step is executed

Re: [Rd] Reading 64-bit integers

2011-03-30 Thread Henrik Bengtsson
On Wed, Mar 30, 2011 at 11:22 AM, Simon Urbanek simon.urba...@r-project.org wrote: Bill, thanks. I like that idea of the output parameter better, especially if we ever add different scalar vector types. Admittedly, what=integer() is the most useful case. What I was worried about is things

Re: [Rd] R CMD build now removes empty dirs

2011-03-30 Thread Henrik Bengtsson
I am also in favor for keeping the ability of installing directory structures that are partly empty. I've used it before to setup templates that can conveniently be copied recursively to a local path. I did noticed that R CMD INSTALL gave a warning about empty directories before (or was it a

Re: [Rd] Reading 64-bit integers

2011-03-30 Thread Henrik Bengtsson
On Wed, Mar 30, 2011 at 7:51 PM, Henrik Bengtsson h...@biostat.ucsf.edu wrote: On Wed, Mar 30, 2011 at 11:22 AM, Simon Urbanek simon.urba...@r-project.org wrote: Bill, thanks. I like that idea of the output parameter better, especially if we ever add different scalar vector types

[Rd] reg.finalizer(): Multiple finalizers?

2011-04-02 Thread Henrik Bengtsson
Hi, I've got some questions regarding finalizers registered using reg.finalizer(). I have a setup where in certain cases I wish to set a new finalizer to an object that already got one. Since there is no API for removing/replacing already registered finalizers (have been requested previously on

[Rd] Inconsistency: sort(NULL)/sort.int(NULL) does not throw an error, cf. order(NULL), sort.int(NULL, index.return=TRUE), ...

2011-04-03 Thread Henrik Bengtsson
Hi, while backtracking why sort(NULL) gives a warning, and acknowledging that NULL is not the same as an empty vector and sort(NULL) is bad coding, I discovered the following inconsistency of sort.int(): x - NULL sort(x) Warning in is.na(x) : is.na() applied to non-(list or vector) of type

Re: [Rd] Rtools questions

2011-04-05 Thread Henrik Bengtsson
On Tue, Apr 5, 2011 at 3:44 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 11-04-05 6:22 PM, Spencer Graves wrote: Hello:        1.  How can I tell when the development version of Rtools has changed? I don't make announcements of the changes, you just need to check the web site.  

Re: [Rd] R CMD check for 2.13 rc

2011-04-05 Thread Henrik Bengtsson
I think normalizePath() has been moved to 'base' very++ recently. /H On Tue, Apr 5, 2011 at 5:00 PM, Dario Strbenac d.strbe...@garvan.org.au wrote: Hi, I have a couple of new errors in our package when I check it on R 2.13-rc (r55310). The first one that's mystifying me is * checking R

Re: [Rd] Rtools questions

2011-04-06 Thread Henrik Bengtsson
On Wed, Apr 6, 2011 at 4:54 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 11-04-05 7:51 PM, Henrik Bengtsson wrote: On Tue, Apr 5, 2011 at 3:44 PM, Duncan Murdochmurdoch.dun...@gmail.com  wrote: On 11-04-05 6:22 PM, Spencer Graves wrote: Hello:         1.  How can I tell when

Re: [Rd] Signal handling / alarm timeouts

2011-04-12 Thread Henrik Bengtsson
On Tue, Apr 12, 2011 at 3:58 PM, Murray Stokely mur...@stokely.org wrote: What are the ramifications of setting up user signal handling to allow the use of e.g. alarm(2) to send a SIGALRM to the R process at some number of seconds in the future to e.g. interrupt a routine that is taking too

Re: [Rd] Excited about the near future...

2011-04-13 Thread Henrik Bengtsson
': http://dirk.eddelbuettel.com/blog/2011/04/12/ /Henrik PS. Stephen Milborrow's package 'jit' provides a just-in-time compiler iff used with his Ra build of R. It seems to be a discontinued project though. On Sat, Mar 12, 2011 at 9:45 PM, Henrik Bengtsson h...@biostat.ucsf.edu wrote: Some

[Rd] Milestone: 3000 packages on CRAN

2011-05-12 Thread Henrik Bengtsson
So, it's time again. Today (2011-05-12) on CRAN [1]: Currently, the CRAN package repository features 3000 available packages. Previous milestones: 2009-10-04: 2,000 packages [2] 2007-04-12: 1,000 packages [3] 2004-10-01:500 packages [4] 2003-04-01:250 packages [4] [1]

[Rd] Reproducible use case for R crash after updating R

2011-05-12 Thread Henrik Bengtsson
This might have been discussed before, but below is a not-so-unlikely use case where the user follows normal procedures, updates R to a major release version, and then R crashes: 1. Use runs R stable (e.g. v2.13.0). 2. User installs a package with a namespace, e.g. install.packages(fortunes). 3.

Re: [Rd] Reproducible use case for R crash after updating R

2011-05-12 Thread Henrik Bengtsson
On Thu, May 12, 2011 at 10:55 AM, Henrik Bengtsson h...@biostat.ucsf.edu wrote: This might have been discussed before, but below is a not-so-unlikely use case where the user follows normal procedures, updates R to a major release version, and then R crashes: 1. Use runs R stable (e.g

Re: [Rd] Reproducible use case for R crash after updating R

2011-05-16 Thread Henrik Bengtsson
-05-12 2:26 PM, Henrik Bengtsson wrote: On Thu, May 12, 2011 at 10:55 AM, Henrik Bengtssonh...@biostat.ucsf.edu  wrote: This might have been discussed before, but below is a not-so-unlikely use case where the user follows normal procedures, updates R to a major release version, and then R

Re: [Rd] Best practices for writing R functions (really copying)

2011-07-25 Thread Henrik Bengtsson
Use tracemem() instead, i.e. A - matrix(c(1.0,1.1), nrow=5, ncol=10); tracemem(A); [1] 0x047ab170 A[1,1] - 7; B - sqrt(A); tracemem[0x047ab170 - 0x0552f338]: A[1,1] - 7; B - t(A); A[1,1] - 7; tracemem[0x047ab170 - 0x057ba588]: A[1,1] - 7; A[1,1] -

  1   2   3   4   5   6   7   8   9   10   >