[Rcolony-commits] r14 - pkg/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Apr 23 12:26:16 CEST 2009


Author: jonesor
Date: 2009-04-23 12:26:16 +0200 (Thu, 23 Apr 2009)
New Revision: 14

Modified:
   pkg/man/categoricalxy.Rd
   pkg/man/plotsibs.Rd
   pkg/man/rcolony-package.Rd
Log:
Corrected .Rd file for categoricalxy plot.

Modified: pkg/man/categoricalxy.Rd
===================================================================
--- pkg/man/categoricalxy.Rd	2009-04-22 16:13:48 UTC (rev 13)
+++ pkg/man/categoricalxy.Rd	2009-04-23 10:26:16 UTC (rev 14)
@@ -4,7 +4,7 @@
 \title{A function to plot 2 dimensional categorical data as presence/absence or with frequency.}
 
 \description{
-This function plots 2 dimensional categorical data (e.g. individual's ID) to show presence/absence or frequency.
+This function produces a plot for two-dimensional categorical data (e.g. individual's ID) to show presence/absence or frequency for each category.
 The resulting plot is a chequer-board with each square representing a pairwise observation. 
 The square can provide further information on (for example) frequency by colouring and/or by the inclusion of text.
 
@@ -18,7 +18,7 @@
   \item{my.data}{A dataframe with 3 columns. The first two columns should be categorical variables (coded as factors), while the third should indicate another dimension such as frequency.}
   \item{freqlabs}{Should the values of the z dimension (the 3rd column in my.data) be included as text: TRUE/FALSE}
   \item{colscheme}{Colour scheme: options are "heat" (heatmap colours) or "greyscale" (greyscale colours. Any other input will result in black squares with a grey background.}
-  \item{poly.border}{Defines the borders around the individual squares in the plot. See \code{polygon}}
+  \item{poly.border}{Defines the borders around the individual squares in the plot. See \code{\link{polygon}} for further details}
   \item{axes.cex}{Controls the size of the axis labels.}
 }
 
@@ -30,13 +30,10 @@
   A categorical x-y plot.
 }
 
-\references{ ~put references to the literature/web site here ~ }
+\references{}
 \author{Owen R. Jones}
-\note{ ~~further notes~~ 
-
- ~Make other sections like Warning with \section{Warning }{....} ~
-}
-\seealso{ ~~objects to See Also as \code{\link{help}}, ~~~ }
+\note{}
+\seealso{\code{\link{get.colony.data}},\code{\link{get.parentage}}}
 \examples{
 
 
@@ -45,7 +42,14 @@
 categoricalxy(foo,freqlabs=TRUE)
 
 
+data(testdata)
+x<-get.parentage(testdata)
+categoricalxy(x,colscheme="heat",axes.cex=0.5)
+
+
+
+}
+
 % Add one or more standard keywords, see file 'KEYWORDS' in the
 % R documentation directory.
 \keyword{ aplot }
-\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line

Modified: pkg/man/plotsibs.Rd
===================================================================
--- pkg/man/plotsibs.Rd	2009-04-22 16:13:48 UTC (rev 13)
+++ pkg/man/plotsibs.Rd	2009-04-23 10:26:16 UTC (rev 14)
@@ -1,94 +1,42 @@
 \name{plotsibs}
 \alias{plotsibs}
 %- Also NEED an '\alias' for EACH other topic documented here.
-\title{ ~~function to do ... ~~ }
+\title{ A function to plot the sibships (full and half-sibs) in an x-y style plot. }
 \description{
-  ~~ A concise (1-5 lines) description of what the function does. ~~
-}
+This function plots the estimated sibships from Colony data. Both the x and y axis represent individuals in the population and points indicate a sibship assignment between individuals x and y.
 \usage{
 plotsibs(colony.object, maintitle = "sibships", prob = 0.8, pairwise = FALSE)
 }
 %- maybe also 'usage' for other objects documented here.
 \arguments{
-  \item{colony.object}{ ~~Describe \code{colony.object} here~~ }
-  \item{maintitle}{ ~~Describe \code{maintitle} here~~ }
-  \item{prob}{ ~~Describe \code{prob} here~~ }
-  \item{pairwise}{ ~~Describe \code{pairwise} here~~ }
+  \item{colony.object}{ A list object derived from the colony data (\code{\link{get.colony.data}}). }
+  \item{maintitle}{ The plot's title. }
+  \item{prob}{ Assignment probability threshold. The probability of sibship must be greater than this value to be included in the plot.}
+  \item{pairwise}{ TRUE/FALSE: should pairwise sibship estimates be used. (TRUE= pairwise, FALSE=full likelihood) }
 }
 \details{
-  ~~ If necessary, more details than the description above ~~
+Full sibships are given in the upper part of the plot, and half-sibships are given in the lower part. The data can be derived from pairwise methods, or from the full likelihood method.}
 }
 \value{
-  ~Describe the value returned
-  If it is a LIST, use
-  \item{comp1 }{Description of 'comp1'}
-  \item{comp2 }{Description of 'comp2'}
-  ...
+  A plot showing sibships.
 }
 \references{ ~put references to the literature/web site here ~ }
-\author{ ~~who you are~~ }
-\note{ ~~further notes~~ 
-
- ~Make other sections like Warning with \section{Warning }{....} ~
+\author{Owen R. Jones}
+\note{
 }
 \seealso{ ~~objects to See Also as \code{\link{help}}, ~~~ }
 \examples{
-##---- Should be DIRECTLY executable !! ----
-##-- ==>  Define data, use random,
-##--	or do  help(data=index)  for the standard data sets.
+data(testdata)
+plotsibs(testdata,maintitle="Sibships (paiwise)",pairwise=TRUE)
 
-## The function is currently defined as
-function(colony.object,maintitle="sibships",prob=0.8,pairwise=FALSE){
-	 
-	 #Get full and half sibship data.
-if(pairwise==FALSE){	
-sibs<-colony.object$sibs}else{
-sibs<-colony.object$pairwise.sibs
-sibs$Probability<-rep(1,dim(sibs)[1])}
 
-	
-alloffspring<-colony.object$offspring	
-alloffspring$offspring.numID<-as.numeric(alloffspring$offspring.numID)
+plotsibs(testdata,maintitle="Sibships (full)",pairwise=FALSE)
 
-	 #Apply the numeric ID to the sibship data.
-	 sibs<-merge(sibs,alloffspring,by.x="OffspringID1",by.y="offspringID",sort=FALSE)
-	 names(sibs)[names(sibs)=="offspring.numID"]<-"OffspringID1.num"
-	 
-	 sibs<-merge(sibs,alloffspring,by.x="OffspringID2",by.y="offspringID",sort=FALSE)
-	 names(sibs)[names(sibs)=="offspring.numID"]<-"OffspringID2.num"
-	 sibs$OffspringID1.num<-as.numeric(sibs$OffspringID1.num)
-	 sibs$OffspringID2.num<-as.numeric(sibs$OffspringID2.num)
-	 
-	 
-	 #Set up the plot area.
-	 plot(sibs$OffspringID1.num,sibs$OffspringID2.num,type="n",axes=FALSE,xlab="Offspring X",ylab="Offspring Y")
-	 axis(1,at=alloffspring$offspring.numID,labels=alloffspring$offspringID,las=2)
-	 axis(2,at=alloffspring$offspring.numID,labels=alloffspring$offspringID,las=2)
-	 
-	 polygon(c(0,1.05*max(alloffspring$offspring.numID),1.05*max(alloffspring$offspring.numID)),c(0,0,1.05*max(alloffspring$offspring.numID)),col="#FF669930",border=NA)
-	 polygon(c(0,0,1.05*max(alloffspring$offspring.numID)),c(0,1.05*max(alloffspring$offspring.numID),1.05*max(alloffspring$offspring.numID)),col="#33CCFF30",border=NA)
-	 
-	 legend("topleft","Full Sib",bty="n")
-	 legend("bottomright","Half Sib",bty="n")
-	 
-	 title(main=maintitle)
-	 
-	 #Plot the data.
-	 hs<-subset(sibs,type=="Half"&Probability>prob)
-	 for (i in 1:dim(hs)[1]){
-		 #If Halfsib, then put the greater number first
-		 if(hs[i,5]>hs[i,6]){points(hs[i,5],hs[i,6],pch=16,col="#33CCFF98")}else{points(hs[i,6],hs[i,5],pch=16,col="#33CCFF98")}
-		 }
-	 
-	 fs<-subset(sibs,type=="Full"&Probability>prob)
-	 for (i in 1:dim(fs)[1]){
-		 #If Halfsib, then put the greater number first
-		 if(fs[i,5]<fs[i,6]){points(fs[i,5],fs[i,6],pch=16,col="#FF669998")}else{points(fs[i,6],fs[i,5],pch=16,col="#FF669998")}
-		 }
-	 
-	 }
+
+
 }
 % Add one or more standard keywords, see file 'KEYWORDS' in the
 % R documentation directory.
+
 \keyword{ ~kwd1 }
 \keyword{ ~kwd2 }% __ONLY ONE__ keyword per line

Modified: pkg/man/rcolony-package.Rd
===================================================================
--- pkg/man/rcolony-package.Rd	2009-04-22 16:13:48 UTC (rev 13)
+++ pkg/man/rcolony-package.Rd	2009-04-23 10:26:16 UTC (rev 14)
@@ -3,20 +3,16 @@
 \alias{rcolony}
 \docType{package}
 \title{
-What the package does (short line)
-~~ package title ~~
-}
+Tools for implementation and visualisation of Colony and its outputs.}
 \description{
-More about what it does (maybe more than one line)
-~~ A concise (1-5 lines) description of the package ~~
-}
+The RColony package provides tools for the implementation of the Colony pedigree analysis software. In addition it provides tools for visualising, and summarising the results of the Colony analyses.}
 \details{
 \tabular{ll}{
 Package: \tab rcolony\cr
 Type: \tab Package\cr
-Version: \tab 1.0\cr
+Version: \tab 0.1\cr
 Date: \tab 2009-04-16\cr
-License: \tab What license is it under?\cr
+License: \tab GNU General Public License (GPL)\cr
 LazyLoad: \tab yes\cr
 }
 ~~ An overview of how to use the package, including the most important functions ~~



More information about the Rcolony-commits mailing list