[Rd] R6 "classname" and generator name

2024-03-11 Thread Barry Rowlingson
I'm writing some code that does a bit of introspection of R6 classes and am wondering about the "classname" parameter. Its the first parameter to the "R6Class" class generator generator function, and the few examples I've looked at on CRAN set it the same as the name of the generator function, for

Re: [Rd] [External] Re: capture "->"

2024-03-04 Thread Barry Rowlingson
It seems like you want to use -> and <- as arrows with different meanings to "A gets the value of B" in your package, as a means of writing expressions in your package language. Another possibility would be to use different symbols instead of the problematic -> and <-, for example you could use

Re: [Rd] [External] Re: zapsmall(x) for scalar x

2023-12-17 Thread Barry Rowlingson
I think what's been missed is that zapsmall works relative to the absolute largest value in the vector. Hence if there's only one item in the vector, it is the largest, so its not zapped. The function's raison d'etre isn't to replace absolutely small values, but small values relative to the

Re: [Rd] [External] subfolders in the R folder

2023-03-28 Thread Barry Rowlingson
The "good reason" is all the tooling in R doesn't work with subfolders and would have to be rewritten. All the package check and build stuff. And that's assuming you don't want to change the basic flat package structure - for example to allow something like `library(foo)` to attach a package and

[Rd] attach "warning" is a message

2021-08-09 Thread Barry Rowlingson
If I mask something via `attach`: > d = data.frame(x=1:10) > x=1 > attach(d) The following object is masked _by_ .GlobalEnv: x > I get that message. The documentation for `attach` uses the phrase "warnings", although the message isn't coming from `warning()`: warn.conflicts: logical. If

Re: [Rd] Making R CMD nicer

2019-07-01 Thread Barry Rowlingson
If you write a lot of R code to run as command line scripts then look at Dirk E's "littler": $ r --help Usage: r [options] [-|file] Launch GNU R to execute the R commands supplied in the specified file, or from stdin if '-' is used. Suitable for so-called shebang '#!/'-line scripts. Options:

Re: [Rd] bugs in head() and tail()

2019-03-28 Thread Barry Rowlingson
On Wed, Mar 27, 2019 at 1:52 AM Abs Spurdle wrote: > > In the case of head.default(), it assumes that the object is a vector, or > something similar. > No it doesn't. It assumes (ultimately) that x[seq_len(n)] is the correct way to generate a "head" of something. Which is reasonable. That's

Re: [Rd] Runnable R packages

2019-02-02 Thread Barry Rowlingson
I don't think anyone denies that you *could* make an EXE to do all that. The discussion is on *how easy* it should be to create a single file that contains an initial "main" function plus a set of bundled code (potentially as a package) and which when run will install its package code (which is

Re: [Rd] Runnable R packages

2019-02-01 Thread Barry Rowlingson
; > On Thu, Jan 31, 2019 at 4:38 PM Barry Rowlingson > wrote: >> >> >> >> On Thu, Jan 31, 2019 at 3:14 PM David Lindelof wrote: >>> >>> >>> In summary, I'm convinced R would benefit from something similar to Java's >>> `Main-Class` he

Re: [Rd] Runnable R packages

2019-01-31 Thread Barry Rowlingson
On Thu, Jan 31, 2019 at 3:14 PM David Lindelof wrote: > > In summary, I'm convinced R would benefit from something similar to Java's > `Main-Class` header or Python's `__main__()` function. A new R CMD command > would take a package, install its dependencies, and run its "main" > function. I

Re: [Rd] sys.call() inside replacement functions incorrectly returns *tmp*

