Re: [Rd] Front ends handling help.search() results?

2011-07-31 Thread Henrik Bengtsson
The R.rsp package has a proof of concept page: 1. library(R.rsp) 2. browseRsp(path=/R/help/) 3. At the bottom, there is a help.search form. Type in search term, e.g. svd. This is all web browser based, so it should be able to handle compiled vignettes (as long as there are valid paths/URL

[Rd] http://cran.r-project.org/src/base/NEWS.html points to R v2.13.0

2011-08-29 Thread Henrik Bengtsson
FYI, http://cran.r-project.org/src/base/NEWS.html [May 18, 2011] is for R v2.13.0 whereas http://cran.r-project.org/src/base/NEWS [July 8, 2011] is for R v2.13.1. The former is linked to on a few places on http://cran.r-project.org/. /Henrik __

Re: [Rd] Revision of shell.exec?

2011-09-14 Thread Henrik Bengtsson
On Wed, Sep 14, 2011 at 8:35 AM, Simon Urbanek simon.urba...@r-project.org wrote: On Sep 14, 2011, at 11:08 AM, Brian Oney wrote: Hi Steve, a quick look at browseURL will tell you that indeed system or shell.exec (on a windows platform) is used to open up a URL. The open part of the

[Rd] file.info(path) inconsistent with file.exists(path) when path == C:/

2011-09-18 Thread Henrik Bengtsson
Hi, on Windows 7 (tested on NTFS file system) and R-devel: 1. file.info(C:/) gives NAs whilst file.exists(C:/) gives TRUE. Instead you have to do file.info(C:/.). 2. Any number of dots will do, e.g. identical(file.info(C:/.), file.info(C:/.)) == TRUE DETAILS: # C:/ = DISCREPANCY

Re: [Rd] R CMD check file issues

2011-09-22 Thread Henrik Bengtsson
I'm on Windows 7 (64-bit) and everything works perfectly. Obviously, there is either another process locking down a file with the same name or the directory doesn't exist at the time of the file() call. Now to the most important question ...what's your sessionInfo()? /Henrik On Thu, Sep 22,

Re: [Rd] R CMD check file issues

2011-09-25 Thread Henrik Bengtsson
...@gmail.com] On Behalf Of Henrik Bengtsson Sent: donderdag 22 september 2011 17:59 To: Duncan Murdoch Cc: Nick Sabbe; r-devel@r-project.org Subject: Re: [Rd] R CMD check file issues I'm on Windows 7 (64-bit) and everything works perfectly.  Obviously, there is either another process locking

Re: [Rd] grep and PCRE fun

2011-09-29 Thread Henrik Bengtsson
On Thu, Sep 29, 2011 at 2:00 PM, Jeffrey Horner jeffrey.hor...@gmail.com wrote: Hello, I think I've found a bug in the C function do_grep located in src/main/grep.c. It seems to affect both the latest revisions of R-2-13-branch and trunk when compiling R without optimizations and with it's

[Rd] socketConnection() + Ctrl-C + closeAllConnections() = core dump

2009-05-30 Thread Henrik Bengtsson
Doing the following in R v2.9.0 on Windows Vista core dumps R: 0. Rterm --vanilla 1. con - socketConnection(port=6011); 2. User interrupt, i.e. Ctrl-C 3. closeAllConnections(); R crashes immediately after calling that last command. sessionInfo(): R version 2.9.0 Patched (2009-05-28 r48680)

Re: [Rd] formal argument envir matched by multiple actual arguments

2009-06-02 Thread Henrik Bengtsson
Hi. 2009/6/1 Hervé Pagès hpa...@fhcrc.org: Hi list, This looks similar to the problem reported here  https://stat.ethz.ch/pipermail/r-devel/2006-April/037199.html by Henrik Bengtsson a long time ago. It is very sporadic and non-reproducible. Henrik, do you remember if your code was using

