[Rd] proposed change to 'sample'

2010-06-20 Thread Patrick Burns
file sample(x[x 9]) and sample(x[x 9], max=FALSE) have different behaviours. By the way, I'm certainly not convinced that 'max' is the best name for the argument. -- Patrick Burns pbu...@pburns.seanet.com http://www.burns-stat.com (home of 'Some hints for the R beginner' and 'The R Inferno

[Rd] arr.ind argument to which.min and which.max

2010-07-04 Thread Patrick Burns
Is there a reason that 'which.min' and 'which.max' don't have an 'arr.ind' argument? The context in which I wanted that was a grid search optimization, which seems like it would be reasonably common to me. -- Patrick Burns pbu...@pburns.seanet.com http://www.burns-stat.com (home of 'Some hints

Re: [Rd] arr.ind argument to which.min and which.max

2010-07-05 Thread Patrick Burns
of 'which.min' and 'which.max' would be more than made up for in the slight increase in speed of 'which'. Pat Martin Maechler, ETH Zurich PatB -- PatB Patrick Burns PatB pbu...@pburns.seanet.com PatB http://www.burns-stat.com PatB (home of 'Some hints for the R beginner

Re: [Rd] arr.ind argument to which.min and which.max

2010-07-06 Thread Patrick Burns
existed only since 2.11.0 anyway, so would seem ok, to me. Opinions ? I find it hard to believe that would cause too much trauma. Pat -- Martin -- Patrick Burns pbu...@pburns.seanet.com http://www.burns-stat.com (home of 'Some hints for the R beginner' and 'The R Inferno

[Rd] symbol and symbols help files

2010-10-09 Thread Patrick Burns
I think it makes sense to have 'symbol' in the See Also of 'symbols' and vice versa. -- Patrick Burns pbu...@pburns.seanet.com http://www.portfolioprobe.com/blog http://www.burns-stat.com (home of 'Some hints for the R beginner' and 'The R Inferno

[Rd] minor problem in strsplit help file

2010-12-24 Thread Patrick Burns
The 'extended' argument to 'strsplit' has been removed, but it is still mentioned in the argument items in the help file for 'fixed' and 'perl'. -- Patrick Burns pbu...@pburns.seanet.com twitter: @portfolioprobe http://www.portfolioprobe.com/blog http://www.burns-stat.com (home of 'Some hints

Re: [Rd] R vs. C

2011-01-17 Thread Patrick Burns
-devel -- Patrick Burns pbu...@pburns.seanet.com twitter: @portfolioprobe http://www.portfolioprobe.com/blog http://www.burns-stat.com (home of 'Some hints for the R beginner' and 'The R Inferno') __ R-devel@r-project.org mailing list https

Re: [Rd] R vs. C

2011-01-18 Thread Patrick Burns
. This email may contain privileged and/or confidential ...{{dropped:25}} __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Patrick Burns pbu...@pburns.seanet.com twitter: @portfolioprobe http://www.portfolioprobe.com

Re: [Rd] R vs. C

2011-01-18 Thread Patrick Burns
wrote: On 01/18/2011 10:53 AM, Patrick Burns wrote: I'm not at all a fan of thinking of the examples as being tests. Examples should clarify the thinking of potential users. Tests should clarify the space in which the code is correct. These two goals are generally at odds. Patrick, I completely

[Rd] median and data frames

2011-04-27 Thread Patrick Burns
lattice_0.19-23 tools_2.13.0 -- Patrick Burns pbu...@pburns.seanet.com twitter: @portfolioprobe http://www.portfolioprobe.com/blog http://www.burns-stat.com (home of 'Some hints for the R beginner' and 'The R Inferno') __ R-devel@r-project.org mailing list https

Re: [Rd] median and data frames

