Re: [Rd] Compiling R scripts

2005-07-04 Thread Barry Rowlingson
Uzuner, Tolga wrote: > Dear R Developers, > It would help if R scripts could be compiled into an executable, or a > library. Are you sure it would help? If you do a big matrix operation in R it runs at the speed of the underlying C code. It wont get much faster. Profile your code, find out wh

Re: [Rd] as.Date() , feature or bug?

2005-09-15 Thread Barry Rowlingson
Prof Brian Ripley wrote: > > What does anyone want such dates for? I hope there was an extremely good > reason to spend other people's time on this, and look forward to an > extremely convincing explanation. > I can think of one case where I've seen exact dates that far in the future used: as

Re: [Rd] R crashes for large formulas in lm() (PR#8180)

2005-10-05 Thread Barry Rowlingson
Prof Brian Ripley wrote: > OK, let's try to reproduce that: > > >>x1 <- runif(1000) ... >>y <- rnorm(1000) >>fit <- lm(y~(x1*x2*x3*x4*x5*x6*x7*x8)^2) > > > No crash, a quite reasonable fit. Add one more: > x9 <- runif(1000) works with 8: > fit <- lm(y~(x1*x2*x3*x4*x5*x6*x7*x8)^2)

Re: [Rd] R crashes for large formulas in lm() (PR#8180)

2005-10-05 Thread Barry Rowlingson
> set.seed(123) > x1 <- runif(1000) > x2 <- runif(1000) > x3 <- runif(1000) > x4 <- runif(1000) > x5 <- runif(1000) > x6 <- runif(1000) > x7 <- runif(1000) > x8 <- runif(1000) > y <- rnorm(1000) > fit <- lm(y~(x1*x2*x3*x4*x5*x6*x7*x8)^2) For me (with 9 variables) this crashes in model.matrix:

[Rd] image() with all NAs fails (PR#8228)

2005-10-20 Thread barry . rowlingson
Full_Name: Barry Rowlingson Version: 2.2.0 OS: Linux Submission from: (NULL) (194.80.32.8) The image function with a matrix of all NA values fails with: > xyz=list(x=1:3,y=1:4,z=matrix(NA,3,4)) > image(xyz) Error in image.default(xyz) : invalid z limits In addition: Warning messages:

Re: [Rd] two-way communication using Unix pipes

2005-11-16 Thread Barry Rowlingson
Jonathan Callahan wrote: > Can someone please explain to me exactly what R is doing with the the > standard IO handles and whether or not there is any simple way to convince > it to behave as if it were talking to a user at the other end of a keyboard > and terminal? I've already tried '--no-readl

Re: [Rd] checkpointing

2006-01-03 Thread Barry Rowlingson
Roger D. Peng wrote: > One possibility is to write in some checkpointing into your objective > function, > such as saving the current parameter values via 'save()' or 'dput()'. Has anyone successfully checkpointed and restarted R using any of the linux process checkpointing solutions I find w

[Rd] R on Thin Client with Win 2003

2006-01-04 Thread Barry Rowlingson
I'm having some fun with R on a Windows 2003 Server talking to a Wyse Winterm running Thinstation Linux. The Winterm boots Linux from the network and then runs rdesktop to a Dell 1750 server (dual 3G Xeon or somesuch). The first problem I noticed was that R (and the terminal) ground to a near

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 https://gogs.io/ project. > >

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 h

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] 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] 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] 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), r=sq

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 j

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

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 con

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 depe

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] Defining a method that behaves like '$'?

2010-07-10 Thread Barry Rowlingson
On Fri, Jul 9, 2010 at 2:10 PM, Renaud Gaujoux 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, ideally that behaves like

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 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 > generate a report from

Re: [Rd] small syntax suggestion

2010-08-23 Thread Barry Rowlingson
On Sun, Aug 22, 2010 at 4:33 PM, ivo welch wrote: > Dear R development Team:  I really know very little, so you may ignore > this post.  I have found that my students often make the mistake of > mixing up comparisons and assignments with negative numbers: > >  if (x<-3) do_something; > > I parenth

Re: [Rd] small syntax suggestion

2010-08-23 Thread Barry Rowlingson
On Mon, Aug 23, 2010 at 6:06 PM, Davor Cubranic 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 they'll > still r

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

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

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 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 there any well known reason

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 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 menu item li

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

