Displaying 20 results from an estimated 7000 matches similar to: "sum and partial argument name matching"
2003 Sep 24
1
partial matching in data frame subscripting
I'm not sure if the following is a bug or a feature:
> jjmat <- array(1:6, c(2,3), list(c('ABC', 'DEF'), c('xyz', 'tuv',
'qrs')))
> jjdf <- as.data.frame(jjmat)
> jjmat['AB', ]
Error: subscript out of bounds
> jjdf['AB',]
xyz tuv qrs
ABC 1 3 5
> jjmat[, 'tu']
Error: subscript out of bounds
2008 Jul 13
2
multiple names to assign
'assign' does not give a warning if 'x' has length
greater than 1 -- it just uses the first element:
assign(c('a1', 'a2'), 1:2)
One way of thinking about this is that people using
'assign' get what they deserve. The other is that it is
used seldom enough that adding a warning isn't going
to slow things down appreciably.
Patrick Burns
patrick at
2007 Feb 28
2
sort of OT: bootstrap tutorial
There is now a tutorial on bootstrapping and other resampling
methods at:
http://www.burns-stat.com/pages/Tutor/bootstrap_resampling.html
Corrections and other suggestions are welcome.
The project started because a novice asked me about bootstrapping.
My response was, "How dare you bug me while I'm playing with my
cats, just google for it." My correspondent was not very impressed
2003 Dec 18
1
a debugging difficulty
I had an error to debug that turned out to be essentially:
> NULL * matrix(1:4, 2)
Error: dim<- length of dims do not match the length of object
The equivalent of the NULL was a variable that was meant
to be a scalar. It took me a while to track down the problem
because I was focusing on looking for arrays that were different
than my expectation.
I think it could save substantial
2002 Oct 31
1
New home for S Poetry
Many readers on this list probably don't know that S Poetry
had an old home. S Poetry is a book in pdf about programming
in the S language. It was written mainly with S-PLUS 3.x in
mind when R was still an infant relative to what it is now.
Some parts of the book are still quite accurate for R. In other
places R is rather different from what is in the book. The FAQ
on the differences
2006 Jan 27
3
draft of Comment on UCLA tech report
You may recall that there was a discussion of a technical
report from the statistical consulting group at UCLA.
I have a draft of a comment on that report, which you
can get from
http://www.burns-stat.com/pages/Flotsam/uclaRcomment_draft1.pdf
I'm interested in comments: corrections, additions, deletions.
Patrick Burns
patrick at burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
2005 Jan 03
3
spreadsheet addiction
There's a new page on the Burns Statistics website
http://www.burns-stat.com/pages/Tutor/spreadsheet_addiction.html
that looks at spreadsheets from a quality assurance perspective. It
presents R as a suitable alternative to spreadsheets. Also there are
several specific problems with Excel that are highlighted, including
the status of statistical functionality in Excel.
Patrick Burns
Burns
2019 Feb 20
3
code for sum function
Dear Tomas,
Where do I find these files? Do they contain the code for the sum function?
What do you mean exactly with your point on long doubles? Where can I find
documentation on this?
Cheers, Rampal
On Mon, Feb 18, 2019, 15:38 Tomas Kalibera <tomas.kalibera at gmail.com wrote:
> See do_summary() in summary.c, rsum() for doubles. R uses long double
> type as accumulator on systems
2004 Oct 12
1
suggested minor clarification in fix help file
In the help file for "fix" in the Details section:
I suggest that "when" be replaced by "in which case"
so that the sentence reads:
The name supplied as 'x' need not exist as an R object, in which case a
function with no arguments and an empty body is supplied for editing.
I'm looking at:
platform i386-pc-mingw32
arch i386
os
2004 Nov 28
0
Re: [R-sig-finance] syntax for a loop
I don't think I understand you entirely, but here are a couple
things.
You need to shorten the loop so you don't run off the end.
You basically just write the code as you've stated it except that
"and" is && for single values and & for vectors
You don't say what should happen if the test is not true.
You can probably use "ifelse" instead of a
2004 May 21
1
search and missing library
I'm not sure what is going on with this one -- maybe it will make
sense to someone.
R1.9.0 under Windows 2000.
1) Start up R.
2) search() # works as expected
3) library(fBasics) # from Rmetrics
# but at least one of its required packages is not present on the machine
4) search() # nothing appears at all but the prompt
Once all of the required packages are present, then step 3 no longer
2004 Nov 23
1
help.search('goodness of fit') is empty
In 2.0.1 the command
help.search('goodness of fit')
comes up empty. "ks.test" is what I was looking for,
though perhaps there could be others?
Patrick Burns
Burns Statistics
patrick@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")
2005 Apr 30
1
formals assignment now strips attributres
The assignment form of 'formals' strips attributes (or something close
to that) from the values in the list. This wasn't intentional, was it?
The current behavior (2.0.0 through 2.1.0 on Windows at least):
> fjj <- function() x
> formals(fjj) <- list(x=c(a=2, b=4))
> fjj
function (x = c(2, 4))
x
Previous behavior:
> fjj <- function() x
> formals(fjj)
2006 May 17
0
variable colnames
Hy all,
I apologize i've used rownames instead of colnames in my first exemple. (that's why i changed the mail object) I was on mars when i wrote my question...
Every answer where correct ... but, because i've made a wrong question, people wern't able to understand...
So finally i'm speaking about colnames :
Let's be more precise:
I've got a query that gives me for
2007 Dec 17
2
help files for load and related functions
I recently had a discussion with a user about loading
and attaching in R. I was surprised that the help files
don't provide a very clear picture.
From my point of view 'load' and 'attach' are very
similar operations, the difference being that 'attach'
creates a new database on the search list while 'load'
puts all the objects into the global environment.
2006 Mar 18
1
all.equal buglet(s)
In the details section for 'all.equal' (in the paragraph
on complex values) it says 'all.numeric.numeric'. I
presume that should be 'all.equal.numeric'.
When two integer vectors differ, it is possible to get
overflow:
> set.seed(1)
> r1 <- .Random.seed
> set.seed(2)
> r2 <- .Random.seed
> all.equal(r1, r2)
[1] "Mean relative difference:
2006 Oct 01
1
stack imbalance in contour
I'm not sure if this has much significance or not -- but
it sounds rather ominous. It doesn't appear to be new
as it happens with 2.0.0 in Linux (but the formatting of
the warning messages has improved).
> contour(array(3e10, c(10,10), list(1:10, 11:20)))
Warning: stack imbalance in 'contour', 20 then 24
Warning: stack imbalance in '.Internal', 19 then 23
Warning:
2008 May 23
1
names<- bug or feature?
The two statements below with 'names' are conceptually
the same. The second performs the desired operation
while the first does not.
> xx <- list(A=c(a=1, b=2))
> names(xx$A[1]) <- "changed"
> xx
$A
a b
1 2
> names(xx$A)[1] <- "changed"
> xx
$A
changed b
1 2
This is observed in 2.4.0 on Linux as well as 2.7.0 and
2.8.0
2005 Jan 27
3
the incredible lightness of crossprod
The following is at least as much out of intellectual curiosity
as for practical reasons.
On reviewing some code written by novices to R, I came
across:
crossprod(x, y)[1,1]
I thought, "That isn't a very S way of saying that, I wonder
what the penalty is for using 'crossprod'." To my surprise the
penalty was substantially negative. Handily the client had S-PLUS
as
2003 May 18
0
POP Portfolio Optimizer
Burns Statistics has just released its POP Portfolio Optimizer, which
is available for a license fee. This has an interface designed to run
under either S-PLUS or R.
In addition to portfolio selection and asset allocation, there is
functionality
to generate random portfolios, and to estimate statistical factor models.
The website includes a new working paper on the best approach to
using