similar to: Lattice question.

Displaying 20 results from an estimated 10000 matches similar to: "Lattice question."

2008 Nov 03
2
Multiple plots on multiple devices
Hi List, This is possibly a newbie error. I have however searched long and hard and haven't found a solution. I am attempting to plot multiple lattice graphs in R, plotting 4 per page and moving on to a new device to plot the next 4 and so on. (I want to do this in R and not export to a pdf etc) I notice that in S-PLUS multiple tabs are opened in one device, R does not seem to have this
2007 Aug 08
1
Binary Search
Hi! R is an amazing piece of software and with so many libraries it can do almost anything... but I was very surprised that a standard "binary search" function seems not to exist. I can find other much more highly-complex search routines (optimize, uniroot, nlm) in the standard no-extra-packages-loaded version of R, but not this simple alternative. I searched and found an
2008 Jan 07
1
How to rearrange lattice graphics output?
My question arises when I use levelplot graphics. For example, levelplot(z~x*y|fg) where fg is a factor with three levels of 'a','b','c'. The panels come out in a default order. I would like to rearrange the panels in a manner of 'c','b','a'. I used fg<-ordered(fg, levels=c('c','b','a')) But the panels are still the
2008 Nov 04
1
problem with plot style (pch) with lattice in legend
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20081104/b667d8da/attachment.pl>
2007 Aug 31
2
Problem of vocabulary : retrieve element of a list of a list
Hi, I read the posts for 2 hours and ?list and tried many comninations but I haven't found the answer to this basic question. So I decided to post my question even if it is a silly one ... What is the instruction to retrieve, for example, the "D" of the first list ? Thanks in advance, Ptit Bleu. > x<-list(LETTERS[1:5], LETTERS[10:20]) > x [[1]] [1] "A"
2007 Aug 22
3
Help with vector gymnastics
Hello, What is the best way of solving this problem? answer <- ifelse(tf=TRUE, i * 5, previous answer) where as an initial condition tf[1] <- TRUE For example if, tf <- c(T,F,F,F,T,T,F) over i = 1 to 7 then the output of the function will be answer = 5 5 5 5 25 30 30 Thank you. Phil,
2008 Nov 20
1
Repost:lattice graphics -- legend color problems
Hello R-folks, I don't get the color of the legend in a lattice-plot right. I select a palette from RColorBrewer and use (with a col = mypalette argument) it in the barchart plot. The resulting graph shows the new palette in the graph, but uses the standard palette in the legend rectangles. Adding a col argument into auto.key uses the new palette with the legend text, but not in the
2008 Oct 19
3
pairs plots in R
Hi, is there a way to take a data frame with 100+ columns and large data set to do efficient exploratory analysis in R with pairs? I find using pairs on the whole matrix is slow and the resulting matrix is tiny. Also the variable of interest for me is a binary var Y or N . Is there an efficient way to graphically view many variable relationships that does not look teeny ? I could do
2008 Dec 21
1
Trouble with 'smooth' using xyplot in lattice
Hello, I am fairly new to R am stumped on how to get the xyplot function in the lattice package to produce a scatter plot of count data versus time, such that the count data represent 8 different groups, and the plot produced has 8 unique "smoothed" lines for the different groups. This is the closest I can get to the desired plot: xyplot(masmean ~ mas, data = Pre96CR.masmeans, groups
2007 Aug 19
2
Does anyone else think this might be worth a warning?!?
Hi, I was *very* surprised by this little trick for new players: mean() only considers its first argument! > mean(1,1,2) [1] 1 > mean(2,1,1) [1] 2 I found this very different behaviour to max(): > max(1,1,2) [1] 2 > max(2,1,1) [1] 2 Perhaps this is the wrong list to ask, but does anyone else think this a little on the interesting side? Is it not possible to detect a
2008 Jul 29
1
How to set the parameters in Trellis Graphics (by Lattice package)
Dear R users I plot the trellis graphics by using the lattice package. Everything is OK. Now, I want set some parameters of the trellis graphics. 1. The tick label site. By default, only two tick labels had been output in x-axis of my plot. I want output four or five tick labels. In the traditional graphics system, it will be very easy. Just not output the axis in plot by use the parameter
2009 Jan 04
1
Lattice xyplot help please.
Hi - I am not R expert and I would appreciate your time if you can help me about my xyplot question. I would like to add text (p-value) in a 4 panels xyplot. I thought panel = function{} should work but I am not sure where I did it wrong. The error message from the following code is "Argument subscripts is missing with no default values" xyplot(GLG ~ PD | factor(TRT) , groups =
2011 Aug 31
2
Getting the values out of histogram (lattice)
Hi, ? I have a relatively big dataset and I want to construct some histograms using the histogram function in lattice. One thing I am interested in is to look at differences between density and percent. I know I can use the hist function but it seems that this function gives sometimes some wrong answers and the density is actually a percent since it is calculated as counts in the bin divided by
2008 Feb 14
1
{lattice/grid} "Error using packet 1" and traceback
On some errors during the plot of a lattice/grid graphics, there is written a message like "Error using packet 1: missing value where TRUE/FALSE needed" into the concering panel and the next panel is plotted. Which option I could use to stop the execution to have a look at the error by a traceback? Regards - Wolfram
2010 Dec 01
2
How to draw a rect() behind a hist() ?
Hi, I have the following code: hist(gps$heartpercent, breaks=5) rect(90, par("usr")[3], 100, par("usr")[4], col = "red") How do I get the rectangle to appear behind the histogram. Barring that, how can I make certain bars of the histogram to be a certain color? Thanks, Jason
2007 Sep 10
1
overlay lattice histograms with goodness-of-fit pdfs
Hello, I am new to R exploratory data analysis and plotting. Is anyone aware of a way to overlay a set of conditional histograms with conditional PDFs? Below, I generate a lattice plot of precipitation histograms based on different months and stations, given a subset of the dataset: histogram(~ data | month * station, data = sta.stack[sta.stack[,"type"]=="precip" &
2010 Aug 13
1
Lattice: Superimposing histograms with different colors and transparency effects
Dear users, I would like to plot several histograms superimposed on the same panel with different colors, with superimposed polygons appearing with transparency effects. I also want estimated densities to appear on the same plot. For several reasons, including that I like it, I want to use the lattice package. I have several questions regarding the use of the 'histogram' function with a
2007 Jul 25
1
how to use "replace" for efficiency
Hi I think I have been struggling to use replace correctly, I usually work my way around this using a loop, but I think this is in fact inefficient. I have a dataset with runoff from three plots and associated rainfall. However either the datarecording was sloppy, or the rainfall very patchy. So I am trying to remove data from my dataset for which the runoff is larger than the rainfall on the
2011 Apr 29
4
plot several histograms with same y-axes scaling using hist()
Dear all Problem: hist()-function, scale = ?percent? I want to generate histograms for changing underlying data. In order to make them comparable, I want to fix the y-axis (vertical-axis) to, e.g., 0%, 10%, 20%, 30% as well as to fix the spaces, too. So the y-axis in each histogram should be identical. Currently, I have 100 histograms and the y-axis scales changes in each. Here is my code:
2008 Oct 08
2
Histogram colours in lattice.
I am trying to do a histogram lattice plot and I would like the histogram to be filled with a different colour in each panel. Note: I want every bar in each histogram to be the same colour, but that there should be different colours *between* histograms. Can't seem to get this to work. I thought that something like the following would be a goer: set.seed(42) X <- rnorm(200) A <-