2011-04-29 Thread Patrick Burns
Maechler wrote: Paul Johnsonpauljoh...@gmail.com on Thu, 28 Apr 2011 00:20:27 -0500 writes: On Wed, Apr 27, 2011 at 12:44 PM, Patrick Burns pbu...@pburns.seanet.com wrote: Here are some data frames: df3.2- data.frame(1:3, 7:9) df4.2- data.frame(1:4, 7

Re: [Rd] question

2009-03-07 Thread Patrick Burns
between the items. Patrick Burns patr...@burns-stat.com +44 (0)20 8525 0696 http://www.burns-stat.com (home of The R Inferno and A Guide for the Unwilling S User) ivo welch wrote: hi gabor: this would be difficult to do. I don't think you want to read my programs. it would give you

Re: [Rd] how to document stuff most users don't want to see

2009-10-06 Thread Patrick Burns
with different levels of detail. A sophisticated version of this scheme might even assume different levels of knowledge of the user so that the least detailed level might be longer (but easier) than a more detailed level. Patrick Burns patr...@burns-stat.com +44 (0)20 8525 0696 http://www.burns-stat.com

Re: [Rd] how to document stuff most users don't want to see

2009-10-07 Thread Patrick Burns
Under the system of development we now have, I agreee with Seth's assertion. But if there were people dedicated to documentation, then I think something like what I described could be workable. Pat Seth Falcon wrote: Writing good documentation is hard. I can appreciate the desire to find

[Rd] Wish: more explicit error message with missing argument in c

2009-11-14 Thread Patrick Burns
be satisfactory, I think. Patrick Burns patr...@burns-stat.com +44 (0)20 8525 0696 http://www.burns-stat.com (home of The R Inferno and A Guide for the Unwilling S User) __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] n=1 default for random number generators

2009-11-16 Thread Patrick Burns
. Duncan Murdoch In the spirit of sour grapes, the proposed default might discourage some users from vectorizing their thinking. Patrick Burns patr...@burns-stat.com +44 (0)20 8525 0696 http://www.burns-stat.com (home of The R Inferno and A Guide for the Unwilling S User

[Rd] available.packages and 2.10.0

2010-01-10 Thread Patrick Burns
I'm confused about how to change a repository so that it doesn't hit the bug in 'available.packages' in 2.10.0 that was fixed in 2.10.1. I presume it involves adding fields to the PACKAGES file. Patrick Burns patr...@burns-stat.com +44 (0)20 8525 0696 http://www.burns-stat.com (home of The R

Re: [Rd] Why is there no c.factor?

2010-02-04 Thread Patrick Burns
)) factor(char, levels = levels) } c(factor(a), factor(b), factor(c(c, b,a)), factor(d)) # [1] a b c b a d # Levels: a b c d Hadley -- Patrick Burns pbu...@pburns.seanet.com http://www.burns-stat.com (home of 'The R Inferno' and 'A Guide for the Unwilling S User

Re: [Rd] print(big+small*1i) - big + 0i

2010-03-25 Thread Patrick Burns
mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Patrick Burns pbu...@pburns.seanet.com http://www.burns-stat.com (home of 'Some hints for the R beginner' and 'The R Inferno') __ R-devel@r-project.org mailing list https://stat.ethz.ch

[Rd] proposal for lower.tri and upper.tri value argument

2006-08-05 Thread Patrick Burns
) else ans - row(x) col(x) if(value) x[ans] else ans } environment: namespace:base Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and A Guide for the Unwilling S User) __ R-devel@r-project.org mailing

Re: [Rd] proposal for lower.tri and upper.tri value argument

2006-08-06 Thread Patrick Burns
Gabor came close to the situation I had yesterday that prompted me to write a local version of 'lower.tri'. It was approximately: x[sub, sub][lower.tri(x[sub,sub])] Pat Gabor Grothendieck wrote: On 8/6/06, Prof Brian Ripley [EMAIL PROTECTED] wrote: Is there a case to be made for this? If

[Rd] stack imbalance in contour

2006-10-01 Thread Patrick Burns
.1252;LC_MONETARY=English_United Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252 attached base packages: [1] methods stats graphics grDevices utils datasets [7] base Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry

Re: [Rd] Trailing message on R CMD BATCH

2007-01-10 Thread Patrick Burns
I rather like it. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and A Guide for the Unwilling S User) Brian Ripley wrote: Unix versions of R CMD BATCH have reported proc.time() unless the script ends in q(). E.g. if the input is 'search

Re: [Rd] Debug with set.seed()