Re: [Rd] formal argument envir matched by multiple actual arguments

2009-06-02 Thread Henrik Bengtsson
Nice case - I think you're onto something. /Henrik 2009/6/2 hpa...@fhcrc.org: In fact reg.finalizer() looks like a dangerous feature. If the finalizer itself triggers (implicitely or explicitely) garbage collection, then bad things happen. In the following example, garbage collection is

[Rd] function(x, dim=dim(x)) { str(dim) } = recursive default argument reference

2009-06-03 Thread Henrik Bengtsson
Is the following a bug? Rterm -vanilla foo - function(x, dim=dim(x)) { str(dim) } foo(1:2) Error in str(dim) : promise already under evaluation: recursive default argument reference or earlier problems? foo(x=1:2) Error in str(dim) : promise already under evaluation: recursive default

Re: [Rd] function(x, dim=dim(x)) { str(dim) } = recursive default argument reference

2009-06-03 Thread Henrik Bengtsson
My bad: http://tolstoy.newcastle.edu.au/R/e2/help/07/09/25387.html /Henrik On Wed, Jun 3, 2009 at 5:07 PM, Henrik Bengtsson h...@stat.berkeley.edu wrote: Is the following a bug? Rterm -vanilla foo - function(x, dim=dim(x)) { str(dim) } foo(1:2) Error in str(dim) :  promise already under

[Rd] CRAN build/checks: Dependencies on non-CRAN packages?

2009-06-07 Thread Henrik Bengtsson
Hi, how is the CRAN build/check system dealing with dependencies on non-CRAN packages? Are there external repositories that are dealt with in special ways, e.g. Bioconductor and Omegahat? Is this documented somewhere? The most recent note on this that I could locate is [Rd] CRAN, Bioconductor

[Rd] Suggestion: Dimension-sensitive attributes

2009-06-07 Thread Henrik Bengtsson
Hi, maybe this has been suggested before, but would it be possible, without not breaking too much existing code, to add other dimension vector attributes in addition to 'dimnames'? These attributes would then be subsetted just like dimnames. Something like this: x - array(1:30, dim=c(2,3,5))

Re: [Rd] CRAN build/checks: Dependencies on non-CRAN packages?

2009-06-08 Thread Henrik Bengtsson
On Sun, Jun 7, 2009 at 11:49 PM, Kurt Hornikkurt.hor...@wu.ac.at wrote: Henrik Bengtsson writes: Hi, how is the CRAN build/check system dealing with dependencies on non-CRAN packages?  Are there external repositories that are dealt with in special ways, e.g. Bioconductor and Omegahat

Re: [Rd] CRAN build/checks: Dependencies on non-CRAN packages?

2009-06-08 Thread Henrik Bengtsson
On Mon, Jun 8, 2009 at 12:29 AM, Kurt Hornikkurt.hor...@wu.ac.at wrote: Henrik Bengtsson writes: On Sun, Jun 7, 2009 at 11:49 PM, Kurt Hornikkurt.hor...@wu.ac.at wrote: Henrik Bengtsson writes: Hi, how is the CRAN build/check system dealing with dependencies on non-CRAN packages

Re: [Rd] CRAN build/checks: Dependencies on non-CRAN packages?

