Hi
r-help-boun...@r-project.org napsal dne 03.02.2010 02:54:46:
> Let's look at your data frame:
>
> > str(daily.sub1)
> 'data.frame': 9 obs. of 4 variables:
> $ Trial: Factor w/ 1 level "2": 1 1 1 1 1 1 1 1 1
> $ Tanks: Factor w/ 3 levels "a4","c4","h4": 1 1 1 2 2 2 3 3 3
> $ Day : Facto
Don't need to convert the factors to numeric as that will happen
automatically. See below. However as Rolf pointed out they will be
numbered from 1-4 even though only 3 are left in the subset as all 4
levels are maintained. So the snippet below will work as long as you
specify 4 possible pch
Let's look at your data frame:
> str(daily.sub1)
'data.frame': 9 obs. of 4 variables:
$ Trial: Factor w/ 1 level "2": 1 1 1 1 1 1 1 1 1
$ Tanks: Factor w/ 3 levels "a4","c4","h4": 1 1 1 2 2 2 3 3 3
$ Day : Factor w/ 9 levels "10","11","12",..: 4 5 6 7 8 9 1 2 3
$ Wgt : Factor w/ 9 levels
Initial email:
Here is a runable program. When I plot Day and Wgt, it graphs all the data
points. All I need is daily.sub1 plotted. I also need each "Tanks" to have
its own col or pch. When I run it with the line with pch, it gives me
nothing.
rm(list=ls())
Trial<-rep(c(1,2),each=12)
Tanks=rep
What did you ***expect*** or hope to get out of
``c(2,19,21)[Tanks]''
Please note that this expression makes no sense at all as it stands.
You apparently want to use plotting symbols 2, 19, and 21 respectively,
depending in some way upon the value in ``Tanks''. Since you have
sp
I tried the following and still could not get it to work. I understand your
logic, but cannot get this to work.
rm(list=ls())
Trial<-rep(c(1,2),each=12)
Tanks=rep(c("a3","a4","c4","h4"),each=3,2)
Day=rep(c(1:12),2)
Wgt=c(1:24)
daily<-cbind(Trial, Tanks, Day, Wgt)
daily
daily.sub<-subset(daily, su
The problem is with attach. You should have seen an error that the
objects are aliased. You have Tanks in your workspace and in the
attached dataframe. It is using the one in your workspace which is not a
factor variable. Try:
c(2,19,21)[Tanks]
with(daily.sub1,c(2,19,21)[Tanks])
Avoid att
On 2/2/2010 2:51 PM, Marlin Keith Cox wrote:
> Here is a runable program. When I plot Day and Wgt, it graphs all the data
> points. All I need is daily.sub1 plotted. I also need each "Tanks" to have
> its own col or pch. When I run it with the line with pch, it gives me
> nothing.
DF <- data.f
Here is a runable program. When I plot Day and Wgt, it graphs all the data
points. All I need is daily.sub1 plotted. I also need each "Tanks" to have
its own col or pch. When I run it with the line with pch, it gives me
nothing.
rm(list=ls())
Trial<-rep(c(1,2),each=12)
Tanks=rep(c("a3","a4","c
create a subset for "brook_dis". When I plot (week, R) I get a nice
boxplot, but along the x axis, there are weeks a, b, c along with h and
nh.
Thank you ahead of time. keith
rm(list=ls())
cond.exp1<-read.csv("condition/test.csv",header=TRUE)
sub<-subset(cond.exp1, Species=="brook_d
10 matches
Mail list logo