search for: bvsc

Displaying 18 results from an estimated 18 matches for "bvsc".

Did you mean: bvec
2011 May 03
2
Overlapping x axes using Lattice
...10)) age<-as.factor(rep(c(1,2,3,4),c(5,5,5,5))) pesti<-data.frame(titre,test,age) histogram(~pesti[,1]|pesti[,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 of Agriculture and Forestry Phone 04 894 5600 Fax 04 894 4973 Mobile 029 894 5611 Postal address: Investigation and Diagnostic Centre- Wallaceville Box 40742 Ward St Upper Hutt Thi...
2008 Jun 06
3
R loop
...y,date) a$wk<-rep(c(0),nrow(a)) a 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<-1}else if (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 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 40742 Ward St Upper Hutt ######...
2008 May 06
3
Spatial join between two datasets using x and y co-ordinates
...me(x2,y2) dat1 dat2 The aim of the join is to produce: x1 y1 descript 1 1824615 5980732 cat 2 1823650 5983220 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 Forestry Phone 04 894 5600 Fax 04 894 4973 Mobile 029 894 5611 Postal address: Investigation and Diagnostic Centre- Wallaceville Box 40742 Ward St Upper Hutt ###...
2009 Mar 17
3
Combining columns from two dataframes
..."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") a;b I have tried: append(a,b) combine(a,b) rbind(a,b) 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 address: Investigation and Diagnostic Centre- Wallaceville Box 40742 Ward St Upper Hutt ######...
2003 Sep 17
2
CART analysis
Greetings, Does anyone know of an R code for classification and regression tree analysis (CART)? Thank you Ron Ron Thornton BVSc, PhD, MACVSc (pathology, epidemiology) Programme Co-ordinator, Active Surveillance Animal Biosecurity MAF Biosecurity Authority P O Box 2526 Wellington, New Zealand phone: 64-4-4744156 027 223 7582 fax: 64-4-474-4133 e-mail: ron.thornton at maf.govt.nz http://www.maf.govt.nz
2009 Apr 01
4
Recode of text variables
...t;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 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 40742 Ward St Upper Hutt ######...
2009 Apr 01
1
Adjusting font size in a lattice graph
...attice graph but the text appears too big. Just wondering if there was a way I could change the font size. tp1.nDai=xyplot(value ~ yr | Name, data = nDai,type = 'o') update(tp1.nDai, aspect = c(0.8), layout = c(4, 4)) 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 address: Investigation and Diagnostic Centre- Wallaceville Box 40742 Ward St Upper Hutt ######...
2010 Feb 14
1
Adding a regression line to an xyplot
...(rep(1,5),rep(2,5))) d=data.frame(a,b,c) xyplot(a~b, pch=c(6,8),data = tavg, groups=d$c, reg.line=lm, smooth=FALSE, 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 > 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 4074...
2009 Apr 14
2
Subset function: selecting variables within a factor
...to select a list of variables within a factor The following example is given in help for subset: subset(airquality, Temp > 80 select = c(Ozone, Temp)) So how do I select all temperatures of 90 and 80 ie Temp = 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 address: Investigation and Diagnostic Centre- Wallaceville Box 40742 Ward St Upper Hutt ######...
2006 Feb 22
1
Degree of freedom for contrast t-tests in lme
...answers in the web so let me ask a question on lme. When I have a fixed factor of, say, three levels (A, B, C), in which each level has different size (i.e. no. of observations; e.g. A>B>C). When I run an lme model, I get the same degree of freedom for all the contrast t-tests (e.g. AvsB or BvsC). I have tried this to several data sets but the same thing happened. Whatever sample size I have in different levels (in a fixed factor), I get the same degree of freedom for t-tests. Why is this? Is this how mixed-effects model work? Does this mean that if I have unbalanced design, results from...
2011 May 17
1
Dealing with null values Aggregate function
...lue","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; v1=5) and blue (v1=49.5; v2=55) Thank you in advance. 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 40742 Ward St Upper Hutt Thi...
2008 May 11
1
Finding unmatched data between two dataframe using several factors
...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(?) == FALSE) ? setdiff(dat1$x,dat2$y) Any thoughts would be great 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 address: Investigation and Diagnostic Centre- Wallaceville Box 40742 Ward St Upper Hutt ######...
2011 Nov 21
1
Lattice graph help
...5, 25, 35, 45, 55)) heif=data.frame(n,Breed, Test, Titer) x=barchart( heif[,4]~ heif[,1]| heif[,3]+ heif[,2] ,ylab="titer", layout = c(2,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, Wallaceville | PO Box 40 742 | Upper Hutt | New Zealand Telephone: 64-4-894 5611 | Facsimile: 64-4-894 4973| Mobile: 027-733-1791 | Web: www.maf.govt.nz...
2008 May 13
1
Legend in scatterplot and adding regression lines
...nel.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 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 40742 Ward St Upper Hutt ######...
2008 Mar 06
2
R code for selecting places spatially and by time
...),c(2,2,2,2,1,1) ) y<-rep(c(6476767,6475013,6475487,6479659,6477004,6476388),c(2,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 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 40742 Ward St Upper Hutt ######...
2008 Apr 16
0
Instantaneous hazard of an event i.e. death
...ting confidence limits around the hazard for each year. I would also like to present this data graphically. I think in theory I should be able to use: the "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 894 5600 Fax 04 894 4973 Mobile 029 894 5611 Postal address: Investigation and Diagnostic Centre- Wallaceville Box 40742 Ward St Upper Hutt ######...
2008 Nov 11
0
Producing a matrix of values
...a[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 MVS BVSc Incursion Investigator Investigation & Diagnostic Centres - Wallaceville Biosecurity New Zealand Ministry of Agriculture and Forestry ######################################################################## This email message and any attachment(s) is intended solely for the addressee(s) na...
2011 Nov 22
0
Lattice graph strips and axes
...hart( 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 Andrew McFadden MVS BVSc | Veterinary Epidemiologist, Investigation and Diagnostic Centre | Biosecurity New Zealand Ministry of Agriculture and Forestry | 66 Ward St, Wallaceville | PO Box 40 742 | Upper Hutt | New Zealand Telephone: 64-4-894 5611 | Facsimile: 64-4-894 4973| Mobile: 027-733-1791 | Web: www.maf.govt.nz...