Displaying 20 results from an estimated 38 matches for "blackmesacapital".
2004 Mar 18
12
substitute question
Consider the following example:
# substitute a with b in the indicated function. Seems to work.
> z <- substitute( function()a+1, list(a=quote(b)) )
> z
function() b + 1
# z is an object of class call so use eval
# to turn it into an object of class expression; however,
# when z is evaluated, the variable a returns.
> eval(z)
function()a+1
Why did a suddenly reappear again
2004 Sep 24
1
algorithm reference for sample() - Knuth
Thank you for the reference to Knuth. Indeed in vol. 2 he has a
> -----Original Message-----
> From: Tony Plate [mailto:tplate@blackmesacapital.com]
> Sent: Friday, September 24, 2004 8:05 AM
> To: Vadim Ogranovich
> Subject: Re: [Rd] algorithm reference for sample()
>
> Have you tried looking in Knuth's books on computer
> algorithms? (They are classics for good reason!) If I
> remember correctly, a colleagu...
2004 Jan 14
2
automatic "paste" filter to paste only the commands from a transcript on the clipboard
Just for fun (and actually because I would use it too) I wrote a
version of the "paste" menu command that assumes the clipboard
contains a transcript, and just pastes the commands from it into
the R console window (Windows GUI only).
So, if something like this:
> foo <-
+ 33
> foo * 3
[1] 99
> foo
[1] 33
is on the clipboard, then the "paste commands" menu
2003 Oct 23
3
what's going on here with substitute() ?
I was trying to create a function with a value computed at creation time,
using substitute(), but I got results I don't understand:
> this.is.R
Error: Object "this.is.R" not found
> substitute(this.is.R <- function() X,
list(X=!is.null(options("CRAN")[[1]])))
this.is.R <- function() TRUE
> # the above expression as printed is what I want for the
2003 Oct 21
5
do.call() and aperm()
Hi everyone
I've been playing with do.call() but I'm having problems understanding it.
I have a list of "n" elements, each one of which is "d" dimensional
[actually an n-by-n-by ... by-n array]. Neither n nor d is known in
advance. I want to bind the elements together in a higher-dimensional
array.
Toy example follows with d=n=3.
f <-
2002 Oct 10
2
tapply for matrices
Does anyone have something like tapply that is extremely fast for matrices when there is a very large number of levels of the grouping variable?
I'm referring to, for example,
tapply(x, grouping.variable, function.operating.on.submatrix)
where x is a matrix and the submatrix is a subset of the rows of x. The grouping variable's length equals the number of rows of x.
--
Frank E
2005 Jun 09
1
single assignment affecting multiple sub-structures (PR#7924)
I'm trying to create a language structure that is a call to a function
with a number of arguments that is only known at run time. I do this by
using repeated indices to expand out a call with a single argument.
However, when I change one of the arguments, all are changed.
I don't see the same behavior when I initially create a call with
multiple arguments.
Even more strangely,
2003 Sep 17
1
Just don't do it, surely? (was RE: Retrieve ... argument values)
Tony, I don't understand what you mean. Could you give
an example?
> -----Original Message-----
> From: Tony Plate [mailto:tplate at blackmesacapital.com]
> > ... I'm not saying "never write functions that use ...",
> >I'm just saying "never write functions that depend on a particular
> >argument being passed via ...".
>
> Several reasons for not following that principle involve proliferation...
2005 May 28
1
(PR#7899) seek(con, 0, "end", rw="r") does not always work
Tony Plate wrote:
> ligges@statistik.uni-dortmund.de wrote:
>
>> tplate@blackmesacapital.com wrote:
>>
>>
>>> I've noticed that seek(con, 0, "end", rw="r") on a file connection
>>> does not always work correctly after a write (R 2.1.0 on Windows).
>>>
>>> [Is a call to fflush() needed inside file_seek() in main/co...
2004 Jun 07
2
strange apparently data-dependent crash with large data (PR#6955)
I'm consistently seeing R crash with a particular large data set. What's
strange is that although the crash seems related to running out of memory,
I'm unable to construct a pseudo-random data set of the same size that also
causes the crash. Further adding to the strangeness is that the crash only
happens if the dataset goes through a save()/load() cycle -- without that,
the
2005 May 26
0
seek(con, 0, "end", rw="r") does not always work correctly (PR#7899)
tplate@blackmesacapital.com wrote:
> I've noticed that seek(con, 0, "end", rw="r") on a file connection does
> not always work correctly after a write (R 2.1.0 on Windows).
>
> [Is a call to fflush() needed inside file_seek() in main/connections.c?]
If you have an idea where to ffl...
2008 Nov 25
1
Problem with installed.packages (PR#13332)
Full_Name: Lars Hansen
Version: 2.8.0
OS: Linux
Submission from: (NULL) (70.90.201.133)
Hi,
Calling installed.packages() on a directory with only one package causes an
error if the priority argument is set to "NA":
> installed.packages(lib.loc = "/home/lhansen/R/libs", priority = "NA")
Error in mat[, "Package"] : incorrect number of dimensions
This
2004 Mar 31
3
Maximum number of connections in R
It appears that the maximum number of connections available
in R is about 48. Can anyone tell me how to bump this number
up? I've been perusing the source, but any info would speed
things up.
Is there a reason that it was set to such a low number?
Thanks for any help.
-Frank
2004 Aug 17
2
Re: Thanks Frank, setting graph parameters, and why social scientists don't use R
...ead.table().
>
>--
>Brian Gough
>
>Network Theory Ltd,
>Publishing the R Reference Manuals --- http://www.network-theory.co.uk/R/base/
>
>
>
>------------------------------
>
>Message: 2
>Date: Sat, 14 Aug 2004 07:42:31 -0600
>From: Tony Plate <tplate at blackmesacapital.com>
>Subject: RE: [R] numerical accuracy, dumb question
>To: MSchwartz at MedAnalytics.com, Dan Bolser <dmb at mrc-dunn.cam.ac.uk>
>Cc: R-Help <r-help at stat.math.ethz.ch>
>Message-ID:
> <6.1.0.6.2.20040814073336.063d4778 at mailhost.blackmesacapital.com>
>C...
2005 May 27
0
seek(con, 0, "end", rw="r") does not always work correctly (PR#7901)
ligges@statistik.uni-dortmund.de wrote:
> tplate@blackmesacapital.com wrote:
>
>
>>I've noticed that seek(con, 0, "end", rw="r") on a file connection does
>>not always work correctly after a write (R 2.1.0 on Windows).
>>
>>[Is a call to fflush() needed inside file_seek() in main/connections.c?]
>
>...
2003 Oct 08
6
Why does a[which(b == c[d])] not work?
Dear list,
I can not understand why the expression in
the subject does not work correct:
> dcrn[which(fn == inve[2])]
numeric(0)
> inve[2]
[1] 406.7
> dcrn[which(fn == 406.7)]
[1] 1.3994e-07 1.3988e-07 1.3953e-07 1.3966e-07 1.3953e-07 1.3968e-07
Is this a kick self problem or an bug?
Thaks very much
Thomas
2004 Mar 17
3
unit testing framework for R?
In a quick search of the R website just now, I found no mention of
a unit testing framework for R. I hope to find something
in the style of Java's JUnit, or Python's unittest. Is such a
thing available?
Thanks,
- Paul Shannon
Institute for Systems Biology
Seattle
2005 Feb 22
1
bug? quantile() can return decreasing sample quantiles for increasing probabilities
Is it a bug that quantile() can return a lower sample quantile for a higher
probability?
> ##### quantile returns decreasing results with increasing probs (data at
the end of the message)
> quantile(x2, (0:5)/5)
0% 20% 40% 60% 80%
-0.0014141174 -0.0009041968 -0.0009041968 -0.0007315023 -0.0005746115
100%
0.2905596324
>
2005 May 19
0
problems with truncate() with files > 2Gb under Windows (PR#7880)
...eek fseeko64
#define f_tell ftello64
#else
#define f_seek fseek
#define f_tell ftell
#endif
#endif
Windows support for > 2Gb files seemed flaky, but we did not think it was
R's job to report OS deficiencies.
I've now used off64_t in file_seek under Windows.
On Thu, 19 May 2005 tplate@blackmesacapital.com wrote:
> This message relates to handling files > 2Gb under Windows. (I use 2Gb
> as shorthand for 2^31-1 -- the largest integer representable in a signed
> 32 bit integer.)
>
> First issue: truncate() is not able to successfully truncate files at a
> position > 2Gb....
2003 Oct 31
4
Array Dimension Names
I would like to reference array dimensions by name in an apply and a summary
function. For example:
apply(x, "workers", sum)
Is there a better way to do this than creating a new attribute for the array
and then creating new methods for apply and summary? I don't want to name
the individual elements of each dimension (such as with dimnames) but rather
name the dimensions. Thanks