[Rd] RCMD CHECK and non-methods

2010-08-24 Thread Mark.Bravington
I recently moved a function 'subset.with.warning' into the 'mvbutils' package (a version not yet on CRAN). When I tried RCMD CHECK, I got this warning: * checking S3 generic/method consistency ... WARNING subset: function(x, ...) subset.with.warning: fu

[Rd] Correction to section 1.1.2 of R Internals doc, on NAMED

2010-08-24 Thread Radford Neal
I think the explanation of the NAMED field in the R Internals document is incorrect. In Section 1.1.2, it says: The named field is set and accessed by the SET_NAMED and NAMED macros, and take values 0, 1 and 2. R has a `call by value' illusion, so an assignment like b <- a ap

Re: [Rd] require is to suggests as what is to imports?

2010-08-24 Thread Henrik Bengtsson
isPackageInstalled <- function(package, ...) { path <- system.file(package=package); (path != ""); } taken from R.utils (which also has a isPackageLoaded()). /Henrik On Tue, Aug 24, 2010 at 1:51 PM, Dirk Eddelbuettel wrote: > > On 24 August 2010 at 15:40, Hadley Wickham wrote: > | Hi all, >

Re: [Rd] require is to suggests as what is to imports?

2010-08-24 Thread Dirk Eddelbuettel
On 24 August 2010 at 15:40, Hadley Wickham wrote: | Hi all, | | If a package suggests another package in its description, you can | check it at runtime with requires. How do you do check if a package | is available without loading it, if you only want to access one | function in the package name

Re: [Rd] require is to suggests as what is to imports?

2010-08-24 Thread Prof Brian Ripley
On Tue, 24 Aug 2010, Hadley Wickham wrote: Hi all, If a package suggests another package in its description, you can check it at runtime with requires. How do you do check if a package Well, not really as requires() can give an error, at least until 2.12.0 is out. So you need to wrap it in

[Rd] require is to suggests as what is to imports?

2010-08-24 Thread Hadley Wickham
Hi all, If a package suggests another package in its description, you can check it at runtime with requires. How do you do check if a package is available without loading it, if you only want to access one function in the package namespace. Thanks, Hadley -- Assistant Professor / Dobelman Fam

[Rd] save() object w/o all of the loaded environment

2010-08-24 Thread Roebuck,Paul L
I have two packages, one that does the actual work (SC) and the other a Tcl/Tk UI (SCUI) that invokes methods within the former. Within the SCUI's invocation method, I save an object returned from SC, the results of a long-running method. Now the object is completely described by the SC package. U

Re: [Rd] small syntax suggestion

2010-08-24 Thread Greg Snow
In the mean time you could have student run the following code each time (put it into .Rprofile or something) until they learn good coding practices: testfunc <- function(expr, value, ok, visible) { tmp <- deparse(expr) if( grepl( '<- *[0-9.]+ *[])&|]', tmp ) ) { w

Re: [Rd] including DLL in a package

2010-08-24 Thread Sharpie
loosmart wrote: > > Good afternoon! > > It may seem trivial to some/most of You, but I found it difficult to > properly include a C++-based .dll into a package that I want to build for > usage in R. I read through the "Writing R extensions..." & "R > administration ..." instructions, but it se

Re: [Rd] No RTFM?

2010-08-24 Thread Barry Rowlingson
On Tue, Aug 24, 2010 at 3:28 PM, Michael Dewey wrote: > The thing I find most rude on the list is not the occasional abrupt postings > by people who are obviously having a bad day but the number of fairly long > exchanges which end unresolved as the OP never bothers to post a conclusion > and we

Re: [Rd] How do you make a formal "feature" request?

2010-08-24 Thread Greg Snow
I can claim some responsibility for 3 sets of functions that are in "core R", well they are in packages, but then so is the plot function, but packages that are loaded automatically in a default installation of R. My piece of the responsibility is probably more the blame than credit (the credit

Re: [Rd] small syntax suggestion

2010-08-24 Thread Barry Rowlingson
On Tue, Aug 24, 2010 at 4:18 PM, Ted Harding wrote: > So, on those grounds, I doubt its wisdom (and would prefer > giving the advice to bracket things, as in "x<(-3)". It's > a potential syntactic trap, but it's only one of many which > can be avoided in similar ways, and I think it's better to >

Re: [Rd] small syntax suggestion

2010-08-24 Thread Ted Harding
On 24-Aug-10 14:42:11, Davor Cubranic wrote: > On August 23, 2010 01:27:24 pm Philippe Grosjean wrote: >> They have to write such a code like this: >> >> if (x < -3) do_something >> >> That way, there is no ambiguity. Don't you think it's important to >> write clear code, including by using space

Re: [Rd] small syntax suggestion

2010-08-24 Thread ivo welch
hi ted, philippe, and others---I agree with everything you write about good coding practice.none of us would be writing x<-3, even when we want to assign 3. we know better. we would at least use a space, if not a paren. alas, my suggestion is not so much for you. It is trying to spare novi

Re: [Rd] small syntax suggestion

2010-08-24 Thread Davor Cubranic
On August 23, 2010 01:27:24 pm Philippe Grosjean wrote: > They have to write such a code like this: > > if (x < -3) do_something > > That way, there is no ambiguity. Don't you think it's important to > write clear code, including by using spaces where it makes it easier > to read,... and less amb

Re: [Rd] No RTFM?

2010-08-24 Thread Michael Dewey
At 01:08 20/08/2010, Spencer Graves wrote: What do you think about adding a "No RTFM" policy to the R mailing lists? Per, "http://en.wikipedia.org/wiki/RTFM": Spencer, You raise an interesting point but the responses to your post remind us that people (and indeed whole cultures) are not all

[Rd] R forge : svn + ssh without key

2010-08-24 Thread christophe.genolini
Hi the list, I am trying to use R forge. I created an account. I put my project on R forge. I installed TortoiseSVN on my computer (windows). Then I did not manage to go through all the key process but I see in the R-Forge Manual that there is another option: "2. it is sufficient to use pass

Re: [Rd] Speeding up matrix multiplies

2010-08-24 Thread Dirk Eddelbuettel
On 24 August 2010 at 09:13, Göran Broström wrote: | | On 2010-08-24 05:37, Kasper Daniel Hansen wrote: | > On Mon, Aug 23, 2010 at 10:39 PM, Radford Neal wrote: | >>> On Aug 23, 2010, at 7:39 PM, Radford Neal wrote: | >> | In particular, all matrix x vector and vector x matrix products wil

Re: [Rd] Speeding up matrix multiplies

2010-08-24 Thread Göran Broström
On 2010-08-24 05:37, Kasper Daniel Hansen wrote: On Mon, Aug 23, 2010 at 10:39 PM, Radford Neal wrote: On Aug 23, 2010, at 7:39 PM, Radford Neal wrote: In particular, all matrix x vector and vector x matrix products will in this version be done in the matprod routine, not the Fortran routi