2009-06-08 Thread Henrik Bengtsson
Thank you all for these clarifications and for all your great contributions to this project (can't be said too many times)! /Henrik On Mon, Jun 8, 2009 at 2:17 AM, Prof Brian Ripleyrip...@stats.ox.ac.uk wrote: On Mon, 8 Jun 2009, Kurt Hornik wrote: Henrik Bengtsson writes: Hi, how

[Rd] Flag '#' in sprintf() format string %#x?

2009-06-20 Thread Henrik Bengtsson
Hi, this is a bit of FYI, but also a question. Is flag '#' in sprintf() format string %#x fully supported across platforms? Can that be assumed? I discovered thanks to the r-forge service, that this was not the case for OSX with R version 2.9.0 Under development (unstable) (2009-01-13 r47593),

Re: [Rd] V2.9.0 changes [Sec=Unclassified]

2009-06-24 Thread Henrik Bengtsson
On Wed, Jun 24, 2009 at 4:27 AM, Martin Maechlermaech...@stat.math.ethz.ch wrote: TR == Troy Robertson troy.robert...@aad.gov.au     on Wed, 24 Jun 2009 16:35:29 +1000 writes:    TR Yes, I had looked at R.oo, S4 and proto before beginning coding. I had initially assumed that S4 was an

Re: [Rd] Conditional dependency between packages

2009-07-02 Thread Henrik Bengtsson
if (pkg1 %in% rownames(utils:::installed.packages()) ) { library(pkg1) ... } can be replaced by: if (require(pkg1)) { ... } /Henrik On Thu, Jul 2, 2009 at 5:29 AM, Jon Olav Skoienj.sko...@geo.uu.nl wrote: Hi Seth, And thanks for your suggestion! I was not able to do exactly what you

[Rd] reg.finalizer(..., add=FALSE)?

2009-07-07 Thread Henrik Bengtsson
Is it possible to (i) clear or (ii) override already registered finalizer functions, e.g. reg.finalizer(e, f, add=FALSE) cf. on.exit(..., add=FALSE)? Currently: env - new.env() reg.finalizer(env, function(...) cat(Finalizer A!\n)) NULL reg.finalizer(env, function(...) cat(Finalizer B!\n))

Re: [Rd] Rcmd check fails on Windows Samba network path in R 2.9.1

2009-07-22 Thread Henrik Bengtsson
See r-devel thread '[Rd] file.access() on network (mounted) drive on Windows Vista' on Nov 26, 2008: http://tolstoy.newcastle.edu.au/R/e5/devel/08/11/0806.html where it was concluded that file.access() is not 100%, e.g. file.access() and file.info() can give different answers. I added

Re: [Rd] Package names

2009-09-03 Thread Henrik Bengtsson
2009/9/3 Uwe Ligges lig...@statistik.tu-dortmund.de: Hadley Wickham wrote: Currently, writing R extensions states: The ‘Package’ and ‘Version’ fields give the name and the version of the package, respectively. The name should consist of letters, numbers, and the dot character and start

[Rd] Suggestion: Allow packages to add additional information to sessionInfo()

2009-09-03 Thread Henrik Bengtsson
Hi, sessionInfo() has been proven really useful, but you still often have to ask for additional information in order to help troubleshooting. For instance, for troubleshooting the aroma.affymetrix, it is very helpful to know what the current working directory is, for other packages certain system

Re: [Rd] Suggestion: Allow packages to add additional information to sessionInfo()

2009-09-03 Thread Henrik Bengtsson
On Thu, Sep 3, 2009 at 10:16 AM, Gabor Grothendieckggrothendi...@gmail.com wrote: The danger is that it could introduce bugs into the process of reporting bugs. If you mean that sessionInfo() will result in an error, that is easily solved by a tryCatch() statement. Timeouts are harder. One

Re: [Rd] Suggestion: Allow packages to add additional information to sessionInfo()

2009-09-03 Thread Henrik Bengtsson
create a package within which they make sessionInfo into a generic and cause things to break through the S4 class mechanism...)   Kevin Henrik Bengtsson wrote: On Thu, Sep 3, 2009 at 10:16 AM, Gabor Grothendieckggrothendi...@gmail.com wrote: The danger is that it could introduce bugs

[Rd] R v2.9.2 patched still referred to as RC

2009-09-06 Thread Henrik Bengtsson
R v2.9.2 patched is still referred to as RC: http://cran.r-project.org/bin/windows/base/rpatched.html Since v2.9.2 is already out, this should be 'pat', correct? /Henrik __ R-devel@r-project.org mailing list