Re: [Rd] R vs. C

2011-01-17 Thread Barry Rowlingson
On Mon, Jan 17, 2011 at 6:57 PM, David Henderson 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 still need the > un

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

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

2011-03-08 Thread Barry Rowlingson
On Tue, Mar 8, 2011 at 2:24 PM, 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: > > > *** caught segfault **

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

2011-03-09 Thread Barry Rowlingson
On Tue, Mar 8, 2011 at 10:41 PM, 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 why it happens, in which case it

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 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 process of learning R.

Re: [Rd] Recursive objects

2011-05-04 Thread Barry Rowlingson
On Wed, May 4, 2011 at 2:21 PM, Hadley Wickham wrote: > Any hints as to what to search for? For recursive objects, search for recursive objects. Barry __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] fortan common block

2011-05-08 Thread Barry Rowlingson
On Fri, May 6, 2011 at 4:04 PM, Paul Gilbert 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 suspect),  is it possible to

Re: [Rd] non-R package development

2011-05-21 Thread Barry Rowlingson
On Sat, May 21, 2011 at 2:04 AM, Spencer Graves 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 success. Python has a similar package b

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 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. library(fortunes) fodder:

Re: [Rd] Link between Qt GUI and R

2011-09-11 Thread Barry Rowlingson
On Sun, Sep 11, 2011 at 11:30 AM, typhoong 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? please advice. > Another w

Re: [Rd] Link between Qt GUI and R

2011-09-12 Thread Barry Rowlingson
On Mon, Sep 12, 2011 at 2:00 AM, typhoong 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 as C++ interacts with

Re: [Rd] Multi-line comments in R

