Displaying 15 results from an estimated 15 matches for "wildhagen".
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 Jun 20
2
Problem with "date"-x-axis in lattice
Hello list,
i am trying to plot a continous variable y against a "date" variable, both
in one dataframe named "df", using a code like this
library(lattice)
plot1<-xyplot(y~date, data=df, type="b")
"date" is of class "Date", of course, format="%d.%m.%Y", and spans two
calendar years. The problem is that the x-axis is labeled with
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)
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
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")
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)
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 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
(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
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
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)),
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
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 <-
2008 Jul 03
1
ggplot2: scaling and tick mark of x-axis
Dear list,
i am trying to plot data in a way like this:
Date<-seq(as.Date("2006-08-29"), as.Date("2007-08-28"), by="2 weeks")
var<-rnorm(27, 10000, 2500)
err<-rnorm(27, 3000, 1000)
df<-data.frame(cbind(Date, var, err))
library(ggplot2)
g <- ggplot(df, aes(x=Date, y=var,
min=(var - err), max=(var + err)))
g1 <- g + geom_line() + geom_point() +
2012 Oct 19
0
Lattice bwplot: Adding mean with panel.points fails in vertical arrangement
Dear collegues,
given a structure of data like this:
###### Data ###########################
set.seed(100)
a <- rnorm(60,10,3)
s <- c(rep("A",20),rep("B",20),rep("C",20))
p <- c(rep("d",6),rep("e",6),rep("f",6),rep("g",6),rep("h",6))
df <- data.frame(a,s,p)
i would like to draw a lattice bwplot in