2007-06-02 Thread Patrick Burns
. Also, using '-' is generally a bad idea. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and A Guide for the Unwilling S User) Tong Wang wrote: HI, all I am debugging an R code with dynamically loaded function in it. It seems set.seed(n

Re: [Rd] Efficiency of factor objects

2011-11-05 Thread Patrick Burns
list https://stat.ethz.ch/mailman/listinfo/r-devel -- Patrick Burns pbu...@pburns.seanet.com twitter: @portfolioprobe http://www.portfolioprobe.com/blog http://www.burns-stat.com (home of 'Some hints for the R beginner' and 'The R Inferno') __ R-devel

Re: [Rd] strange behavior from cex=*

2011-11-18 Thread Patrick Burns
__ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Patrick Burns pbu...@pburns.seanet.com twitter: @portfolioprobe http://www.portfolioprobe.com/blog http://www.burns-stat.com (home of 'Some hints for the R beginner' and 'The R Inferno

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

2012-02-11 Thread Patrick Burns
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 R website in the Documentation section? -- Patrick Burns pbu...@pburns.seanet.com twitter: @portfolioprobe http://www.portfolioprobe.com/blog http

Re: [Rd] Task views

2012-02-13 Thread Patrick Burns
find yourself thinking 'how do I do X in R?' then the list of Task Views should be your first stop. Barry -- Patrick Burns pbu...@pburns.seanet.com twitter: @portfolioprobe http://www.portfolioprobe.com/blog http://www.burns-stat.com (home of 'Some hints for the R beginner' and 'The R Inferno

Re: [Rd] Overwrite S3 methond from base package

2012-02-13 Thread Patrick Burns
__ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Patrick Burns pbu...@pburns.seanet.com twitter: @portfolioprobe http://www.portfolioprobe.com/blog http://www.burns-stat.com (home of 'Some hints for the R beginner' and 'The R Inferno

[Rd] no carriage returns in BATCH output from 2.15.0

2012-04-15 Thread Patrick Burns
? Pat -- Patrick Burns pbu...@pburns.seanet.com twitter: @portfolioprobe http://www.portfolioprobe.com/blog http://www.burns-stat.com (home of 'Some hints for the R beginner' and 'The R Inferno') __ R-devel@r-project.org mailing list https://stat.ethz.ch

[Rd] get and exists are not vectorized

2013-02-12 Thread Patrick Burns
is that 'get' should do what it currently does except it should warn about ignoring subsequent elements if there are any. I don't see a reason why 'exists' shouldn't be vectorized. Am I missing something? Pat -- Patrick Burns pbu...@pburns.seanet.com twitter: @burnsstat @portfolioprobe http

[Rd] double bracket stripping names

2013-02-26 Thread Patrick Burns
=English_United Kingdom.1252 [3] LC_MONETARY=English_United Kingdom.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United Kingdom.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base -- Patrick Burns pbu...@pburns.seanet.com twitter: @burnsstat @portfolioprobe

[Rd] Fortune?

2013-02-28 Thread Patrick Burns
I think the rule is that you can do anything as long as you don't complain. If you want to complain, you must follow the instructions. -- Jari Oksanen in Re: [Rd] Keeping up to date with R-devel -- Patrick Burns pbu...@pburns.seanet.com twitter: @burnsstat @portfolioprobe http

[Rd] fortune?

2013-03-20 Thread Patrick Burns
Brian Ripley: If things are not readily available in R it is always good to pause and reflect if there might be a good reason. In the R-help thread: How to get the t-stat for arima()? Pat -- Patrick Burns pbu...@pburns.seanet.com twitter: @burnsstat @portfolioprobe http

Re: [Rd] ifelse can't return a list? Please explain (R-2.15.3)

2013-03-25 Thread Patrick Burns
] 6 -- Patrick Burns pbu...@pburns.seanet.com twitter: @burnsstat @portfolioprobe http://www.portfolioprobe.com/blog http://www.burns-stat.com (home of: 'Impatient R' 'The R Inferno' 'Tao Te Programming') __ R-devel@r-project.org mailing list https

[Rd] as.name and namespaces

2013-04-23 Thread Patrick Burns
'as.name' doesn't recognize a name with its namespace extension as a name: as.name(lm) lm as.name(stats::lm) `stats::lm` as.name(stats:::lm) `stats:::lm` Is there a reason why it shouldn't? Pat -- Patrick Burns pbu...@pburns.seanet.com twitter: @burnsstat @portfolioprobe http

Re: [Rd] as.name and namespaces

2013-04-23 Thread Patrick Burns
Okay, that's a good reason why it shouldn't. Why it should is that I want to substitute the first element of a call to be a function including the namespace. Pat On 23/04/2013 18:32, peter dalgaard wrote: On Apr 23, 2013, at 19:23 , Patrick Burns wrote: 'as.name' doesn't recognize a name

Re: [Rd] as.name and namespaces

