[R] plot() change unit length

2008-08-04 Thread Qian R
I am try to plot a data frame, and encounter some difficulties.   my x axis range is from -60 to 80 and unit length is 10 so x axis looks like   -60, -40, -20, .., 40,60,80   But I want chang unit length from 10 to 5   -60, -50, -40, .., 60,70,80   Does anyone know how to do it?  

[R] use variable value as vector name

2008-07-09 Thread Qian R
Here is my problem   a <- data$name[1]  b <- data$name[2] c <- data$name[3]   a "apple" b "pear" c "banana"   result  <- c( a = 2 , b=3, c=5)   output: a  b c 2  3 5   But I want my output apple  pear  banana 2 3 5 [[alternative HTML version deleted]] __

[R] plot( )

2008-05-09 Thread Qian R
__ 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] substring

2008-05-06 Thread Qian R
I have a data frame such as Name DISC1_5916 DABC2_789 ABCD_1234 I want to substring column Name so that DISC1 DABC2 ABCD ... Thanks. - [[elided Yahoo spam]] [[alternative HTML version deleted]] __

[R] panel.xyplot()

2008-04-29 Thread Qian R
I am try to create a plot using xyplot(). I created a function panel.fun() wich generate segment, but I need use two columns from dataset2. library(lattice) panel.fun <- function(x, y, minx, maxx, miny, maxy) { panel.xyplot(x,y) # since I don't know how to call dataset2 inside panel

[R] lattice panle.segment()

2008-04-28 Thread Qian R
I am try to create a plot using xyplot(). I created a function panel.fun() wich generate segment, but I need use two columns from dataset2. library(lattice) panel.fun <- function(x, y, minx, maxx, miny, maxy) { panel.xyplot(x,y) # since I don't know how to call dataset2 inside panel