Hi all
Perhaps this is torturous methodology. I was trying to use lattice to produce a
barchart showing the number positive and negative over time. I wasn't quite
sure how create a different colour for values of arbo$Ikeda in the example
below ie red for ikeda and green for neg.
library(resha
Titer)
x=barchart( Titer ~ n | Test+Breed, data=heif,
layout = c(2,4),between = list(y = c(0.5),x = c(0.5)),scales = list(x =
list(alternating = 1, tck = c(1,0)),
y = list(alternating = 1, tck = c(1,0))), xlab = "count (n)", ylab = "titer")
useOuterStrips(x)
Kind regards
,2), scales=list(x=list(at=c(seq(0, 60, by = 15)),tick.number=c(5),
labels=c(seq(0, 60, by = 15
)
useOuterStrips(x)
Kind regards
Andrew McFadden MVS BVSc | Veterinary Epidemiologist,
Investigation and Diagnostic Centre | Biosecurity New Zealand
Ministry of Agriculture and Forestry | 66 Ward St, Wall
ot;red","red","red","red","blue","blue","blue","blue","bl
ue","blue"))
aggregate(x = testDF, by = list(testDF$v3), FUN = "mean")
For this example I would like to get a mean value for red (v1=4.5; v
esti[,2]+ pesti[,3]
,alternating=TRUE,tick.number=1,
stack=TRUE,type = "count", xlab="VNT",rot=c(180,180),draw=FALSE)
Thank you in advance.
Andy
Andrew McFadden MVS BVSc
Incursion Investigator
Investigation & Diagnostic Centres - Wallaceville Biosecurity New
Zealand Ministry o
Thanks, yes that does the trick, sorry inadvertently left the "tavg" in
my example. I haven't used the panel function before looks like it maybe
useful. Really appreciate your help.
regards
Andrew McFadden MVS BVSc | Incursion Investigator (animals),
Investigation and Di
ALSE, type=c("p","g"),xlab="a",ylab="b")
> I would appreciate your help.
>
> Kind regards
>
> andy
>
> Andrew McFadden MVS BVSc
> Incursion Investigator
> Investigation & Diagnostic Centres - Wallaceville Biosecurity New
&g
Hey Thomas Thanks mate
I knew there had to be an easy answer. Thanks for coming to my rescue.
Regards
Andrew McFadden MVS BVSc | Incursion Investigator (animals),
Investigation and Diagnostic Centre | Biosecurity New Zealand
Ministry of Agriculture and Forestry | 66 Ward St, Wallaceville
= c(80,90)
I would appreciate your help.
Kind regards
andy
Andrew McFadden MVS BVSc
Incursion Investigator
Investigation & Diagnostic Centres - Wallaceville Biosecurity New
Zealand Ministry of Agriculture and Forestry
Phone 04 894 5600 Fax 04 894 4973 Mobile 029 894 5611 Postal
","A")
x
recode(x, "c(A,B)='Treat 1'; else='Treat 2'")
recode(x, "1:2='A'; 3='B'")
In Microsoft access a simple way of recoding is to join two tables in a
query any simple way of doing the same in R?
Kind regards
Andy
And
ards
andy
Andrew McFadden MVS BVSc
Incursion Investigator
Investigation & Diagnostic Centres - Wallaceville Biosecurity New
Zealand Ministry of Agriculture and Forestry
Phone 04 894 5600 Fax 04 894 4973 Mobile 029 894 5611 Postal address:
Investigation and Diagnostic Centre- Wallaceville Box
ot;2008-08-14"
,
"2008-08-14","2008-09-20"), format = "%Y-%m-%d"),c(1:6))
names(a)=c("a","b")
a
b<- data.frame(as.Date(c("2008-07-27","2008-10-01"), format =
"%Y-%m-%d"),c(1:2))
names(b)=c("c","d&
.sna[src, des] = tra[i, 3] :
subscript out of bounds
There is something wrong with the highlighted code. I know that there
must be some descrepancy in the numbers of values I am using but don't
know why or how to fix it.
Thanks for your help in advance.
Kind regards
andy
Andrew McFadden M
set<-as.Date(c("2008-01-01"), format = "%Y-%m-%d")
set
for(i in a$date){
if (a$date[i]>set & a$date[i]set +7){a$wk<-2}else {a$wk<-3}
}
a
Kind regards
andy
Andrew McFadden MVS BVSc
Incursion Investigator
Investigation & Diagnostic Centres - Wallaceville B
panel=panel.superpose ,xlab="Time
(weeks)",ylab="Farrowing rate", key = list(points =
Rows(trellis.par.get("superpose.symbol"), 1:4),
text = list(levels(Dataset$Operator)),
columns = 4))
Regards
Andy
Andrew McFadden MVS BVSc
Incursio
, "zane"),z=c(10,20,30,40,50))
dat2
I would like to know data that from dat2 that doesn't appear in dat1
based on both the x and y factors ie (A5, dan, 40) and (A6,zane, 50).
I have tried two approaches but have not been successful
? nomatch <- subset(dat1, is.element(?
dog
And therefore limit the data in dataset 1 to that which has the same x
and y co-ordinates as dataset 2.
Any suggestions?
Regards
Andy
Andrew McFadden MVS BVSc
Incursion Investigator
Investigation & Diagnostic Centres - Wallaceville Biosecurity New
Zealand Ministry of Agriculture and
"hazard.ratio.plot" but
lack the experience to know how to code this
Anyone be able to help?
Regards
Andrew
Andrew McFadden MVS BVSc
Incursion Investigator
Investigation & Diagnostic Centres - Wallaceville Biosecurity New
Zealand Ministry of Agriculture and Forestry
Phone 04 89
Hi all
I am trying to determine the distances between two datasets of x and y
points. The number of points in dataset One is very small i.e. perhaps
5-10. The number of points in dataset Two is likely to be very large
i.e. 20,000-30,000. My initial approach was to append the first dataset
to the
,2,2,2,1,1)
)
date<-as.character(rep(as.Date(c("2008-01-02","2008-01-17","2008-01-01")
,format = "%Y-%m-%d"),c(4,4,2)))
cbind(x,y,date)
Regards
Andrew
Andrew McFadden MVS BVSc
Incursion Investigator
Investigation & Diagnostic Centres - Wallaceville Biosecur
Hi There
I am a new user of "R" and having a few problems
a<-c("2001-02-1","NA","NA")
a<-as.Date(a,format = "%Y-%m-%d")
b<-c("2001-03-1","2001-03-2","2001-03-3")
b<-as.Date(b,format = "%Y-%m-%d")
c<-data.frame(a,b)
I would like to write an if statement where if "a" is not null return
"a", if
21 matches
Mail list logo