[Rd] R v2.10.0: Doc clarification for cross references and where are we heading?

2009-09-23 Thread Henrik Bengtsson
Hi, in 'Writing R Extensions of R v2.10.0, under Section 'Cross-references' (2009-09-07) it says: 1. The markup \link{foo} (usually in the combination \code{\link{foo}}) produces a hyperlink to the help for foo. Here foo is a topic, that is the argument of \alias markup in another Rd file

[Rd] Named backreference in gsub()?

2009-10-03 Thread Henrik Bengtsson
Hi, I'm running out of the *numbered* backreferences \\1, \\2, ..., \\9 for gsub(). Does R support *named* backreferences, and if so, what is the syntax? Thanks Henrik __ R-devel@r-project.org mailing list

[Rd] Milestone: 2000 packages on CRAN

2009-10-05 Thread Henrik Bengtsson
Today, 2009-10-04, from http://cran.r-project.org/web/packages/ Currently, the CRAN package repository features 1997 objects including 1993 packages and 4 bundles containing 15 packages, for a total of 2008 available packages. It was 1.5 years ago (2007-04-12) we were at 1000 packages, cf.

Re: [Rd] Specifying (set of random) port numbers for the help HTML server (Was: Re: Fixing html help port in 2.10)

2009-10-16 Thread Henrik Bengtsson
On Fri, Oct 16, 2009 at 7:54 AM, Duncan Murdoch murd...@stats.uwo.ca wrote: On 10/16/2009 10:39 AM, Dieter Menne wrote: I noted that the new html-help in 2.10 under Windows uses a random port on my computer. This cause a problem, because when I create a link such as:

[Rd] R v2.11.0: HTML package index broken(?)

2009-10-17 Thread Henrik Bengtsson
Hi, in R v2.11.0 (2009-10-15 r50085) on Windows Vista the package index and its links for the package installed in the user-specific library path are all broken, e.g. In http://127.0.0.1:28251/doc/html/packages.html I get: Packages in C:\Users\hb\R\win-library\2.11

Re: [Rd] Specifying (set of random) port numbers for the help HTML server (Was: Re: Fixing html help port in 2.10)

2009-10-18 Thread Henrik Bengtsson
On Sun, Oct 18, 2009 at 7:57 AM, Duncan Murdoch murd...@stats.uwo.ca wrote: On 17/10/2009 12:08 AM, Henrik Bengtsson wrote: On Fri, Oct 16, 2009 at 7:54 AM, Duncan Murdoch murd...@stats.uwo.ca wrote: On 10/16/2009 10:39 AM, Dieter Menne wrote: I noted that the new html-help in 2.10 under

[Rd] Suggestion for exception handling: More informative error message for no applicable method... (S3)

2009-10-20 Thread Henrik Bengtsson
I'd like to suggest that whenever there is no S3 method implementation available for a particular class, that the error message would also report the class structure of the object dispatched on. Example: foo - function(...) UseMethod(foo) foo.ClassA - function(object, ...) { cat(foo() for ClassA

[Rd] Typo in help(parse_Rd, package=tools)

2009-10-26 Thread Henrik Bengtsson
Under See Also in help(parse_Rd, package=tools) it says: Rd2HTML for the converters that use the output of parseRd. Should be parse_Rd not parseRd. sessionInfo() R version 2.10.0 Patched (2009-10-26 r50212) i386-pc-mingw32 locale: [1] LC_COLLATE=English_United States.1252 [2]

[Rd] help.start() only recognizes forward slashes in R_LIBS_USER which is not the default case

2009-10-26 Thread Henrik Bengtsson
I've found that the HTML help system started via help.start() requires all forward slashes in R_LIBS_USER otherwise the Packages page is corrupt/non-working. Note that by default R_LIBS_USER is set by R on startup. Example 1: With R_LIBS_USER=C:/Users/JohnDoe/R/win-library/2.10 help.start()

