similar to: Problem with "date"-x-axis in lattice

Displaying 20 results from an estimated 10000 matches similar to: "Problem with "date"-x-axis in lattice"

2009 May 18
9
Concatenating two vectors into one
Dear users, a very simple question: Given two vectors x and y x<-as.character(c("A","B","C","D","E","F")) y<-as.factor(c("1","2","3","4","5","6")) i want to combine them into a single vector z as A1, B2, C3 and so on. z<-x*y is not working, i tried several others
2008 Jul 28
2
axis.break on Date-x-axis in lattice xyplot
Dear list, i am using the following code to produce  a lattice xyplot, but the axis.break-function is seemingly not executed. Date<-seq(as.Date("2006-08-29"), as.Date("2007-08-28"), by="2 weeks") Period<- var1<-rnorm(27, 90000000, 30000000) var2<-rnorm(27, 500000000,250000000) var3<-rnorm(27, 1000000,500000) var4<-rnorm(27, 600000,300000)
2008 Jul 10
2
xYplot customizing y-axis scaling
Dear list, using the packages Hmisc and lattice i produced some nice xYplots. However, since the data range of the conditioning variable is very big, i need to define more than one y-scale for the plot (in some panels you just see a flat line of data points very close to the x-axis), e.g. different y-axis scales for the different rows of the plot. Is there a way to do so? Thanks, Henning
2008 Jul 16
2
barchart with bars attached to y=0-line
Dear R users, i am using the following code to produce barcharts with lattice: Compound<-c("Glutamine", "Arginine", "Glutamate", "Glycine", "Serine", "Glucose", "Fructose", "Raffinose", "Glycerol", "Galacglycerol", "Threitol", "Galactinol", "Galactitol")
2009 Apr 08
1
Tinn-R pdf()
Dear R and Tinn-R users, i recently switched to Tinn-R and sending code to R works fine (R 2.8.1, Tinn-R 2.2.0.2, OS Windows XP). However, i encountered a problem when trying to send plots to pdf files like this: library(lattice) pdf("plot1.pdf") PLOT<-(xyplot, ...) PLOT dev.off() The file "plot1.pdf" is created, but it is empty. If i paste the code above directly into
2009 Jan 16
1
(no subject)
Dear users, i just installed the lastest version of R, 2.8.1 on my computer (OS Windows XP). Then i tried to update the packages copied from my old R version by >update.packages(ask=F) However i get the following warning: "Warning: unable to access index for repository http://cran.ch.r-project.org/bin/windows/contrib/2.8 Warning: unable to access index for repository
2008 Aug 04
1
xyplot strip=function for two conditioning variables
Dear list, for a data structure like in df: set.seed(100) Treatment<-rep(c("Nitrogen","Carbon", "Sulfur"),each=9) week<-rep(c(1,5,9),3,each=3) genes<-rep(c("18s", "EF1b", "NR"),9) copies<-rnorm(27, 1000000,400000) df<-data.frame(Treatment,week,genes,copies) i wrote this code for a xyplot: library(lattice)
2010 Dec 06
2
ggplot2: Controlling line width of panel borders
Dear R-users, i encountered some problems when trying to adjust the line width of the axes and stripes in a plot created with ggplot2. I use the "barley" dataset of the lattice package to illustrate my problem: library(ggplot2) library(lattice) barley[["SD"]] <- 5 limits <- aes(ymax=barley$yield + barley$SD,ymin=barley$yield - barley$SD) p1 <-
2009 May 08
2
postscript()-resolution
Dear users, another question concerning graphics for publications. My favourite journal wants .eps-graphics, and from older postings i adapted the following code: postscript(file="Figure1.eps", title="Figure 1", width=11.5, height=8, paper="a4",onefile=FALSE) However,  when checking the properties of this file, it is a .ps and not a .eps file. So, i konverted to
2011 Jul 21
6
Lattice: place ticks only on y-axis
I am using lattice for a bar plot, having a little trouble removing ticks, tick labels from x-axis, but keeping them on the y-axis. I looked around quite a bit (http://tolstoy.newcastle.edu.au/R/e7/help/09/06/1733.html, help pages, etc), tried variations of "scales = list(alternating = c(0,0)", "scales = list(alternating = c(0,0), tck = c(0,0))" and others, couldn't quite
2010 Nov 30
2
Error bars in lattice barchart with groups
Dear R-users, i want to plot gene regulation data in a lattice barchart. To illustrate the problem i encounter, the following code uses the "barley"dataset: library(lattice) barley[["SD"]] <- 5 PLOT <- barchart(data=barley, yield~variety|site, groups=year,origin=0, as.table=TRUE, scales=list(x=list(relation="same", rot=30), y=list(alternating=3,tck=-1)),
2011 Jul 22
2
Lattice: distance of Y-axis label from plot
Basic question: I looked around quite a bit, still having a little trouble manipulating the distance between the Y-axis label and the plot. In this case, I would like to move the Y axis title closer to the plot. # Data tC <- textConnection(" Time Type1 Type2 Type3 1.3 .50 .10 .40 4.5 .45 .20 .35 5.2 .40 .30 .30 ") data1 <- read.table(header=TRUE, tC) data2 <-
2008 Jul 18
1
t-test for multiple variables
Dear list, i try to do my first statistics with R. Given a dataframe of three columns, where col1 is of type factor, col 2 and col3 are numeric and pairs of observations i would like to perform a paired t-test for each level of col1. I would like to avoid specifying the levels of col1 manually because it seems to me as being stupid, however, i did not figure out how to tell it R in an
2009 Jan 16
1
Updating packages under R 2.8.1
Dear users, i just installed the lastest version of R, 2.8.1 on my computer (OS Windows XP). Then i tried to update the packages copied from my old R version by >update.packages(ask=F) However i get the following warning: "Warning: unable to access index for repository http://cran.ch.r-project.org/bin/windows/contrib/2.8 Warning: unable to access index for repository
2013 Feb 25
3
How to plot 2 continous variables on double y-axis with 2 factors: ggplot2, gplot, lattice, sciplot?
Hi, I have a data set with two continous variables that I want to plot MEANS (I am not intrerested in median values) on a double-y graph. I also have 2 factors. I want the factor combinations plotted in different panes. Dummy dataset: mydata <- data.frame(factor1 = factor(rep(LETTERS[1:3], each = 40)), factor2 = factor(rep(c(1:4), each = 10)), y1 =
2004 Sep 09
2
Skipping panels in Lattice
Dear all, I wish to generate a lattice boxplot which skips an empty cell in a design. I have trawled r-help, scruitinized xyplot(lattice) help page, and merrily reproduced examples of using skip from a couple of previous r-help queries and the example given in Pinheiro & Bates. But I must be missing something... Here's an example (running R 1.9.1 on Win2k): # generate some data df1
2008 Sep 19
1
Lines between panels in lattice
Hello, I have a multi-page display each consisting of two-panels above each other. I need to draw a line from the top panel to bottom panel. Using current.vpTree() i find that "plot1.panel.1.2.vp" and "plot1.panel.1.1.vp" are the top and bottom ones respectively. I am using the following code(inspired by Paul Murrell's R Graphics) to draw a line. (All the
2008 Jan 12
2
Lattice equivalent of par(mfrow = )
Dear r-helpers, Does anyone have a straightforward example of putting together three unrelated (expect for a common y-axis) xyplot() figures in what would be in base graphics a par(mfrow = c(1, 3)) arrangement? _____________________________ Professor Michael Kubovy University of Virginia Department of Psychology USPS: P.O.Box 400400 Charlottesville, VA 22904-4400 Parcels: Room 102
2007 May 31
4
Aggregate to find majority level of a factor
I want to use the aggregate function to summarize data by a factor (my field plots), but I want the summary to be the majority level of another factor. For example, given the dataframe: Plot1 big Plot1 big Plot1 small Plot2 big Plot2 small Plot2 small Plot3 small Plot3 small Plot3 small My desired result would be: Plot1 big Plot2 small Plot3 small I
2009 Sep 01
4
Date format in plot
Hello, I plot the abundance of a species in relation to the date. To have the date as a continous variable I put it in the format "standard" in excel (f.ex. 39939 means 06.05.2009). R uses 39939 on the x axis, but I would like to have "06.05". I tried to use as.Date as suggested in some discussion but I don't manage to use it, the returned date is not correct. Do you have