[Vennerable-commits] r17 - in pkg/Vennerable: R inst/doc man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jul 21 23:12:42 CEST 2009


Author: js229
Date: 2009-07-21 23:12:41 +0200 (Tue, 21 Jul 2009)
New Revision: 17

Added:
   pkg/Vennerable/man/SetLabelPositions-methods.Rd
Modified:
   pkg/Vennerable/R/AWFE.R
   pkg/Vennerable/R/FourEllipses.R
   pkg/Vennerable/inst/doc/Venn.Rnw
   pkg/Vennerable/man/StemCell.Rd
   pkg/Vennerable/man/Venn-class.Rd
   pkg/Vennerable/man/Venn.Rd
   pkg/Vennerable/man/VennDiagrams.Rd
   pkg/Vennerable/man/VennDrawing-class.Rd
   pkg/Vennerable/man/VennThemes.Rd
   pkg/Vennerable/man/Vennerable-internal.Rd
Log:
fix documentation warnings

Modified: pkg/Vennerable/R/AWFE.R
===================================================================
--- pkg/Vennerable/R/AWFE.R	2009-07-19 09:19:41 UTC (rev 16)
+++ pkg/Vennerable/R/AWFE.R	2009-07-21 21:12:41 UTC (rev 17)
@@ -2,8 +2,12 @@
 compute.AWFE <- function(V,doWeights=FALSE,type="battle") {
 	if(doWeights) { warning("Weights ignored by AWFE algorithm") }
 	n <- NumberOfSets(V)
-	loaded <- data(VennDiagrams,package="Vennerable")
+	# load from cached data, into an environment so we can persuade RCMD check
+	# we have it
+	env <- new.env()
+	loaded <- data(VennDiagrams,package="Vennerable",envir=env)
 	stopifnot("VennDiagrams" %in% loaded)
+	VennDiagrams <- get("VennDiagrams",env=env)
 	if (! type %in% names(VennDiagrams)) {
 		stop(sprintf("No AWFE diagram of type %s known\n",type))
 	}

Modified: pkg/Vennerable/R/FourEllipses.R
===================================================================
--- pkg/Vennerable/R/FourEllipses.R	2009-07-19 09:19:41 UTC (rev 16)
+++ pkg/Vennerable/R/FourEllipses.R	2009-07-21 21:12:41 UTC (rev 17)
@@ -8,8 +8,10 @@
 compute.E4 <- function(V,doWeights=FALSE,s=.25,dx=0.2) {
 	if (doWeights) { warning("Cant do a weighted E4") }
 	if (NumberOfSets(V) != 4) { stop("fournotfour")}
-	loaded <- data(VennDiagrams,package="Vennerable")
+	env <- new.env()
+	loaded <- data(VennDiagrams,package="Vennerable",envir=env)
 	stopifnot("VennDiagrams" %in% loaded)
+	VennDiagrams <- get("VennDiagrams",env=env)
 	type <- "ellipses"
 	if (! type  %in% names(VennDiagrams)) {
 		stop(sprintf("No diagram of type %s cached\n",type))

Modified: pkg/Vennerable/inst/doc/Venn.Rnw
===================================================================
--- pkg/Vennerable/inst/doc/Venn.Rnw	2009-07-19 09:19:41 UTC (rev 16)
+++ pkg/Vennerable/inst/doc/Venn.Rnw	2009-07-21 21:12:41 UTC (rev 17)
@@ -7,7 +7,7 @@
 makeme <- function() {
 	if ("package:Vennerable" %in% search())detach("package:Vennerable")
 	library(weaver)
-	setwd("C:/JonathanSwinton\\Vennerable\\inst\\doc")
+	setwd("C:/JonathanSwinton/Vennerable/pkg/Vennerable/inst/doc")
 	Sweave(driver="weaver","Venn.Rnw",stylepath=FALSE,use.cache=FALSE)
 }
 makeme()

Added: pkg/Vennerable/man/SetLabelPositions-methods.Rd
===================================================================
--- pkg/Vennerable/man/SetLabelPositions-methods.Rd	                        (rev 0)
+++ pkg/Vennerable/man/SetLabelPositions-methods.Rd	2009-07-21 21:12:41 UTC (rev 17)
@@ -0,0 +1,24 @@
+\name{SetLabelPositions-methods}
+\docType{methods}
+\alias{SetLabelPositions-methods}
+\alias{SetLabelPositions,CircleDrawing-method}
+\alias{SetLabelPositions,SquareDrawing-method}
+\alias{SetLabelPositions,VennDrawing-method}
+\title{Suggested locations for plotting labels for set boundaries}
+\description{
+ These methods all return a data.frame containing, with one row for each Set,
+a label text, a position and horizontal and vertical justification.
+The \code{CircleDrawing} and \code{SquareDrawing} classes are partly defined
+as inheriting from the \code{VennDrawing} class so they can override this function.
+This technique of defining a new class and overriding the display function
+is the only current user-level mechanism to modify the position of set labels.
+
+The algorithms used are fairly crude. 
+}
+\section{Methods}{
+\describe{
+\item{object = "CircleDrawing"}{Above the highest point of each circle. (Actually the class override is only done so this can be computed from the centre and radius alone).   }
+\item{object = "SquareDrawing"}{For 2 sets, left justify the label of the left-most set, and right-justify that of the right-most }
+\item{object = "VennDrawing"}{ Above the highest point of each set boundary. }
+}}
+\keyword{methods}

Modified: pkg/Vennerable/man/StemCell.Rd
===================================================================
--- pkg/Vennerable/man/StemCell.Rd	2009-07-19 09:19:41 UTC (rev 16)
+++ pkg/Vennerable/man/StemCell.Rd	2009-07-21 21:12:41 UTC (rev 17)
@@ -10,21 +10,16 @@
 }
 \usage{data(StemCell)}
 \format{
-  The format is:
-List of 4
- $ OCT4 : chr [1:623] "AASDH" "ABTB2" "ACCN4" "ACD" ...
- $ SOX2 : chr [1:1279] "182-FIP" "AASDH" "ABCA5" "ABCB10" ...
- $ NANOG: chr [1:1687] "13CDNA73" "AASDH" "ABCA5" "ABCB10" ...
- $ E2F4 : chr [1:1273] "76P" "7h3" "AAMP" "AATF" ...
+A named list with four elements named \code{OCT4}, \code{SOX2}, \code{NANOG} and \code{E2F4}.
+Each element is a character vector containing the names of 600-1700 associated genes.
 }
-\details{
-}
 \source{
 Taken from supplementary information in Boyer et al, "Core transcriptional regulatory circuitry in human embryonic stem cells",
 \emph{Cell}, 2005, 122:947--956, \code{10.1016/j.cell.2005.08.020},\url{http://www.ncbi.nlm.nih.gov/pubmed/16153702}.
 }
 
 \examples{
+library(Vennerable)
 data(StemCell)
 plot(Venn(Sets=StemCell),type="squares",doWeights=FALSE)
 }

Modified: pkg/Vennerable/man/Venn-class.Rd
===================================================================
--- pkg/Vennerable/man/Venn-class.Rd	2009-07-19 09:19:41 UTC (rev 16)
+++ pkg/Vennerable/man/Venn-class.Rd	2009-07-21 21:12:41 UTC (rev 17)
@@ -11,13 +11,12 @@
 \title{Class "Venn"}
 \description{A class for intersecting multiple sets together}
 \section{Objects from the Class}{
-Objects can be created by calls of the form \code{new("Venn", ...)}.
-	 ~~ describe objects here ~~ 
+Objects should be created by calls to the function \code{\link{Venn}}
 }
 \section{Slots}{
 	 \describe{
-    \item{\code{IndicatorWeight}:}{Object of class \code{"matrix"} ~~ }
-    \item{\code{IntersectionSets}:}{Object of class \code{"list"} ~~ }
+    \item{\code{IndicatorWeight}:}{Object of class \code{"matrix"}  }
+    \item{\code{IntersectionSets}:}{Object of class \code{"list"}. This may be empty. }
   }
 }
 \section{Methods}{
@@ -29,9 +28,7 @@
     \item{show}{\code{signature(object = "Venn")}: ... }
 	 }
 }
-\references{ ~put references to the literature/web site here ~ }
-\author{ Jonathan Swinton jonathan at swintons.net }
-\note{ ~~further notes~~ }
+\author{ Jonathan Swinton (jonathan at swintons.net) }
 
 \examples{
 showClass("Venn")

Modified: pkg/Vennerable/man/Venn.Rd
===================================================================
--- pkg/Vennerable/man/Venn.Rd	2009-07-19 09:19:41 UTC (rev 16)
+++ pkg/Vennerable/man/Venn.Rd	2009-07-21 21:12:41 UTC (rev 17)
@@ -3,7 +3,6 @@
 \alias{Venn}
 \alias{Weights}
 \alias{Weights<-}
-%- Also NEED an '\alias' for EACH other topic documented here.
 \title{Construct intersections of sets}
 \description{
 Given a collection of Sets, \code{Venn} will compute all possible 
@@ -23,61 +22,19 @@
 	Ignored if \code{Sets} is present.}
   \item{SetNames}{A character vector of names for each Set. Ignored if \code{Sets} present and has names}
   \item{numberOfSets}{An integer for the number of Sets. Ignored if  \code{Sets} or \code{SetNames} present.}
-  \item{Venn}{An object of class \code{Venn}}
   \item{object}{An object of class \code{Venn}}
   \item{value}{An object like \code{Weight}}
 }
 \value{An object of class \code{Venn}}
-\author{Jonathan Swinton jonathan at swintons.net}
+\author{Jonathan Swinton (jonathan at swintons.net)}
 \examples{
-##---- Should be DIRECTLY executable !! ----
-##-- ==>  Define data, use random,
-##--	or do  help(data=index)  for the standard data sets.
+Venn(n=3)
+data(StemCell)
+w <- Venn(Sets=StemCell[1:2])
+Weights(w)
+# nb order of intersection subsets not guaranteed
+Weights(w) <- 1:4
+Venn(SetNames=letters[1:5])
 
-## The function is currently defined as
-function (Sets, Weight, SetNames, numberOfSets) 
-{
-    if (!missing(Sets)) {
-        if (is.null(names(Sets)) & !missing(SetNames)) {
-            names(Sets) <- SetNames
-        }
-        return(VennFromSets(Sets))
-    }
-    if (missing(numberOfSets)) {
-        numberOfSets <- if (missing(SetNames)) 
-            0
-        else length(SetNames)
-    }
-    if (missing(SetNames)) {
-        SetNames <- seq_len(numberOfSets)
-    }
-    if (numberOfSets == 0) {
-        Indicator <- matrix(nrow = 0, ncol = 0)
-    }
-    else {
-        Indicator <- (data.matrix(do.call(expand.grid, lapply(seq(1, 
-            length = numberOfSets), function(x) {
-            c(0, 1)
-        })))) == 1
-    }
-    rownames(Indicator) <- apply((Indicator), 1, function(x) {
-        paste(as.numeric(x), collapse = "")
-    })
-    colnames(Indicator) <- SetNames
-    if (missing(Weight)) {
-        Weight <- rep(1, nrow(Indicator))
-    }
-    else if (length(Weight) > 0 & length(Weight) < nrow(Indicator) & 
-        is.null(names(Weight))) {
-        stop("Weight length does not match number of intersections")
-    }
-    if (is.null(names(Weight))) {
-        names(Weight) <- rownames(Indicator)
-    }
-    IndicatorWeight <- cbind(Indicator, .Weight = Weight[rownames(Indicator)])
-    new("Venn", IndicatorWeight = IndicatorWeight)
-  }
 }
-% Add one or more standard keywords, see file 'KEYWORDS' in the
-% R documentation directory.
 \keyword{ graphs}

Modified: pkg/Vennerable/man/VennDiagrams.Rd
===================================================================
--- pkg/Vennerable/man/VennDiagrams.Rd	2009-07-19 09:19:41 UTC (rev 16)
+++ pkg/Vennerable/man/VennDiagrams.Rd	2009-07-21 21:12:41 UTC (rev 17)
@@ -3,14 +3,18 @@
 \alias{VennDiagrams}
 \docType{data}
 \title{
-Stem cell data
+Predrawn Venn diagrams.
 }
 \description{
-Data on the geometrical structure of various types of Venn diagrams
+Precomputed data on the geometrical structure of various types of Venn diagrams.
 }
 \usage{data(VennDiagrams)}
-\format{}
+\format{A list with elements named \code{battle},\code{AWFEscale},\code{AWFE},
+and \code{ellipses}. Each element is itself a list in which the nth element, if not \code{NULL}, is an object of 
+class \code{TissueDrawing} representing an example of an unweighted Venn diagram on n sets of the given type.
+}
 \details{
+This is really a device to cache the diagrams and is not for direct use. Use eg \code{compute.Venn(Venn(n=...),type=...} which returns a plottable object of class \code{VennDrawing} instead.
 }
 \source{
 Created by the \code{buildVennDiagrams()} function within \code{Vennerable}

Modified: pkg/Vennerable/man/VennDrawing-class.Rd
===================================================================
--- pkg/Vennerable/man/VennDrawing-class.Rd	2009-07-19 09:19:41 UTC (rev 16)
+++ pkg/Vennerable/man/VennDrawing-class.Rd	2009-07-21 21:12:41 UTC (rev 17)
@@ -6,7 +6,6 @@
 \alias{IntersectionMidpoints,VennDrawing-method}
 \alias{plot,VennDrawing,missing-method}
 \alias{PlotUniverse,VennDrawing-method}
-\alias{SetLabelPositions,VennDrawing-method}
 \alias{show,VennDrawing-method}
 \alias{UniverseRange,VennDrawing-method}
 \alias{VisibleRange,VennDrawing-method}
@@ -16,9 +15,9 @@
 \title{Class "VennDrawing" }
 \description{A geometrical representation of a Venn diagram suitable for display}
 \section{Objects from the Class}{
-Objects can be created by calls of the form \code{new("VennDrawing",V,TD)
+Objects can be created by calls of the form \code{new("VennDrawing",V,TD)}
 where \code{V} is an object of class \code{Venn} and \code{TD} is an object of class \code{TissueDrawing} which
-has representations for all the Sets and Faces corresponding to the sets and intersections of the \code{V} object.}.
+has representations for all the Sets and Faces corresponding to the sets and intersections of the \code{V} object.
 
 As well as bringing together the geometric and set-theoretic properties of the Venn diagram,
 this class stores information about the universe in which to display the diagram and provides
@@ -27,12 +26,12 @@
 \section{Slots}{
 	 \describe{
     \item{\code{universe}:}{A \code{"matrix"} with the $x$ and $y$ coordinates of the bounding universe. Currently assumed to have 2 rows by much of the code, corresponding to the lower left and upper right corners of a bounding rectangle}
-    \item{\code{setList}:}{See \code{\link{TissueDiagram-class}}  }
-    \item{\code{nodeList}:}{See \code{\link{TissueDiagram-class}} }
-    \item{\code{recentChanges}:}{See \code{\link{TissueDiagram-class}}}
-    \item{\code{edgeList}:}{See \code{\link{TissueDiagram-class}} }
-    \item{\code{faceList}:}{See \code{\link{TissueDiagram-class}}}
-    \item{\code{faceSignature}:}{See \code{\link{TissueDiagram-class}} }
+    \item{\code{setList}:}{See \code{\link{TissueDrawing-class}}  }
+    \item{\code{nodeList}:}{See \code{\link{TissueDrawing-class}} }
+    \item{\code{recentChanges}:}{See \code{\link{TissueDrawing-class}}}
+    \item{\code{edgeList}:}{See \code{\link{TissueDrawing-class}} }
+    \item{\code{faceList}:}{See \code{\link{TissueDrawing-class}}}
+    \item{\code{faceSignature}:}{See \code{\link{TissueDrawing-class}} }
     \item{\code{IndicatorWeight}:}{See \code{\link{Venn-class}}}
     \item{\code{IntersectionSets}:}{See \code{\link{Venn-class}} }
   }
@@ -49,13 +48,12 @@
     \item{IntersectionMidpoints}{\code{signature(object = "VennDrawing")}: ... }
     \item{plot}{\code{signature(x = "VennDrawing", y = "missing")}: ... }
     \item{PlotUniverse}{\code{signature(object = "VennDrawing")}: ... }
-    \item{SetLabelPositions}{\code{signature(object = "VennDrawing")}: ... }
     \item{show}{\code{signature(object = "VennDrawing")}: ... }
     \item{UniverseRange}{\code{signature(object = "VennDrawing")}: ... }
     \item{VisibleRange}{\code{signature(object = "VennDrawing")}: ... }
 	 }
 }
-\author{ Jonathan Swinton jonathan at swintons.net }
+\author{ Jonathan Swinton (jonathan at swintons.net) }
 
 
 \examples{

Modified: pkg/Vennerable/man/VennThemes.Rd
===================================================================
--- pkg/Vennerable/man/VennThemes.Rd	2009-07-19 09:19:41 UTC (rev 16)
+++ pkg/Vennerable/man/VennThemes.Rd	2009-07-21 21:12:41 UTC (rev 17)
@@ -17,11 +17,11 @@
 An object of class \code{VennDrawing}
 }
   \item{colourAlgorithm}{
-Missing or one of \code{signature},\code{binary},\code{sequential}. Used to 
+Missing or one of \code{signature},\code{binary},\code{sequential}. 
 }
 }
 \details{
-Set boundary colours  are taken from the \code{RColorBrewer} \code{Set1} palette.
+Set boundary colours  are taken from the \code{\link{RColorBrewer}} \code{Set1} palette.
 If \code{colourAlgorithm="signature"}, face fill colours are taken frome the  \code{RColorBrewer} \code{YlOrRed} 
 palette based on the number of sets represented in the face, so eg all the faces corresponding to membership of a single set are pale yellow while the face corresponding to all the intersections is dark red.
 If \code{colourAlgorithm="binary"}, faces are blue if they correspond to an odd number of intersections and white otherwise.
@@ -41,11 +41,8 @@
   \item{Set }{Named list of graphical parameters which will be applied to sets with corresponding names }
   \item{FaceText }{Named list of graphical parameters which will be applied to annotation in sets with corresponding names }
 }
-\references{
-%% ~put references to the literature/web site here ~
-}
 \author{
-jonathan Swinton jonathan at swintons.net
+Jonathan Swinton (jonathan at swintons.net)
 }
 \seealso{
 See also \code{\link{RColorBrewer}}

Modified: pkg/Vennerable/man/Vennerable-internal.Rd
===================================================================
--- pkg/Vennerable/man/Vennerable-internal.Rd	2009-07-19 09:19:41 UTC (rev 16)
+++ pkg/Vennerable/man/Vennerable-internal.Rd	2009-07-21 21:12:41 UTC (rev 17)
@@ -152,18 +152,14 @@
 \alias{zeropos}
 \alias{zerotheta}
 
-%- Also NEED an '\alias' for EACH other topic documented here.
 \title{
 Internal functions for Vennerable, plus the ones I haven't documented yet
 }
 \description{
-As well as a number of helper functions, Vennerable includes code for doing polygon-polygon clipping in some (buggy) generality which may be documented if there is demand.
+As well as a number of internal helper functions, Vennerable includes code for doing polygon-polygon clipping in some (buggy) generality which may be documented if there is demand.
 }
-\usage{
-}
 \author{
-Jonathan Swinton jonathan at swintons.net
+Jonathan Swinton (jonathan at swintons.net)
 }
 
-%% ~Make other sections like Warning with \section{Warning }{....} ~
 \keyword{ graphs }



More information about the Vennerable-commits mailing list