Re: [R] Trapping option settings

2012-07-18 Thread David A Vavra
Thanks. Also helpful. DAV -Original Message- From: William Dunlap [mailto:wdun...@tibco.com] Sent: Wednesday, July 18, 2012 4:20 PM To: David A Vavra; 'jim holtman' Cc: r-help@r-project.org Subject: RE: [R] Trapping option settings Try using trace(), as in trace(opti

Re: [R] Trapping option settings

2012-07-18 Thread David A Vavra
it a try. DAV -Original Message- From: jim holtman [mailto:jholt...@gmail.com] Sent: Monday, July 16, 2012 9:59 PM To: David A Vavra Cc: r-help@r-project.org Subject: Re: [R] Trapping option settings Here is one way by redefining 'options' so you can check for 'width' a

[R] Trapping option settings

2012-07-16 Thread David A Vavra
Something has been changing the setting the width option to 1 and not resetting it. It does this intermittently. What I would like to do is trap changing the setting so I can determine where the change is occurring and hopefully fix it. Is there any easy way to do this? __

Re: [R] step function stops with "subscript out of bounds"

2012-05-17 Thread David A Vavra
it in an environment in the search path. DAV -Original Message- From: Prof Brian Ripley [mailto:rip...@stats.ox.ac.uk] Sent: Thursday, May 17, 2012 6:46 AM To: David A Vavra Cc: r-help@r-project.org Subject: Re: [R] step function stops with "subscript out of bounds"

[R] step function stops with "subscript out of bounds"

2012-05-17 Thread David A Vavra
I've been having a problem using the step function to evaluate models. I've simplified the code and get the same problem using the dataset Titanic. The relevant code and output is below. The problem disappears (i.e., 'step' runs correctly) if I rerun the code but change the 'loglm' call to explicit

Re: [R] Effeciently sum 3d table

2012-04-16 Thread David A Vavra
not be any faster than a really well written loop, but will probably be faster (both to write the command and to run) than a poorly designed naive loop application. On Mon, Apr 16, 2012 at 12:52 PM, David A Vavra wrote: > Thanks Greg, > > I think this may be what I'm after but th

Re: [R] Effeciently sum 3d table

2012-04-16 Thread David A Vavra
onday, April 16, 2012 4:55 PM To: David A Vavra Cc: r-help@r-project.org Subject: Re: [R] Effeciently sum 3d table On Apr 16, 2012, at 4:04 PM, David A Vavra wrote: >> even now you _could_ be clearer > > I fail to see why it's unclear. > >>> I'm after T1 + T2

Re: [R] Effeciently sum 3d table

2012-04-16 Thread David A Vavra
FUN <- match.fun(FUN) dots <- list(...) answer <- .Call("do_mapply", FUN, dots, MoreArgs, environment(), PACKAGE = "base") ... etc. -Original Message- From: Bert Gunter [mailto:gunter.ber...@gene.com] Sent: Monday, April 16, 2012 4:13 PM To

Re: [R] Effeciently sum 3d table

2012-04-16 Thread David A Vavra
lliam Dunlap [mailto:wdun...@tibco.com] Sent: Monday, April 16, 2012 3:26 PM To: David A Vavra; 'Bert Gunter' Cc: r-help@r-project.org Subject: RE: [R] Effeciently sum 3d table > Example in partial code: > > Env <- CreatEnv() # my own function > Assign('fin

Re: [R] Effeciently sum 3d table

2012-04-16 Thread David A Vavra
Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Monday, April 16, 2012 3:26 PM To: David A Vavra Cc: 'Petr Savicky'; r-help@r-project.org Subject: Re: [R] Effeciently sum 3d table On Apr 16, 2012, at 2:43 PM, David A Vavra wrote: > Thanks Petr, > > I'm

Re: [R] Effeciently sum 3d table

2012-04-16 Thread David A Vavra
s[!dovec]), SIMPLIFY = SIMPLIFY, USE.NAMES = USE.NAMES)) } DAV -Original Message- From: Bert Gunter [mailto:gunter.ber...@gene.com] Sent: Monday, April 16, 2012 3:07 PM To: David A Vavra Cc: r-help@r-project.org Subject: Re: [R] Effeciently sum 3d table David: 1. My first name is Bert.

