Re: [R] histogram fill lattice

2012-06-15 Thread Powell, Jeff
Thank you for your response, I will try to be clearer.  I would like to fill my 
lattice histogram bars using a symbol rather than a color.  If that is not 
possible, then I will use hist() instead.

From trellis.par.get()
bar.fill only includes col, so perhaps I'm out of luck?

With regards,
Jeff

-Original Message-
From: David Winsemius [mailto:dwinsem...@comcast.net] 
Sent: woensdag 13 juni 2012 16:40
To: Powell, Jeff
Cc: R-help@r-project.org
Subject: Re: [R] histogram fill lattice


On Jun 13, 2012, at 9:55 AM, Powell, Jeff wrote:


 Dear all,

 I would like to change the fill pattern of a histogram using
 histogram() in the lattice package.  I know how to do so using hist(), 
 but would prefer to stay within lattice.

 dt1 - rnorm(100,0,1)

 hist(dt1, density=3, angle=45)


I get diagonal striping.


 library(lattice)
 histogram(dt1,
   xlab = Histogram of rnorm(0,1),
   type = count,
   breaks = 15,
   col = grey)

I seem to remember that the diagonal hatched fills were disabled or not brought 
over to lattice from base S graphics because they were thought to be causing 
cognitive distortions[1,2]. You already seem to be able to specify the color of 
the fill, and it's easy to get alternating colored fills with col = 
c(grey,red) ,  so it's not entirely clear what your unsatisfied goals are.

--
David Winsemius, MD
West Hartford, CT

1] 
http://markmail.org/message/pmrrpjynrcnrwhg5?q=list:org%2Er-project%2Er-help+lattice+hatching
2] 
http://markmail.org/message/cj23tnsgsobs4mbu?q=list:org%2Er-project%2Er-help+lattice+hatching

__
R-help@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.


[R] histogram fill lattice

2012-06-13 Thread Powell, Jeff

Dear all,

I would like to change the fill pattern of a histogram using histogram() in 
the lattice package.  I know how to do so using hist(), but would prefer to 
stay within lattice.

dt1 - rnorm(100,0,1)

hist(dt1, density=3, angle=45)


library(lattice)
histogram(dt1,
   xlab = Histogram of rnorm(0,1),
   type = count,
   breaks = 15,
   col = grey)


With regards,
J. Powell





[[alternative HTML version deleted]]

__
R-help@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.


[R] Loading data into a list of environments

2008-05-31 Thread Powell, Jeff
Dear All,

Thanks to an answer which I received from a previous post, I'm now able to 
create a series of
environments using the following: 

  nmes - c(en1, en2, en3)
  for(i in nmes) assign(i, new.env(parent = .GlobalEnv))

My next question is how, using load, can I automatically place data into each 
of these
newly created environments.

The following, and variations thereof, does not work:

  nmes - c(en1, en2, en3)
  for(i in nmes) load(file = /home/testData/Data.RData, i)

I've tried, among other attempts, to use as.environment(i) without success.  
My i is seen
as a character, but I want it to be seen as the environment which it 
represents.  

Kind regards,
J.Powell

LEI
Visserij
Alexanderveld 5
2585 DB Den Haag
The Netherlands

__
R-help@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.


[R] Creating a series of new environments

2008-05-30 Thread Powell, Jeff
Dear All,
 
I would like to automate the creation of new environments.  
 
What I currently do to create environments is the following:  
 
en1 - new.env(parent = .GlobalEnv)
en2 - new.env(parent = .GlobalEnv)
en3 - new.env(parent = .GlobalEnv)
...
 
I would like to be able to do something like the following:
nms - c(en1, en2, en3, ...)
 
for(i in nms) i - new.env(parent = .GlobalEnv)
 
This, contrary to what I desire, creates a new environment named i for
the length of the nms object.  
 
 
Kind regards and thank you,
J. Powell
 
LEI
Visserij 
Alexanderveld 5
2585 DB Den Haag
Nederland




[[alternative HTML version deleted]]

__
R-help@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.