[R] Lattice: Feature Request

David Winsemius dwinsemius at comcast.net
Sat Mar 12 05:44:05 CET 2011


On Mar 11, 2011, at 3:00 PM, Jim Price wrote:

> Thanks Peter.
>
> This is true, but consider this continuation of my example (which is
> probably what I should have written originally):
>
>
> my.opts <- list(default.args = list(
>                       as.table = TRUE,
>                                    between = list(x = 0.2, y = 0.2),
>                       scales = list(alternating = 1, tck = c(1, 0),  
> col =
> 'black') # Illustrative, doesn't do anything
>                ))
>
>
> oldopts <- lattice.options(my.opts)
>
> useOuterStrips(xyplot(
>                      resp ~ time | subject * var,
>                      data = temp
>                      ))
>
> lattice.options(oldopts)
>
>
> If the scales option worked like as.table, aspect, etc, then I  
> wouldn't need
> to use a default.scales call per xyplot. Just trying to remove some  
> typing
> from each call that I make.

You might want to look at the modifyList {utils} function.

Searching for a specific example produces (among others):

http://finzi.psych.upenn.edu/R/Rhelp02/archive/105880.html
http://finzi.psych.upenn.edu/Rhelp10/2010-November/261390.html

-- 
David.
>
> Jim.
>
>
>
> Peter Ehlers wrote:
>>
>> On 2011-03-10 15:07, Jim Price wrote:
>> New feature not needed. You'll notice that the 'Details'
>> section of ?xyplot says, regarding lattice.options:
>>
>>   Default values can be set in this manner for the following
>>   arguments: as.table, aspect, between, page, main, sub,
>>   par.strip.text, layout, skip and strip.
>>
>> No mention of 'scales'. But xyplot has an argument
>> 'default.scales' which you can set globally:
>>
>>  def.scal <- list(alternating = 1, tck = c(1, 0))
>>
>> and then add this
>>
>>  default.scales = def.scal
>>
>> to the arguments in your xyplot call.
>>
>>
>> Peter Ehlers
>>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Lattice-Feature-Request-tp3347040p3348949.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list