2013-04-24 Thread Patrick Burns
the solution. Moving functions around is unappetizing for my use -- this is for testing and keeping things as faithful to real use is a good thing. Pat On 23/04/2013 21:18, Duncan Murdoch wrote: On 13-04-23 3:51 PM, Patrick Burns wrote: Okay, that's a good reason why it shouldn't. Why it should

Re: [Rd] meaning of trim in mean()

2007-10-28 Thread Patrick Burns
If the sentence in question were amended to: Values of trim outside that range ... then I think it would rule out the misinterpretation of the sentence. Pat Prof Brian Ripley wrote: There is only one _range_ mentioned, (0, 0.5). I don't see how you can construe 'that range' to be a

Re: [Rd] sd(NA)

2007-12-03 Thread Patrick Burns
is clearly impossible. The second has some actual value, but we don't have enough information to have an estimate of the value. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and A Guide for the Unwilling S User) Prof Brian Ripley wrote: On Sun, 2

[Rd] help files for load and related functions

2007-12-17 Thread Patrick Burns
thing for most functions to have). I can understand there could be another point of view on that. However, I definitely think that there should be a Side Effects section in the help files of functions whose whole point is a side effect. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http

Re: [Rd] help files for load and related functions

2007-12-17 Thread Patrick Burns
Patches to the help files sound like a good idea. However, it isn't something I'm likely to get to immediately. I'm hoping that some other nice person will volunteer. Pat Duncan Murdoch wrote: On 12/17/2007 6:00 AM, Patrick Burns wrote: I recently had a discussion with a user about loading

Re: [Rd] NA warnings for rdistr() {aka patch for random.c}

2008-03-08 Thread Patrick Burns
Martin Maechler wrote: [ ... ] But actually, part of the changed behavior may be considered undesirable: rnorm(2, mean = NA) which gives two NaN's would now produce a warning, where I could argue that 'arithmetic with NAs should give NAs without a warning' since 1:2 + NA also gives

Re: [Rd] RFC: What should ?foo do?

2008-04-27 Thread Patrick Burns
Peter Dalgaard wrote: Duncan Murdoch wrote: I haven't done it, but I suspect we could introduce special behaviour for ??foo very easily. We could even have a whole hierarchy: ?foo, ??foo, ???foo, foo, ... Heh, that's rather nice, actually. In words, that could read

[Rd] names- bug or feature?

2008-05-23 Thread Patrick Burns
on Linux as well as 2.7.0 and 2.8.0 on Windows XP. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and A Guide for the Unwilling S User) __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman

[Rd] multiple names to assign

2008-07-13 Thread Patrick Burns
to slow things down appreciably. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and A Guide for the Unwilling S User) __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Is text(..., adj) upside down? (Or am I?)

2008-07-22 Thread Patrick Burns
Basically the only thing in the thread that was clear to me was Brian's phrasing. So I'd suggest basing any changes on that. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and A Guide for the Unwilling S User) S Ellison wrote: Yup; you're all

Re: [Rd] Numerical optimisation and non-feasible regions

2008-08-07 Thread Patrick Burns
If the positive definiteness of the covariance is the only issue, then you could base a penalty on: eps - smallest.eigen.value if the smallest eigen value is smaller than eps. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and A Guide

Re: [Rd] Numerical optimisation and non-feasible regions

2008-08-07 Thread Patrick Burns
. This is the reason why I wonder if setting by myself a $-\infty$ in the composite likelihood function is appropriate here. However, you might be right in setting a tolerance value 'eps' instead of the theoretical bound eigen values 0. Thanks for your tips, Best, Mathieu Patrick Burns a écrit

[Rd] 'by' with one-dimensional array

2008-11-16 Thread Patrick Burns
to be a one-liner, but now decides what to do based on 'length(dim(data))'. This specific problem goes away if the line: if (length(dim(data))) is replaced by: if(length(dim(data)) 1) But I don't know what other mischief such a change would make. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525

[Rd] minor typo in assignOps help file

2008-11-23 Thread Patrick Burns
There is a minor typo in the help file for assignOps: There is no space in operator- in the second sentence of the second paragraph of the Details section. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and A Guide for the Unwilling S User

Re: [Rd] [R] odd behavior when multiplying data frame by an element

2008-12-13 Thread Patrick Burns
the matrix case. Patrick Burns patr...@burns-stat.com +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and A Guide for the Unwilling S User) markle...@verizon.net wrote: could someone explain what is happening below ? I was trying to solve a related question on the list