2018-10-16 Thread Barry Rowlingson
On Tue, Oct 16, 2018 at 12:03 AM Abs Spurdle wrote: > Probably the best example I can think of is converting cartesian > coordinates to polar coordinates. > Then we might have something like (note, untested, written in my email): > cart2polar = function (x, y) > list (theta=atan (y / x),

Re: [R-pkg-devel] CRAN Non-Triviality Requirement

2018-09-26 Thread Barry Rowlingson
On Wed, Sep 26, 2018 at 12:04 PM, Joris Meys wrote: > Hi Thomas, > > I would argue that one dataset - even a new one - could be added to another > package. The pizzapoll doesn't look like a scientific breakthrough, but it > might be a nice dataset for teaching and/or testing new models. So I see

Re: [Rd] diag(-1) produces weird result

2018-09-17 Thread Barry Rowlingson
On Mon, Sep 17, 2018 at 5:22 PM, Gábor Csárdi wrote: > I would say it is a mis-feature. If the 'x' argument of diag() is a > vector of length 1, then it creates an identity matrix of that size, > instead of creating a 1x1 matrix with the given value: > > ❯ diag(3) > [,1] [,2] [,3] > [1,]

Re: [Rd] Possible bug: R --slave --interactive stdin echo on Linux when stdin is a fifo

2018-07-26 Thread Barry Rowlingson
On Thu, Jul 26, 2018 at 12:22 AM, Gábor Csárdi wrote: > I am trying to control a background R session, connected via a fifo / > named pipe. Is the fifo significant here? If I read the same R code from a file via `<` I get the input echoed (R 3.4.4, Ubuntu). Barry

Re: [Rd] base::mean not consistent about NA/NaN

2018-07-03 Thread Barry Rowlingson
platform (since compilers may re-order computations). > For mean, NA / NaN could be handled in loop in summary.c. I assume that > performance penalty of fix is the reason why this inconsistency still > exists. > Jan > > On Mon, Jul 2, 2018 at 8:28 PM, Barry Rowlingson > wrote:

Re: [Rd] base::mean not consistent about NA/NaN

2018-07-02 Thread Barry Rowlingson
And for a starker example of this (documented) inconsistency, arithmetic addition is not commutative: > NA + NaN [1] NA > NaN + NA [1] NaN On Mon, Jul 2, 2018 at 5:32 PM, Duncan Murdoch wrote: > On 02/07/2018 11:25 AM, Jan Gorecki wrote: >> Hi, >> base::mean is not consistent in terms of

Re: [Rd] Why R should never move to git

2018-01-31 Thread Barry Rowlingson
On Tue, Jan 30, 2018 at 11:07 PM, Suzen, Mehmet wrote: > This might be off topic, but if R-core development ever moves to git, > I think it would make sense to have its own git service hosted by a > university, rather than using > github or gitlab. It is possible via

Re: [R-pkg-devel] Licensing of an R package

2018-01-19 Thread Barry Rowlingson
.html Barry > I agree that to write your own license is rather daunting. I would much > prefer to use a pre-existing license. > > Thanks for your comments. > > Cheers, > > Chris > > > > From: b.rowling...@gmail.com [mailto:b.rowling...@gmail.com] On Behalf

Re: [R-pkg-devel] Licensing of an R package

2018-01-19 Thread Barry Rowlingson
Chris, you've not said what *you* would like the license for your software to do. You could release the software under a "public domain", "no rights reserved" style license, and then if people want to link it with proprietary materials then nothing can stop them. But it wouldn't stop people

Re: [R-pkg-devel] creating indelible file during unit test

2017-12-12 Thread Barry Rowlingson
On Tue, Dec 12, 2017 at 12:24 PM, Thierry Onkelinx wrote: > Dear all, > > Some function I wrote deletes a bunch of files. It is crucial that all > files get deleted. Hence it should return an error when one or more > files couldn't be deleted. > > I'm writing a unit

[Rd] R on OpenHub

2017-04-25 Thread Barry Rowlingson
Does anyone want to manage the record for R on OpenHub? OpenHub is a site that records metrics for open source projects. At some point a record for R was created: https://www.openhub.net/p/r_project but there's no manager listed. OpenHub says: """ * Only someone who works on the project and

Re: [R-pkg-devel] Interplay between knitr() and View()

2017-04-22 Thread Barry Rowlingson
On Thu, Apr 20, 2017 at 3:41 PM, Roy Mendelssohn - NOAA Federal wrote: > What I liked about View() is often the table is quite big, and View() > provides scroll bars and nice headers that make it easy to look over the > results. When I run View(iris) I don't get

Re: [Rd] A trap for young players with the lapply() function.

2017-03-27 Thread Barry Rowlingson
On Mon, Mar 27, 2017 at 1:17 AM, Rolf Turner wrote: > > Is there any way to trap/detect the use of an optional argument called > "X" and thereby issue a more perspicuous error message? > > This would be helpful to those users who, like myself, are bears of very > little

Re: [R-pkg-devel] Pkgs with ToS violations

2016-08-04 Thread Barry Rowlingson
ROpenSci's onboarding process has a checkbox for confirming that the package "does not violate the Terms of Service of any service it interacts with.": https://github.com/ropensci/onboarding/blob/master/issue_template.md I also have a vague memory of this discussion a few years ago on

Re: [Rd] Source code of early S versions

2016-02-29 Thread Barry Rowlingson
On Mon, Feb 29, 2016 at 6:17 PM, John Chambers wrote: > The Wikipedia statement may be a bit misleading. > > S was never open source. Source versions would only have been available with > a nondisclosure agreement, and relatively few copies would have been > distributed in

[Rd] Source code of early S versions

2016-02-29 Thread Barry Rowlingson
According to Wikipedia: "In 1980 the first version of S was distributed outside Bell Laboratories and in 1981 source versions were made available." but I've been unable to locate any version of S online. Does anyone have a copy, somewhere, rusting away on an old hard disk or slowly flaking off a

Re: [Rd] Multi-line comments in R

2015-08-20 Thread Barry Rowlingson
On Wed, Aug 19, 2015 at 5:16 AM, Nathan Esau ne...@sfu.ca wrote: I was wondering why the decision was made long ago to never implement multi-line comments in R. I feel there are several argument to be made for why the R language should have multi-line comments. 1. Many programming languages

Re: [Rd] how useful could be a fast and embedded database for the R community?

2014-12-25 Thread Barry Rowlingson
On Wed, Dec 24, 2014 at 7:37 PM, joanv joan.igles...@live.com wrote: I'm sorry, but I cannot show code. Then can you stop using the word release. To release means to let something go, preferably out into the wild. I can't even find a binary release on that site. Call it the first version if you

Re: [Rd] SUGGESTION: Force install.packages() to use ASCII encoding when parse():ing code?

2014-12-12 Thread Barry Rowlingson
On Fri, Dec 12, 2014 at 12:34 PM, Jan Kim jtt...@googlemail.com wrote: it's just a matter of time that people get characters into their code that are different but indistinguishable in the font they use (I've seen this with \H{o} rather than a \{o}), and mega-personmonths are wasted puzzling

