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?
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-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.
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]]
__
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
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
6 matches
Mail list logo