Re: [Rd] x - 1:2; dim(x) - 2? A vector or not?

2009-01-13 Thread Patrick Burns
for this explanation. One could then argue that [1:10,] is somewhat better than [,1:10], but that is just polish. Perhaps it could be: [1:10(,)] That is weird enough that it should not lead people to believe that it is a matrix. But might prompt them a bit in that direction. Patrick Burns patr

Re: [Rd] length of POSIXlt object (PR#13482)

2009-01-30 Thread Patrick Burns
'The R Inferno' page 93 and page 99. Patrick Burns patr...@burns-stat.com +44 (0)20 8525 0696 http://www.burns-stat.com (home of The R Inferno and A Guide for the Unwilling S User) twoutop...@gmail.com wrote: The length() of a POSIXlt object is given as 9 regardless of the actual length

Re: [Rd] eigen of a real pd symmetric matrix gives NaNs in $vector (PR#7987)

2005-07-04 Thread Patrick Burns
is that it is vectors 43:50 (I think) that are NaN's and the matrix is logically of rank 50. That is, it is a covariance matrix on 75 variables using 50 observations. Hopefully, someone has the experience and tenacity to figure out what is going on here. Patrick Burns Burns Statistics [EMAIL

[Rd] help.search of precedence is empty

2005-07-15 Thread Patrick Burns
Doing help.search('precedence') comes up empty. A fix would be to have the title: Operator Syntax and Precedence instead of Operator Syntax Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and A Guide for the Unwilling S User

[Rd] minor typo in Writing R Extensions

2005-08-19 Thread Patrick Burns
On page 10 (section 1.1.4) of Writing R Extensions version 2.1.1 the following two phrases appear: define these function in a file after the packages is The 's' from 'functions' fell down the page and attached itself to 'package'. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http

[Rd] [Fwd: Re: [R] a strange problem with integrate()]

2006-03-01 Thread Patrick Burns
'. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and A Guide for the Unwilling S User) Original Message Subject:Re: [R] a strange problem with integrate() Date: Wed, 01 Mar 2006 11:44:33 -0600 From: Sundar Dorai-Raj [EMAIL

[Rd] all.equal buglet(s)

2006-03-18 Thread Patrick Burns
all.equal(r1, r2) [1] Mean relative difference: NA Warning message: NAs produced by integer overflow in: target - current A small change to 'all.equal.numeric' would fix that if it is felt to be worthwhile. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry

Re: [Rd] [R] rownames, colnames, and date and time

2006-03-30 Thread Patrick Burns
not to encounter that in R and hope it continues. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and A Guide for the Unwilling S User) Prof Brian Ripley wrote: Looking at the code it occurs to me that there is another case you have not considered

[Rd] wishlist: decreasing argument to is.unsorted

2014-01-03 Thread Patrick Burns
'. Pat -- Patrick Burns pbu...@pburns.seanet.com twitter: @burnsstat @portfolioprobe http://www.portfolioprobe.com/blog http://www.burns-stat.com (home of: 'Impatient R' 'The R Inferno' 'Tao Te Programming') __ R-devel@r-project.org mailing list

[Rd] suggested addition to 'install.packages' help file

2014-02-06 Thread Patrick Burns
, but it makes things work in my case. Pat -- Patrick Burns pbu...@pburns.seanet.com twitter: @burnsstat @portfolioprobe http://www.portfolioprobe.com/blog http://www.burns-stat.com (home of: 'Impatient R' 'The R Inferno' 'Tao Te Programming') __ R-devel@r

[Rd] no objects apparent in built package

2014-02-13 Thread Patrick Burns
. This is being done in RStudio on Windows with R version 3.0.2. The package used to work. There was a very minor change to one function when the package started not working. The zip files that don't work are the same size as the one that does work. Thanks for any suggestions. Pat -- Patrick Burns pbu

Re: [Rd] Is this a bug in `[`?

2018-08-05 Thread Patrick Burns
__     R-devel@r-project.org <mailto:R-devel@r-project.org> mailing list     https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Patrick Burns pbu...@p

[Rd] random network disconnects

2023-07-31 Thread Patrick Burns
(res, "try-error")) { if (ThrowError) { stop("file connection failed") } else { warning("file connection failed") } } } People have done network traces and such, but so far nothing has been seen. Thanks, Pat