Displaying 20 results from an estimated 10000 matches similar to: "sample (PR#2546)"
2010 Jun 20
1
proposed change to 'sample'
There is a weakness in the 'sample'
function that is highlighted in the
help file. The 'x' argument can be
either the vector from which to sample,
or the maximum value of the sequence
from which to sample.
This can be ambiguous if the length of
'x' is one.
I propose adding an argument that allows
the user (programmer) to avoid that
ambiguity:
function (x, size, replace
2010 Mar 25
2
print(big+small*1i) -> big + 0i
Should both parts of a complex number be printed
to the same precision? The imaginary part of 0
looks a bit odd when log10(real/imag) >=~ getOption("digits"),
but I'm not sure it is awful. Some people might
expect the same number of significant digits in the
two parts.
> 1e7+4i
[1] 10000000+0i
> 1e7+5i
[1] 10000000+0i
> 1e10 + 1000i
[1] 1e+10+0e+00i
>
2013 Feb 28
2
Fortune?
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
pburns at pburns.seanet.com
twitter: @burnsstat @portfolioprobe
http://www.portfolioprobe.com/blog
http://www.burns-stat.com
(home of:
'Impatient R'
'The R
2010 Feb 12
1
Using seq_len() vs 1:n]
Pat Burns makes a good point. -Peter
-------- Original Message --------
Subject: Re: [R] Using seq_len() vs 1:n
Date: Fri, 12 Feb 2010 09:01:20 +0000
From: Patrick Burns <pburns at pburns.seanet.com>
To: Peter Ehlers <ehlers at ucalgary.ca>
References: <4B746AEF.10900 at ucalgary.ca>
If you want your code to be compatible with
S+, then 'seq_len' isn't going to work.
2011 Sep 12
3
Solve your R problems
R-help is all about solving R problems.
So here ya go:
http://www.portfolioprobe.com/2011/09/12/solve-your-r-problems/
--
Patrick Burns
pburns at 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')
2010 Jul 04
1
arr.ind argument to which.min and which.max
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
pburns at pburns.seanet.com
http://www.burns-stat.com
(home of 'Some hints for the R beginner'
and 'The R Inferno')
2014 Jan 03
1
wishlist: decreasing argument to is.unsorted
I've just realized that it could be handy
to have a 'decreasing' argument in 'is.unsorted'.
And I'm cheekily hoping someone else will
implement it.
It is easy enough to work around (with 'rev'),
but would be less hassle with an argument.
The case I have in mind uses 'is.unsorted' in
'stopifnot'.
Pat
--
Patrick Burns
pburns at pburns.seanet.com
2004 Jul 12
1
RE: tail(<matrix>) column numbers
I also vote for the 'helpful' addition on row numbers based on the original
matrix when no row names are present, with an optional argument to prevent
this behaviour.
-G
> -----Original Message-----
> From: Duncan Murdoch [mailto:dmurdoch@pair.com]
> Sent: Monday, July 12, 2004 8:06 AM
> To: Patrick Burns
> Cc: Martin Maechler; Warnes, Gregory R; Prof Brian Ripley;
>
2009 Jun 14
6
a proposal regarding documentation
Proposal
That a new mailing list be established
that pertains exclusively to R documentation.
The purpose of the list would be to discuss
weak sections of the documentation and
establish fixes for those weak spots.
Pro
If it works, there would be better documentation.
It would be an excellent opportunity for newish
and/or less technical people to contribute to R.
In some respects such people
2003 Feb 13
2
error from sample if sampling length one character (PR#2546)
Full_Name: Patrick Burns
Version: 1.6.1
OS: Suse Linux
Submission from: (NULL) (217.36.14.68)
Sample gives an error if it is sampling a length one character
vector:
> sample('a', 1)
Error in sample(x, size, replace, prob) : invalid first argument
The fix is trivial (numeric test in first line of the body):
function (x, size, replace = FALSE, prob = NULL)
{
if (length(x) == 1
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
2010 Feb 25
24
two questions for R beginners
* What were your biggest misconceptions or
stumbling blocks to getting up and running
with R?
* What documents helped you the most in this
initial phase?
I especially want to hear from people who are
lazy and impatient.
Feel free to write to me off-list. Definitely
write off-list if you are just confirming what
has been said on-list.
--
Patrick Burns
pburns at pburns.seanet.com
2009 Jan 09
5
The R Inferno
"The R Inferno" is now on the Burns Statistics website at
http://www.burns-stat.com/pages/Tutor/R_inferno.pdf
Abstract: If you are using R and you think you're in hell,
this is a map for you.
Also, I've expanded the outline concerning R on the
Burns Statistics 'Links' page. Suggestions (off-list) for
additional items are encouraged.
Patrick Burns
patrick at
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
2008 Oct 24
0
following up on infinite email server loop
just to add to ted's explanation in case it helps to fix the email
server problem: below are the two Recipients and one of the two is
always contained in the repeated emails that I'm receiving. Also, of
course i don't mean to claim that the names contained in below are
doing anything to cause the problem . VEC Operator is just an example.
There are 3 or 4 others that repeat
2010 May 30
4
Data Frame as Hash Table
I'm interested in using a data frame as if it were a hash table. For
instance if I had the following,
> (d <- data.frame(key=seq(0.5, 3, 0.5), value=rnorm(6)))
key value
1 0.5 -1.118665122
2 1.0 0.465122921
3 1.5 -0.529239211
4 2.0 -0.147324638
5 2.5 -1.531503795
6 3.0 -0.002720434
Then I'd like to be able to quickly retrieve the "value" of "key" 1.5
2010 Mar 07
1
Some hints for the R beginner
There is now a document called "Some hints
for the R beginner" whose purpose is to get
people up and running with R as quickly as
possible.
Direct access to it is:
http://www.burns-stat.com/pages/Tutor/hints_R_begin.html
JRR Tolkien wrote a story (sans hobbits) called
'Leaf by Niggle' that has always resonated
with me. I offer you an imperfect, incomplete
tree (but my roof is
2008 Oct 24
1
Repetitive correlation test
Dear all,
Through the following code, I wanted to perform correlation test repetedly (through loop) on different combinations of variables of a data set.
Code:
x=read.table("sample.txt",header=T,sep="\t")
out="corout.txt"
sink(out)
nm = names(x)
print(nm)
nvr=3
# nvr=Total no. of variables in the input data file
for (i in 1:(nvr-1))
{
for(j in (i+1):nvr)
{
frm=
2013 Feb 26
3
double bracket stripping names
Is it on purpose that `[[` strips the
names when used on an atomic vector?
> c(a=1, b=2)[1]
a
1
> c(a=1, b=2)[[1]]
[1] 1
> sessionInfo()
R Under development (unstable) (2013-02-11 r61902)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United Kingdom.1252
[2] LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C
2004 Jun 14
4
interrupt in Linux
Does anyone know how to interrupt R in RedHat? Neither control-c nor Esc is working. What I don't want to do is close the window or kill the entire R process.
Thanks,
David
This communication is for use by the intended recipient and ...{{dropped}}