2015-08-20 Thread Barry Rowlingson
On Wed, Aug 19, 2015 at 5:16 AM, Nathan Esau 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 (includin

[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] 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 source. There was a

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 brain. > > Failing that (it

[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

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

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 `l

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 largest

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

[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: R for the US Air Force

2024-05-18 Thread Barry Rowlingson
R is not a product that is provided by a company or any vendor that can be > procured through a vendor e.g. something on a GSA schedule. > > that's not strictly true though is it? Anyone can form a company and supply R, as long as everyone complies with the license. You are also free to download R

Re: [Rd] [External] Re: R for the US Air Force

2024-05-18 Thread Barry Rowlingson
> that's not strictly true though is it? Anyone can form a company and > supply R, as long as everyone complies with the license. You are also free > to download R from public services and do it without any corporate > wrappings and trappings, which is what Posit (ex-RStudio) do, right? > > [corre

Re: [Rd] [External] Re: Segfault when parsing UTF-8 text with srcrefs

2024-05-30 Thread Barry Rowlingson
I get an R error and no segfault: > parse(textConnection(text), srcfile = srcfile) Error in parse(textConnection(text), srcfile = srcfile) : test.r:1:1: unexpected $end 1: × ^ This is R 4.3.0, so maybe the bug has been introduced since then... Version and system info: > version

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 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 > there is actually one

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 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 don't wa

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 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 code > (as this i

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 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 English too.l > >

Re: [Rd] proposal for new FAQ entry?

2013-08-05 Thread Barry Rowlingson
On Mon, Aug 5, 2013 at 2:53 PM, peter dalgaard 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 __ R-dev

Re: [Rd] Multiple return values / bug in rpart?

2013-08-13 Thread Barry Rowlingson
On Mon, Aug 12, 2013 at 6:06 PM, Justin Talbot wrote: > In the recommended package rpart (version 4.1-1), the file rpartpl.R > contains the following line: > > return(x = x[!erase], y = y[!erase]) > > AFAIK, returning multiple values like this is not valid R. Is that > correct? I can't seem to mak

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 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, to parap

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 wrote: > > 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 > setting is not 100

Re: [Rd] Constructor/extractor.

2014-03-04 Thread Barry Rowlingson
On Tue, Mar 4, 2014 at 1:47 AM, Rolf Turner 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 syntactical mi

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] precedence (was 'historical NA question')

2014-05-08 Thread Barry Rowlingson
On Wed, May 7, 2014 at 11:00 PM, Duncan Murdoch 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 > important calculati

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 #include 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() Is that

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 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 > > Almost always pa

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 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. This is: "one sim

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 wrote: > On Aug 27, 2014 5:24 PM, "Hadley Wickham"

[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 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 don't check this. Has

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 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 vendor's choice

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 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 converts > to

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 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 > over tracking dow

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 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 want, but not "

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 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 > demonstrate a solution

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

2011-12-07 Thread Barry Rowlingson
2011/12/7 Hervé Pagès : > 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 : > @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 assumption. The h

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 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 be saved to

[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-18 Thread Barry Rowlingson
On Sun, Dec 18, 2011 at 1:28 AM, Paul Gilbert 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 from > the file. To g

Re: [Rd] Saving nothing with save()

2011-12-22 Thread Barry Rowlingson
On Tue, Dec 20, 2011 at 6:40 PM, Martin Maechler 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 was loading an R Data f

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 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 sidebar of the

[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] Jazzing up the Task Views index page

2012-02-27 Thread Barry Rowlingson
On Wed, Feb 22, 2012 at 3:34 PM, Joshua Wiley 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 would like to link to

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 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] chown, chgrp?

2012-08-15 Thread Barry Rowlingson
On Tue, Aug 14, 2012 at 9:30 PM, Hadley Wickham 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 couldn't find o

Re: [Rd] chown, chgrp?

2012-08-15 Thread Barry Rowlingson
On Wed, Aug 15, 2012 at 2:47 PM, Simon Urbanek wrote: > > ... and moreover with the increasing adoption of ACL on unix and > non-existence of uid/gid on Windows this is more an archaic curiosity so I > don't think it makes sense to add it at this point. > It does however raise the question, "

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 interpreter

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

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 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 2013 > x86

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 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 want to credi

[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

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 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 addressing, but really

Re: [Rd] locking down R

2013-05-20 Thread Barry Rowlingson
On Sun, May 19, 2013 at 7:16 PM, Ben Bolker wrote: > >The workstations have no access to external networks, > nor to external media (thumb drives etc.) [information transfer to the > outside world is via shared drives that can be accessed by > administrators with network access]. > > * I stipulate

[Rd] Colour Schemes

2009-05-21 Thread Barry Rowlingson
I've been thinking hard about generating colour schemes for data. There's quite a bit of existing code scattered in various packages for playing with colours and colour palettes, but I can't find the sort of thing I'm after for applying colours to data... To my mind a colour scheme is a mapping fr

Re: [Rd] Colour Schemes

2009-05-21 Thread Barry Rowlingson
On Thu, May 21, 2009 at 2:18 PM, wrote: > Most of the plots where colour is typically used to signify a variable > already do map colours to data values.  Take a look at help pages for > levelplot/contourplot/wireframe from the lattice package, and image from > base graphics. > > (The format is

Re: [Rd] Colour Schemes

2009-05-21 Thread Barry Rowlingson
On Thu, May 21, 2009 at 5:29 PM, Deepayan Sarkar wrote: [oops I didnt reply-to-all] > But you could specify an explicit 'at' vector specifying the color > breakpoints: effectively, you want at = do.breaks(zlim, 5). > > lattice does have a function called 'level.colors' that factors out > the col

[Rd] Scope problem?

2009-05-22 Thread Barry Rowlingson
I've just spent today trying to fix a Heisenbug... this function returns a linear interpolator function: interpOne <- function(xl,yl){ f = function(data){ t = (data-min(xl))/(max(xl)-min(xl)) return(min(yl)+t*(max(yl)-min(yl))) } return(f) } > k=interpOne(c(0,1),c(4,5)) > k(0.5) [1

Re: [Rd] Scope problem?

2009-05-22 Thread Barry Rowlingson
On Fri, May 22, 2009 at 6:04 PM, Duncan Murdoch wrote: > Putting force(xl); force(yl) into your interpOne definition (so they get > executed when interpOne is called, not just when the returned function is > called) should work. *sigh* yes, that looks like it. The help for "force" gives a more

Re: [Rd] plot ignores type= "n" when x is factor (PR#13703)

2009-05-26 Thread Barry Rowlingson
On Tue, May 26, 2009 at 5:58 PM, Paul Johnson wrote: > There's no mention of plot.factor in the plot help page. Yes there is, but hidden slightly more than the planning application for the destruction of the Earth ("It was on display in the bottom of a locked filing cabinet stuck in a disused la

  1   2   >