Re: [Rd] Suggestion for exception handling: More informative error message for no applicable method... (S3)

2009-10-30 Thread Henrik Bengtsson
] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base /Henrik On Tue, Oct 20, 2009 at 12:44 PM, Henrik Bengtsson h

Re: [Rd] weighted.mean uses zero when na.rm=TRUE (PR#14032)

2009-10-31 Thread Henrik Bengtsson
Here some redundancy tests that may be useful (I use similar ones for aroma.light::weightedMedian): n - 10 x - 1:n # No weights m1 - mean(x) m2 - weighted.mean(x) stopifnot(all.equal(m1, m2)) # Equal weights on different scales w1 - rep(1, n) m1 - weighted.mean(x, w1) w2 - rep(100, n) m2 -

Re: [Rd] parse_Rd and/or lazyload problem

2009-11-01 Thread Henrik Bengtsson
If of any help, I got a related error message in my browser (Firefox), from doing this: 1. In .Rprofile I set options(help.ports=6850) 2. I have one R HELP session running where I do help.start() so that I always have one session providing the help pages. This is to avoid having to redo

[Rd] Wishlist: Downgrade missing Rd links to NOTEs for non-installed Suggested packages

2009-11-03 Thread Henrik Bengtsson
Hi, I wish to suggest that Rd cross references to help sections in Suggested packages that are not installed should be reported as NOTE:s and not WARNING:s by R CMD check. This should only apply to packages under Suggests: in DESCRIPTION. RATIONALE: 1. One reason for putting a package under

Re: [Rd] typo in docs for unlink()

2009-11-11 Thread Henrik Bengtsson
On Wed, Nov 11, 2009 at 11:36 AM, Duncan Murdoch murd...@stats.uwo.ca wrote: On 10/11/2009 11:16 PM, Tony Plate wrote: PS, I should have said that I'm reading the docs for unlink in R-2.10.0 on a Linux system.  The docs that appear in a Windows installation of R are different (the Windows

Re: [Rd] typo in docs for unlink()

2009-11-11 Thread Henrik Bengtsson
On Wed, Nov 11, 2009 at 12:55 PM, Duncan Murdoch murd...@stats.uwo.ca wrote: Henrik Bengtsson wrote: On Wed, Nov 11, 2009 at 11:36 AM, Duncan Murdoch murd...@stats.uwo.ca wrote: On 10/11/2009 11:16 PM, Tony Plate wrote: PS, I should have said that I'm reading the docs for unlink in R

Re: [Rd] Clarification on generic functions and methods

2009-11-11 Thread Henrik Bengtsson
Using jml - function(...) UseMethod(jml) will do. /Henrik On Wed, Nov 11, 2009 at 4:26 PM, Doran, Harold hdo...@air.org wrote: I have constructed the following functions and need a little clarification: ### function to fit the model parameters jml.fit - function(dat, con = 1e-3,

Re: [Rd] Help in 2.10 lost its Find feature

2009-11-11 Thread Henrik Bengtsson
For the text based help, there is no search feature on Windows, e.g. options(help_type=text); help(readLines); but if you use the HTML-based help, you can use the browser's search features as suggested/wanted: options(help_type=html); help(readLines); /Henrik On Wed, Nov 11, 2009 at 5:40 PM,

[Rd] Suggestion: Add links to NEWS and CHANGES on help.start() page

2009-11-13 Thread Henrik Bengtsson
Hi, right now it is actually a bit tricky to locate and view the NEWS and the CHANGES files, especially if you are a beginning and don't even know that you are supposed to look for them. I'd like to recommend that links to (local) NEWS and CHANGES are added to the help.start() overview pages.

Re: [Rd] The default behaviour of a missing entry in an environment

2009-11-13 Thread Henrik Bengtsson
If you develop your own code you can add your own behavior by extending the environment class. I put extending in quotation marks, because 'environment' is one of few classes you should *not* extend from in the regular S3 (and S4?) sense, at least that was the case a few years ago. You can

Re: [Rd] Suggestion: Add links to NEWS and CHANGES on help.start() page

2009-11-16 Thread Henrik Bengtsson
there. The structure is in place for displaying package news, but it doesn't display yet.  I think Kurt Hornik is working on the actual display. Duncan Murdoch On Fri, Nov 13, 2009 at 3:37 AM, Henrik Bengtsson h...@stat.berkeley.edu wrote: Hi, right now it is actually a bit tricky to locate

[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

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

[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

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

[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

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

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

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

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

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

[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

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] In memory caching algorithm

2006-08-12 Thread Henrik Bengtsson
Hi, quite a few times I have ran into problems where I would like to read data from a data source too huge to keep in memory. Not only this, but retrieving the data from that source is a bit slow. I wish to work with only small chunks of the data in memory at any time. Now, sometimes the same

[Rd] Data frames and row names

2006-08-14 Thread Henrik Bengtsson
In R-devel v2.4.0 NEWS: o The 'row.names' of a data frame may be stored internally as an integer or character vector. This can result in considerably more compact storage (and more logical row names from rbind) when the row.names are 1:nrow(x). However, such data

Re: [Rd] Data frames and row names

2006-08-15 Thread Henrik Bengtsson
On 8/14/06, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Mon, 14 Aug 2006, Henrik Bengtsson wrote: In R-devel v2.4.0 NEWS: o The 'row.names' of a data frame may be stored internally as an integer or character vector. This can result in considerably more compact

[Rd] Suggestion: seek(..., rw=last) instead of seek(..., rw=)

2006-08-19 Thread Henrik Bengtsson
Hi. In seek() the 'rw' argument takes three possible values, i.e. (empty), read, or write (partial matches allowed). I was bitten by the meaning of when I in a loop used seek(con, where=w) followed by a seek(con, where=w, rw=write). I know that everything is (magically) in the help (?seek)

Re: [Rd] S4 Methods dispatch

2006-08-30 Thread Henrik Bengtsson
[Cross-posting to BioC-devel to] Thank you for this. The changes are internal but extensive. All packages that use S4 methods and classes need to be reinstalled from source to use the new version. Is there an easy way to detect if a package is using S4 or not? If so, I could scan my

Re: [Rd] S4 Methods dispatch

2006-08-30 Thread Henrik Bengtsson
On 8/30/06, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Wed, 30 Aug 2006, Henrik Bengtsson wrote: [Cross-posting to BioC-devel to] Thank you for this. The changes are internal but extensive. All packages that use S4 methods and classes need to be reinstalled from source to use

Re: [Rd] Unexpected source() behavior in R-devel

2006-09-03 Thread Henrik Bengtsson
This has been reported before on r-devel, e.g. May 9, 2006 [Rd] Seg fault when installing package from bad repository. It's happening on Mac OSX when trying to download non-existing webpages (HTTP status 404). That's all I know (not using OSX myself). /Henrik On 03 Sep 2006 23:06:01 +0200,

Re: [Rd] Unexpected source() behavior in R-devel

2006-09-03 Thread Henrik Bengtsson
On 9/4/06, Sean Davis [EMAIL PROTECTED] wrote: Seth Falcon wrote: Peter Dalgaard [EMAIL PROTECTED] writes: Henrik Bengtsson [EMAIL PROTECTED] writes: This has been reported before on r-devel, e.g. May 9, 2006 [Rd] Seg fault when installing package from bad repository. It's

[Rd] example(..., ask=getOption(example.ask))

2006-09-13 Thread Henrik Bengtsson
Hi, I wish to return to the topic [Rd] example(ask = .) - default ? discussed in R-devel on May 1, 2006, because I think it is related to my problem. In one of my Rd examples I generate multiple (20-30!) PNG files using png()/dev.off(). I noticed that I get a Hit Return to see next plot: for

Re: [Rd] wishlist --- menu entry [Rgui] misc --- stop current computation

2006-09-19 Thread Henrik Bengtsson
On 9/19/06, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Tue, 19 Sep 2006, Kjetil Halvorsen wrote: This is from R-2.4.0alpha on windows XP, downloaded from CRAN yesterday. I did update.packages(destdir= ..., ask=FALSE,checkBuilt=TRUE) which took quite a long time (as.expected). When

Re: [Rd] R CMD check and x11?

2006-09-25 Thread Henrik Bengtsson
You can close the x11() device using dev.off() in your example. You may also want to look at interactive() so you can test in your example is the code is run interactively or not; the latter is the case for R CMD check. /H On 9/25/06, Dominick Samperi [EMAIL PROTECTED] wrote: One of my demos

Re: [Rd] S4 accessors

2006-09-27 Thread Henrik Bengtsson
On 9/27/06, John Chambers [EMAIL PROTECTED] wrote: There is a point that needs to be remembered in discussions of accessor functions (and more generally). We're working with a class/method mechanism in a _functional_ language. Simple analogies made from class-based languages such as Java are

Re: [Rd] documenation duplication and proposed automatic tools

2006-10-02 Thread Henrik Bengtsson
Hi. Far from complete, but some sketches on a solution is in the Rdoc-to-Rd translator of the R.oo package. I, the author, never made this very public because it uses a very ugly parser etc for it, but the basics is there and I use it to generate \usage{} statements and class hierarchies

[Rd] exists(..., inherits) get(..., inherits)

2006-10-04 Thread Henrik Bengtsson
Hi, are there corresponding methods to exists() and get() where one can stratify on class, e.g. exists(..., inherits) instead of exists(..., mode)? Thanks Henrik __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Extreme slowdown with named vectors. A bug?

2006-10-06 Thread Henrik Bengtsson
Tried the following with R --vanilla on the Rv2.4.0 release (see details at the end). I think the script and its comments speaks for itself, but the outcome is certainly not wanted. for (n in 58950:58970) { cat(n=, n, \n, sep=); # Clean up first rm(names, x, y); gc(); # Create a named

Re: [Rd] Extreme slowdown with named vectors. A bug?

2006-10-07 Thread Henrik Bengtsson
Thank *you* for identifying the source of the problem and fixing. :) /Henrik On 10/6/06, Duncan Murdoch [EMAIL PROTECTED] wrote: On 10/6/2006 6:20 PM, Henrik Bengtsson wrote: Tried the following with R --vanilla on the Rv2.4.0 release (see details at the end). I think the script and its

[Rd] Error: invalid multibyte string

2006-10-25 Thread Henrik Bengtsson
I'm observing the following on different platforms: parse(text='\\x7F') expression(\177) parse(text='\\x80') Error: invalid multibyte string ... parse(text='\\xFF') Error: invalid multibyte string However, cat(\x7F\n\x80\n...\xFF\n) works. Using R --vanilla. SYSTEMS GIVING THE ERROR:

Re: [Rd] Error: invalid multibyte string

2006-10-26 Thread Henrik Bengtsson
[EMAIL PROTECTED] wrote: Thomas Lumley [EMAIL PROTECTED] writes: On Thu, 26 Oct 2006, Henrik Bengtsson wrote: I'm observing the following on different platforms: parse(text='\\x7F') expression(\177) parse(text='\\x80') Error: invalid multibyte string Yes. It's an invalid

Re: [Rd] Error: invalid multibyte string

2006-10-27 Thread Henrik Bengtsson
On 10/28/06, Thomas Lumley [EMAIL PROTECTED] wrote: On Fri, 27 Oct 2006, Henrik Bengtsson wrote: In Section Package subdirectories in Writing R Extensions [2.4.0 (2006-10-10)] it says: Only ASCII characters (and the control characters tab, formfeed, LF and CR) should be used in code

Re: [Rd] Error: invalid multibyte string

2006-10-29 Thread Henrik Bengtsson
On 10/28/06, Henrik Bengtsson [EMAIL PROTECTED] wrote: On 10/28/06, Thomas Lumley [EMAIL PROTECTED] wrote: On Fri, 27 Oct 2006, Henrik Bengtsson wrote: In Section Package subdirectories in Writing R Extensions [2.4.0 (2006-10-10)] it says: Only ASCII characters (and the control

Re: [Rd] [R] Problem with file size

2006-11-13 Thread Henrik Bengtsson
[Moved to r-devel for further discussion, bcc:ed r-help for the record] Hi Benilton, it is possible that this has to do with so called unevaluated promises. I had a similar problem a few months ago. I emailed R-devel about it - [Rd] save() saves extra stuff if object is not evaluated (Thu May

Re: [Rd] caching frequently used values

2006-12-13 Thread Henrik Bengtsson
I use the R.oo Object class for what has been suggested previously. The Object class can be thought of as utility wrapper class for environments (actually environments gained much of its behavior some time ago when $ etc was being mapped to get() calls). For caching to file, take a look at the

Re: [Rd] Which programming paradigm is the most used for make R packages?

2007-01-03 Thread Henrik Bengtsson
On 1/4/07, Ross Boylan [EMAIL PROTECTED] wrote: On Wed, Jan 03, 2007 at 11:46:16AM -0600, Ricardo Rios wrote: Hi wizards, does somebody know Which programming paradigm is the most used for make R packages ? Thanks in advance. You need to explain what you mean by the question, for example

Re: [Rd] on.exit called on loading ?

2007-01-16 Thread Henrik Bengtsson
on.exit() applies to the function where it was called, i.e. closeSomeServices() is called when .onLoad() exits, or whatever function it is defined in. You're looking for .onUnload(). Make sure to read the help for details. Cheers Henrik On 1/17/07, Dirk Eddelbuettel [EMAIL PROTECTED] wrote:

Re: [Rd] file.copy

2007-01-16 Thread Henrik Bengtsson
FYI: I reported this to r-devel on July 23, 2006: http://tolstoy.newcastle.edu.au/R/devel/06/07/6220.html There was no follow up. /Henrik On 1/17/07, Herve Pages [EMAIL PROTECTED] wrote: Hi, Copying a non-existing file with file.copy creates an empty file r -

Re: [Rd] Inferring dimensions on bitmap device from par()

2007-01-26 Thread Henrik Bengtsson
to be your keeper. That is one of the answers I expected and wanted to hear given that it was the case. /Henrik On Thu, 25 Jan 2007, Henrik Bengtsson wrote: Hi, I am trying to infer the dimension of an opened bitmap (png, jpeg, bitmap device...) from par() parmeters. From the help

[Rd] Reordering the search path?

2007-03-06 Thread Henrik Bengtsson
Hi, without arguing for doing it or not, is the following a correct way to reorder the search path: moveInSearchPath - function(from, to) { # Excluding validation of 'from' and 'to' here etc. # Get enviroment to be moved env - pos.to.env(from); # Detach old position without side

[Rd] Small inconsistency in serialize() between R versions and implications on digest()

2007-03-07 Thread Henrik Bengtsson
Hi, I noticed that serialize() gives different results depending on R version, which has implications to the digest() function in the digest package. Note, it does give the same output across platforms. I know that serialize() is under development, but is this expected, e.g. is there some kind

Re: [Rd] Small inconsistency in serialize() between R versions and implications on digest()

2007-03-07 Thread Henrik Bengtsson
for consistency between R version without loosing data dependent bytes. Thanks /Henrik On 3/7/07, Henrik Bengtsson [EMAIL PROTECTED] wrote: Hi, I noticed that serialize() gives different results depending on R version, which has implications to the digest() function in the digest package. Note, it does

<    1   2   3   4   5   6   7   8   9   10   >