Re: [Rd] Intel Fortran compiler returns a -1 TRUE value

2014-10-03 Thread Barry Rowlingson
On Thu, Oct 2, 2014 at 4:25 PM, Ei-ji Nakama nak...@ki.rim.or.jp wrote: Hello The value generated by Fortran's .TRUE. evaluates as truthy -- as in all(z[[1]]) -- but is neither equal to nor identical to TRUE. Its numeric conversion to -1 is most unusual, every other system I've tried

Re: [Rd] Intel Fortran compiler returns a -1 TRUE value

2014-10-01 Thread Barry Rowlingson
On Tue, Sep 30, 2014 at 6:25 PM, William Dunlap wdun...@tibco.com wrote: In S+ and S it was valid to pass logicals to .Fortran, where they got mapped into the appropriate bit pattern. (The trouble was that 'appropriate' was compiled into the program - so you were locked into our compiler

[Rd] Intel Fortran compiler returns a -1 TRUE value

2014-09-30 Thread Barry Rowlingson
I have access to a cluster on which I have been supplied with R 3.1.0 which appears to have been built using the intel compiler tools. The following minimal Fortran file: subroutine truth(lind) logical lind lind = .TRUE. end Compiles thusly: arcadia R CMD SHLIB truth.f

Re: [Rd] Intel Fortran compiler returns a -1 TRUE value

2014-09-30 Thread Barry Rowlingson
On Tue, Sep 30, 2014 at 12:53 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: This appears to be user error. According to Writing R Extensions, the Fortran type corresponding to R logical is INTEGER, not LOGICAL. Oh yes, a very old and long-standing user error. I assume the CRAN checks

Re: [Rd] Re R CMD check checking in development version of R

2014-08-28 Thread Barry Rowlingson
And if, like me, you always forget which of Depends and Imports is the one you are supposed to be using, the mnemonic device is DEPends is DEPrecated[1], IMPorts is IMPortant. Barry [1] kinda. On Thu, Aug 28, 2014 at 4:33 AM, Gavin Simpson ucfa...@gmail.com wrote: On Aug 27, 2014 5:24 PM,

Re: [Rd] Why R-project source code is not on Github

2014-08-21 Thread Barry Rowlingson
On Thu, Aug 21, 2014 at 11:40 AM, Marc Schwartz marc_schwa...@me.com wrote: Your suggestion to move to Github is perhaps based upon a false premise, that the R community at large has the ability to directly post code/patches to the official distribution. That's not the false premise here.

Re: [Rd] Listing Packages in Depends or Imports

2014-06-27 Thread Barry Rowlingson
On Fri, Jun 27, 2014 at 3:00 AM, Dario Strbenac dstr7...@uni.sydney.edu.au wrote: Hello, The Writing R Extensions manual gives confusing advice. Compare Packages listed in imports or importFrom directives in the NAMESPACE file should almost always be in ‘Imports’ and not ‘Depends’. with

Re: [Rd] setting environmental variable inside R function to call C function

2014-06-03 Thread Barry Rowlingson
What does c_fun look like? Here's mine: #include stdio.h #include stdlib.h void c_fun(){ printf(TMP is %s\n, getenv(TMP)); } and I then do this at the shell prompt: R CMD SHLIB c_fun.c and this at the R prompt: dyn.load(c_fun.so) wrapper() and I get: wrapper() [1] A TMP is A list()

Re: [Rd] precedence (was 'historical NA question')

2014-05-08 Thread Barry Rowlingson
On Wed, May 7, 2014 at 11:00 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: Is there a language where - 2^2 gives a different answer than -2^2? (Substitute ** or any other exponentiation operator for ^ if you like.) This is important, because I'd like to avoid ever attempting any

Re: [Rd] RFC: API design of package modules

2014-04-29 Thread Barry Rowlingson
On Mon, Apr 28, 2014 at 2:55 PM, Konrad Rudolph konrad.rudolph+r-de...@gmail.com wrote: So this is my question: what do other people think? Which is the most useful and least confusing alternative from the users’ perspective? The most useful is alternative is write packages. The

Re: [Rd] Constructor/extractor.

2014-03-04 Thread Barry Rowlingson
On Tue, Mar 4, 2014 at 1:47 AM, Rolf Turner r.tur...@auckland.ac.nz wrote: Questions: == (2) Even if there are no such functions, is there anything intrinsically *wrong* with having a function possessing this somewhat schizophrenic nature? Is it likely to cause confusion, induce

Re: [Rd] contrib.url in non-interactive mode

2014-02-14 Thread Barry Rowlingson
On Fri, Feb 14, 2014 at 10:54 AM, Prof Brian Ripley rip...@stats.ox.ac.ukwrote: It is up to you to set a default mirror: we have little idea where you live (and it may not be where your email address suggests). Geolocation of mirrors had been mooted but not implemented (and in a corporate

Re: [Rd] cat with backspace and newline characters

2013-11-07 Thread Barry Rowlingson
On Thu, Nov 7, 2013 at 8:28 AM, Jari Oksanen jari.oksa...@oulu.fi wrote: On 07/11/2013, at 09:35 AM, Renaud Gaujoux wrote: I agree that the handling of \b is not that strange, once one agrees on what \b actually means, i.e. go back one character and not delete previous character. It means,

Re: [Rd] proposal for new FAQ entry?

2013-08-05 Thread Barry Rowlingson
On Mon, Aug 5, 2013 at 2:53 PM, peter dalgaard pda...@gmail.com wrote: Does this seem FAQ-worthy? Should I e-mail the FAQ maintainer and suggest it? Sure, as long as we never change the numbering of FAQ 7.31... Not even to FAQ 7.31+1e-15 ? Barry

Re: [Rd] [R] Internalization of help pages

2013-08-04 Thread Barry Rowlingson
[I've tried to move this back to R-devel, which I think is what Brian Ripley tried and nobody followed...] On Sun, Aug 4, 2013 at 4:15 PM, John Kane jrkrid...@inbox.com wrote: I tried it in French and there a few hiccups but it's not too bad. Personally I'd like to see the help tranlated into

Re: [Rd] Problem with distributing data in package.

2013-07-20 Thread Barry Rowlingson
On Fri, Jul 19, 2013 at 10:33 AM, Simon Knapp sleepingw...@gmail.com wrote: Hi List, I am building a package for a client to help them create and perform analyses against netcdf files which contain 'a temporal stack' of grids. For my examples and test cases, I create an example dataset in

Re: [Rd] should the text for RIGHT_ASSIGN be - in getParseData()?

2013-07-05 Thread Barry Rowlingson
On Fri, Jul 5, 2013 at 12:57 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: R itself doesn't make use of the text column, it's for display of code by highlighters etc. So if anyone does assume text is a function name, it's their bug, not ours. In fact, the bug is already there, because

Re: [Rd] should the text for RIGHT_ASSIGN be - in getParseData()?

2013-07-05 Thread Barry Rowlingson
On Fri, Jul 5, 2013 at 7:24 PM, peter dalgaard pda...@gmail.com wrote: I have used in with multi-line input, occasionally, though. As in replicate(1, { ysim - rbinom(length(p), n, p) glm(cbind(ysim, n - ysim) ~ x, binomial)$deviance }) ... and then you realize that you probably

Re: [Rd] Subset of a 'table' divided by a 'table' is a 'table', but printed by 'print.default'

2013-04-30 Thread Barry Rowlingson
On Tue, Apr 30, 2013 at 10:49 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: So it looks like the bug is in the implementation of /. Either it should drop the class, or it should set the object bit. The difference in printing between auto-printing and explicit printing may be worth

[Rd] R CMD INSTALL fail deletes earlier versions

2013-04-18 Thread Barry Rowlingson
Just tried to update devtools for R 2.15.3, and after an error about it only being available for 3.0.0, I found my previously good-enough devtools had disappeared. Here's how it happens: $ R --quiet require(devtools) Loading required package: devtools pac packageDescription(devtools)$Version [1]

Re: [Rd] Snippets from other packages/ License

2013-03-15 Thread Barry Rowlingson
On Thu, Mar 14, 2013 at 8:34 AM, Felix Schönbrodt nicebr...@gmx.net wrote: Hello, I want to use a function from another package (which is GPL=3), about 20 lines of code, in my own package. I somewhat hesitate to depend on the entire package just for this single function, but of course I

Re: [Rd] Why cannot `Rscript -e` accept an empty line?

2013-03-09 Thread Barry Rowlingson
On Sat, Mar 9, 2013 at 9:32 PM, Yihui Xie x...@yihui.name wrote: See the example below (under Ubuntu): $ Rscript -e '1' -e '2' [1] 1 [1] 2 $ Rscript -e '1' -e '' -e '2' ERROR: option '-e' requires an argument $ uname -a Linux xie 3.5.0-25-generic #39-Ubuntu SMP Mon Feb 25 18:26:58 UTC

Re: [Rd] CRAN task views: markdown? better .CSS?

2013-01-31 Thread Barry Rowlingson
On Thu, Jan 31, 2013 at 4:28 PM, Yihui Xie x...@yihui.name wrote: See this page by Barry Rowlingson: https://stat.ethz.ch/pipermail/r-devel/2012-February/063338.html Sadly that page is just the lipstick on a pig. Underneath, its still a pig. Given that CRAN maintainers do not even use

Re: [Rd] SystemRequirements’ field

2012-12-12 Thread Barry Rowlingson
I see three references to systemRequirements in Writing R Extensions. The one you list in your last email, this one: If your package requires one of these interpreters or an extension then this should be declared in the ‘SystemRequirements’ field of its DESCRIPTION file. [for listing interpreters

Re: [Rd] chown, chgrp?

2012-08-15 Thread Barry Rowlingson
On Tue, Aug 14, 2012 at 9:30 PM, Hadley Wickham had...@rice.edu wrote: Hi all, Is there an R wrapper for chown/chgrp (a la Sys.chmod)? I couldn't find one with a few minutes of searching, but it seems like a curious omission. A recursive grep of an R-dev source tree I had lying around

Re: [Rd] csv version of data in an R object

2012-04-21 Thread Barry Rowlingson
On Sat, Apr 21, 2012 at 3:28 PM, Max Kuhn mxk...@gmail.com wrote: For a package, I need to write a csv version of a data set to an R object. Right now, I use:    out - capture.output(                          write.table(x,                                      sep = ,,                      

Re: [Rd] Jazzing up the Task Views index page

2012-02-27 Thread Barry Rowlingson
On Wed, Feb 22, 2012 at 3:34 PM, Joshua Wiley jwiley.ps...@gmail.com wrote: Barry, is this a test/example only or would you plan on keeping something like that on your site even if it is not adopted for cran task views?  If it is not adopted elsewhere and you are willing to maintain it, I

[Rd] Jazzing up the Task Views index page

2012-02-21 Thread Barry Rowlingson
A little while ago here we had a short discussion about Task Views - I think ignited by someone saying 'how many times do I have to say have you read the Optimisation Task View??' and I poured some fuel on that fire by saying Task Views was a stupid name. Anyway, I did say that Task Views were

Re: [Rd] Task views (was: Re: [R] Schwefel Function Optimization)

2012-02-12 Thread Barry Rowlingson
On Sat, Feb 11, 2012 at 5:55 PM, Patrick Burns pbu...@pburns.seanet.com wrote: Now it could be that people are not trying very hard to solve their own problems, but to be fair it is a pretty gruelling process to find the Task Views. May I suggest that there be a Task Views item on the left

Re: [Rd] Saving nothing with save()

2011-12-22 Thread Barry Rowlingson
On Tue, Dec 20, 2011 at 6:40 PM, Martin Maechler maech...@stat.math.ethz.ch wrote: I've now changed the patch to only warn and only in the case when the 'list' argument is missing(.). Martin Thanks Martin, that sounds great. This came about from a question on Stack Overflow, where a user

Re: [Rd] secure password token management method in R

2011-12-18 Thread Barry Rowlingson
On Sun, Dec 18, 2011 at 1:28 AM, Paul Gilbert pgilbert...@gmail.com wrote: One way this is often done is to have this information in a file that only the owner can read. For example, mysql uses a file .my.cnf (in Windows it may have a different name). The code then just reads the information

[Rd] Saving nothing with save()

2011-12-17 Thread Barry Rowlingson
Scenario: Here I am working away in R. I've got results that prove global warming is anthropogenic and also the solution for producing limitless carbon-neutral energy from nuclear fusion. Its been a good day. So, I want to save my work. I don't want to overwrite my current .RData, so I save it to

Re: [Rd] secure password token management method in R

2011-12-14 Thread Barry Rowlingson
On Wed, Dec 14, 2011 at 9:54 PM, Ni Wang niw...@gmail.com wrote: hi, r developers, I am now working on a R function/package to handling online request with username and token/password. For security reasons, it's not so safe to store the username token in persistent variables, since they'll

Re: [Rd] bug in rank(), order(), is.unsorted() on character vector

2011-12-07 Thread Barry Rowlingson
2011/12/7 Hervé Pagès hpa...@fhcrc.org: rank(xa) See help(Comparison), specifically: Beware of making _any_ assumptions about the collation order followed by Collation of non-letters (spaces, punctuation signs, hyphens, fractions and so on) is even more problematic. Barry

Re: [Rd] bug in rank(), order(), is.unsorted() on character vector

2011-12-07 Thread Barry Rowlingson
2011/12/7 Joris Meys jorism...@gmail.com: @Barry : regardless of whether '_' comes before or after '1' , it should be consistent. Adding an 'a' shouldn't shift '_' from before '1' to between '1' and '2', that's clearly an error. The help files are not stating anything about that. That's an

Re: [Rd] how to make a true binary package?

2011-10-11 Thread Barry Rowlingson
On Tue, Oct 11, 2011 at 6:09 PM, A Zege andre.z...@gmail.com wrote: OK, gentlemen, i agree with you in general. I was not talking about a general purpose, general use package that one prepares for CRAN. I am sure you are familiar professionally or can imagine situations where you need to

Re: [Rd] Link between Qt GUI and R

2011-09-12 Thread Barry Rowlingson
On Mon, Sep 12, 2011 at 2:00 AM, typhoong graham...@eurus-energy.com wrote: hi everyone, thanks for all the tips. Barry, can you tell me why you think PyQT is by far the best way? I said that conditional on you knowing or wanting to learn Python. Python interacts with Qt in much the same way

Re: [Rd] Link between Qt GUI and R

2011-09-11 Thread Barry Rowlingson
On Sun, Sep 11, 2011 at 11:30 AM, typhoong graham...@eurus-energy.com wrote: hi, i want to build a Qt front-end GUI which communicates with R, and i am not sure what i should use for the interface. There seems to be many ways: R.dll, Rinside, Rcpp, RQt, Rtools... . what is the best way?

Re: [Rd] Please explain your workflow from R code - package - R code - package

2011-09-10 Thread Barry Rowlingson
On Fri, Sep 9, 2011 at 7:41 PM, Hadley Wickham had...@rice.edu wrote: It's not the cool kids who are doing this, it's the lazy kids ;) laziness being one of the three virtues of a programmer. The other two being hubris and something else I don't have time to look up at the moment.

Re: [Rd] non-R package development

2011-05-21 Thread Barry Rowlingson
On Sat, May 21, 2011 at 2:04 AM, Spencer Graves spencer.gra...@structuremonitoring.com wrote:      I routinely use the R CMD check, etc., process with Subversion for version control and collaborative development.  I've looked for similar capabilities for other languages, so far without

Re: [Rd] fortan common block

2011-05-08 Thread Barry Rowlingson
On Fri, May 6, 2011 at 4:04 PM, Paul Gilbert pgilb...@bank-banque-canada.ca wrote: Is it possible in R to call a fortran routine that sets variables in a common block and expect the values to persist when a call is made from R to a second routine that uses the common block? If not (as I

Re: [Rd] Wish there were a strict mode for R interpreter. What

2011-04-11 Thread Barry Rowlingson
On Sat, Apr 9, 2011 at 10:08 PM, Ted Harding ted.hard...@wlandres.net wrote: I'm with Duncan on this one! On the other hand, I can understand the issues that Paul's students might encounter. I think the right thing to so is to introduce the students to the basics of scoping, early in the

Re: [Rd] How to disable R's crash prompt

2011-03-09 Thread Barry Rowlingson
On Tue, Mar 8, 2011 at 10:41 PM, wayne.zh...@barclayscapital.com wrote: That did the trick.  Thank you soo much Simon! But really you *should* fix the segfault. Either you know why it happens, in which case you should spot it before it happens and do something sensible, or you don't know

Re: [Rd] How to disable R's crash prompt

2011-03-08 Thread Barry Rowlingson
On Tue, Mar 8, 2011 at 2:24 PM, wayne.zh...@barclayscapital.com wrote: Dear R devel, I have a C++ app that calls into embedded R to perform some analytic calculations.  When my app encounters a segmentation fault, R always prints the following crash prompt and asks me to enter an action:

[Rd] Easily switchable factor levels

2011-02-23 Thread Barry Rowlingson
I've recently been working with some California county-level data. The counties can be referred to as either FIPS codes, eg F060102, friendly names such as Del Norte County, names without 'County' on the end, names with 'CA' on the end (Del Norte County, CA). Different data sets use slightly

Re: [Rd] R vs. C

2011-01-17 Thread Barry Rowlingson
On Mon, Jan 17, 2011 at 6:57 PM, David Henderson dnadav...@yahoo.com wrote: I think we're also forgetting something, namely testing.  If you write your routine in C, you have placed additional burden upon yourself to test your C code through unit tests, etc.  If you write your code in R, you

[Rd] stats, pics etc on CRAN

2010-11-01 Thread Barry Rowlingson
Does anyone have some nice ways of showing what's on CRAN? A time-series of the number of packages? A clustered graph of packages by keyword? I'm just after a more impressive way of saying there's 2600 packages on CRAN than saying that. Counts of lines of R and C/Fortran code would be

Re: [Rd] Check for updates under Windows (Was: a reliable way to check the latest version of R on CRAN?)

2010-09-21 Thread Barry Rowlingson
On Sat, Sep 18, 2010 at 11:17 PM, Yihui Xie x...@yihui.name wrote: Dear R developers, I asked this question in r-help list but have not got a definite solution yet, and I think it might be more appropriate to ask developers or CRAN maintainers directly. Many software packages often have a

Re: [Rd] Non identical numerical results from R code vs C/C++ code?

2010-09-10 Thread Barry Rowlingson
On Fri, Sep 10, 2010 at 11:46 AM, Renaud Gaujoux ren...@mancala.cbio.uct.ac.za wrote: Hi, suppose you have two versions of the same algorithm: one in pure R, the other one in C/C++ called via .Call(). Assuming there is no bug in the implementations (i.e. they both do the same thing), is

[Rd] An ls error which is not an error...

2010-09-09 Thread Barry Rowlingson
If I try ls with an unquoted version of something in my search list, I get an error message but the ls completes successfully. For example: attach(x.RData) ls(file:x.RData) Error in try(name) : object 'x.RData' not found [1] x which seems to be because ls first does: nameValue - try(name)

Re: [Rd] No RTFM?

2010-08-24 Thread Barry Rowlingson
On Tue, Aug 24, 2010 at 3:28 PM, Michael Dewey i...@aghmed.fsnet.co.uk 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

Re: [Rd] small syntax suggestion

2010-08-23 Thread Barry Rowlingson
On Mon, Aug 23, 2010 at 6:06 PM, Davor Cubranic cubra...@stat.ubc.ca wrote: The students are trying to *compare* to a negative number, and trip on R's parsing of -. They could use '=' for assignment all they want (which I thought is being discouraged as a code style these days, BTW), and

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

2010-08-21 Thread Barry Rowlingson
On Sat, Aug 21, 2010 at 4:41 PM, Donald Winston satchwins...@yahoo.com wrote: Who decides what features are in R and how they are implemented? If there is someone here who has that authority I have this request: A report() function analogous to the plot() function that makes it easy to

Re: [Rd] Defining a method that behaves like '$'?

2010-07-10 Thread Barry Rowlingson
On Fri, Jul 9, 2010 at 2:10 PM, Renaud Gaujoux ren...@mancala.cbio.uct.ac.za wrote: I do not want to access the slot itself but its content: a:toto would be a...@slot1[['toto']]. The thing is that I would like to have two different methods: '$' (that I already have) and another one to define,

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

2010-05-31 Thread Barry Rowlingson
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 others would find it useful, and also if such a patch would have chances to get accepted by

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

2010-04-01 Thread Barry Rowlingson
On Thu, Apr 1, 2010 at 11:03 AM, Henrik Bengtsson h...@stat.berkeley.edu wrote: 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

Re: [Rd] Difference Linux / Windows

2010-04-01 Thread Barry Rowlingson
On Thu, Apr 1, 2010 at 4:37 PM, Simon Urbanek simon.urba...@r-project.org wrote: On Mar 31, 2010, at 18:38 , Seth Falcon wrote: On 3/31/10 1:12 PM, Christophe Genolini wrote: Hi the list, I am writing a package that happen to not be compatible with linux because I did not know that the

Re: [Rd] Improved Nelder-Mead algorithm - a potential replacement for optim's Nelder-Mead

2010-03-06 Thread Barry Rowlingson
On Fri, Mar 5, 2010 at 8:26 PM, Ravi Varadhan rvarad...@jhmi.edu wrote: Hi, I have written an R translation of C.T. Kelley's Matlab version of the Nelder-Mead algorithm.  This algorithm is discussed in detail in his book Iterative methods for optimization (SIAM 1999, Chapter 8).  I have

Re: [Rd] CRAN nearly down?

2010-03-06 Thread Barry Rowlingson
On Fri, Mar 5, 2010 at 5:40 PM, Paul Gilbert pgilb...@bank-banque-canada.ca wrote: Is CRAN having trouble or is it just me?  (The web interface is very slow and install.packages() is timing out and giving me service not available). Have you ever tried:

Re: [Rd] R logo as SVG ?

2010-02-21 Thread Barry Rowlingson
On Sat, Feb 20, 2010 at 7:56 PM, Jens Elkner je...@cs.uni-magdeburg.de wrote: Yes and scaling would be too resource consuming as well (very bad for menus, etc.). I think, the most challenging part here is all the [different type of] shadows. So does anybody know, who made  the original pixel

Re: [Rd] Problem with ?Syntax

2010-02-20 Thread Barry Rowlingson
On Sat, Feb 20, 2010 at 9:52 AM, Gabor Grothendieck ggrothendi...@gmail.com wrote: In ?Syntax [ is given as higher priority than $ but BOD$demand[3] seems to be the same as (BOD$demand)[3] contrary to [ being higher priority. BOD$demand[3] [1] 19 (BOD$demand)[3] [1] 19 What is the rule

Re: [Rd] filenames with special characters in the R/ directory of a package?

2010-02-12 Thread Barry Rowlingson
On Fri, Feb 12, 2010 at 5:35 AM, blue sky bluesky...@gmail.com wrote: According to R-exts.pdf (page 3): For maximal portability filenames should only contain only ASCII characters not excluded already (that is A-Za-z0-9._!#$%+,;=...@^(){}’[] I have some files with special characters like '['

Re: [Rd] R Startup configuration file

2010-02-12 Thread Barry Rowlingson
On Wed, Feb 10, 2010 at 3:06 PM, Barry Rowlingson b.rowling...@lancaster.ac.uk wrote:  But I agree that writing a saveable options package is the first step - then making that a default in R is the second so people don't have to edit profiles and R packages and applications can expect an API

Re: [Rd] R Startup configuration file

2010-02-12 Thread Barry Rowlingson
On Fri, Feb 12, 2010 at 2:22 PM, Simon Urbanek simon.urba...@r-project.org wrote: This is getting OT, but, please, no XML. It's entirely useless in this context IMHO (as it is in others, but that's another story) and we already have reliable support for storing R objects (more than one in

[Rd] R Startup configuration file

2010-02-10 Thread Barry Rowlingson
Currently when R starts up it can be configured by a file of environment variable specifications and a file of R code. This makes programmatic modification of startup configuration tricky. Case in point: I start R, do install.packages(foo), and up pops the 'choose a CRAN mirror' dialog. I'd like

Re: [Rd] R Startup configuration file

2010-02-10 Thread Barry Rowlingson
On Wed, Feb 10, 2010 at 11:44 AM, Duncan Murdoch murd...@stats.uwo.ca wrote: When I read the ?Startup man page, I find it is too complicated already; I don't want to add another kind of file to read.  (Would we have  separate user and site versions of this new file?  When would it be handled?)

Re: [Rd] Package Directory Hierarchy: Recursive inclusion of *.R possible?

2010-02-04 Thread Barry Rowlingson
On Wed, Feb 3, 2010 at 10:40 AM, Johannes Graumann johannes_graum...@web.de wrote: Hello, I would like to organize the R directory in my home-grown package into sub-directories, but R CMD --build doesn't seem to find *.R files below the actual source directory. Is there any way around that?

[Rd] Missing argument error message

2010-01-28 Thread Barry Rowlingson
Back in the days of R 2.6, if you did this, you got this: z=function(x){x*2} z() Error in z() : argument x is missing, with no default But now in this decade we get (for R 2.9 and 2.10): z=function(x){x*2} z() Error in z() : element 1 is empty; the part of the args list of '*' being

Re: [Rd] interfacing R with RFC2445

2010-01-14 Thread Barry Rowlingson
On Mon, Jan 11, 2010 at 10:10 PM, Jeff Hamann jeff.d.ham...@gmail.comwrote: R Developers, I cannot seem to find an R package that can read/write iCalendar (RFC2445) files. I have found the libical library at sourceforge. I've used it briefly so it may be what I need, but again no R

Re: [Rd] seq.int broken (seq as well) (PR#14169)

2010-01-13 Thread Barry Rowlingson
2010/1/11 Jens Oehlschlägel oehl_l...@gmx.de: Petr, This can have severe consequences like accessing beyond the limits of an array. If C-code is involved, this can crash R. In the worst case algorithms can silently do wrong. Being an admirer of R since its early days, I was shocked to see

Re: [Rd] How x[, 'colname1'] is implemented?

2010-01-02 Thread Barry Rowlingson
On Fri, Jan 1, 2010 at 9:40 PM, Peng Yu pengyu...@gmail.com wrote: I'm not complaining that it is not documented. Yes but you didn't answer my question. When you ask a question on these (or any mailing lists) you should always say what efforts you've made to answer the question. I first looked

  1   2   >