Re: [R] Effeciently sum 3d table

2012-04-16 Thread David A Vavra
know what that means and implies. I'm sure I'll understand it once I know what it is trying to say. :) There's an item in the examples which may be exactly what I'm after. DAV -Original Message- From: Greg Snow [mailto:538...@gmail.com] Sent: Monday, April 16, 2012

Re: [R] Effeciently sum 3d table

2012-04-16 Thread David A Vavra
g] On Behalf Of Petr Savicky Sent: Monday, April 16, 2012 11:07 AM To: r-help@r-project.org Subject: Re: [R] Effeciently sum 3d table On Mon, Apr 16, 2012 at 10:28:43AM -0400, David A Vavra wrote: > I have a large number of 3d tables that I wish to sum > Is there an efficient way to do this?

Re: [R] Effeciently sum 3d table

2012-04-16 Thread David A Vavra
for a more elegant and hopefully more efficient solution. Greg's suggestion for using reduce seems in order but as yet I'm unfamiliar with the function. DAV -Original Message- From: Bert Gunter [mailto:gunter.ber...@gene.com] Sent: Monday, April 16, 2012 12:42 PM To: Greg Snow C

[R] Effeciently sum 3d table

2012-04-16 Thread David A Vavra
I have a large number of 3d tables that I wish to sum Is there an efficient way to do this? Or perhaps a function I can call? I tried using do.call("sum",listoftables) but that returns a single value. So far, it seems only a loop will do the job. TIA, DAV _

[R] Add grid lines to levelplot

2012-01-16 Thread David A Vavra
I'm using the levelplot function in the lattice package. I am plotting a grid of cells and I want grid lines drawn between cells. I've spent a lot of time trying different options. I've also looked at panel.levelplot. The border parameter seems to be ignored or it doesn't mean cell border color.

Re: [R] Indexing multi-dimensional table

2011-12-22 Thread David A Vavra
>From: William Dunlap [mailto:wdun...@tibco.com] >You can build the 2nd argument to do.call with alist() instead. >alist() produces a list that you can use c() and subscripting on >to add or modify arguments. It is usually better to encapsulate >this sort of thing in a function like extract() tha

Re: [R] Indexing multi-dimensional table

2011-12-22 Thread David A Vavra
> (This does imply you knew the number of dimensions was 3.) Yes, at run time. >It looks as though the Nulls became 0's. So if you wanted to use >do.call(`[` then this succeeds: > do.call(`[`, list(tbl, x, 1:dim(tbl)[2], 1:dim(tbl)[3]) ) ... >As does this using the "empty comma" approach: >

[R] Indexing multi-dimensional table

2011-12-22 Thread David A Vavra
I want to take slices of a multi-dimensional table (or array) without knowing the number of dimensions in advance. As a test I tried using (in this example a 3d table): do.call(`[`, list(tbl, x,NULL,NULL)] where I built the list on the fly. It works great as long as I only want th

Re: [R] Unintended loading of package:datasets

2009-05-10 Thread David A Vavra
PM To: David A Vavra Cc: r-help@r-project.org Subject: Re: [R] Unintended loading of package:datasets On 11/05/2009, at 9:17 AM, David A Vavra wrote: > The dataset package is being loaded apparently by one of the > packages that I > am using. The loading of the datasets takes a long t

[R] Unintended loading of package:datasets

2009-05-10 Thread David A Vavra
The dataset package is being loaded apparently by one of the packages that I am using. The loading of the datasets takes a long time and I would like to eliminate it. I thought the datasets were effectively examples so don't understand why they would be required at all. 1) How can I determine what