Thread: [R-gregmisc-users] SF.net SVN: r-gregmisc:[1444] trunk/gplots/man/venn.Rd
Brought to you by:
warnes
|
From: <wa...@us...> - 2010-06-11 03:17:21
|
Revision: 1444
http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1444&view=rev
Author: warnes
Date: 2010-06-11 03:17:15 +0000 (Fri, 11 Jun 2010)
Log Message:
-----------
Use 'TRUE' instead of 'T' for true in venn man page
Modified Paths:
--------------
trunk/gplots/man/venn.Rd
Modified: trunk/gplots/man/venn.Rd
===================================================================
--- trunk/gplots/man/venn.Rd 2010-06-11 03:15:19 UTC (rev 1443)
+++ trunk/gplots/man/venn.Rd 2010-06-11 03:17:15 UTC (rev 1444)
@@ -51,7 +51,7 @@
##
## construct some fake gene names..
-oneName <- function() paste(sample(LETTERS,5,replace=T),collapse="")
+oneName <- function() paste(sample(LETTERS,5,replace=TRUE),collapse="")
geneNames <- replicate(1000, oneName())
##
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2010-06-11 03:27:50
|
Revision: 1445
http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1445&view=rev
Author: warnes
Date: 2010-06-11 03:27:44 +0000 (Fri, 11 Jun 2010)
Log Message:
-----------
Fix errors detected by R CMD check
Modified Paths:
--------------
trunk/gplots/man/venn.Rd
Modified: trunk/gplots/man/venn.Rd
===================================================================
--- trunk/gplots/man/venn.Rd 2010-06-11 03:17:15 UTC (rev 1444)
+++ trunk/gplots/man/venn.Rd 2010-06-11 03:27:44 UTC (rev 1445)
@@ -1,5 +1,6 @@
\name{venn}
\alias{venn}
+\alias{plot.venn}
\title{Plot a Venn diagram}
\description{
Plot a Venn diagrams for up to 5 sets
@@ -11,7 +12,7 @@
simplify=FALSE)
}
\arguments{
- \item{data}{Either a list list containing vectors of names or indices
+ \item{data,x}{Either a list list containing vectors of names or indices
of group members, or a data frame containing boolean indicators of
group membership (see below)}
\item{universe}{Subset of valid name/index elements. Values ignore values
@@ -24,6 +25,7 @@
should be omitted.}
\item{show.plot}{Logical flag indicating whether the plot should be
displayed. If false, simply returns the group count matrix.}
+ \item{y}{Ignored}
}
\details{
\code{data} should be either a named list of vectors containing
@@ -69,10 +71,10 @@
## Example using a list of item indexes belonging to the
## specified group.
##
-GroupA.i <- which(geneNames %in% GroupA)
-GroupB.i <- which(geneNames %in% GroupB)
-GroupC.i <- which(geneNames %in% GroupC)
-GroupD.i <- which(geneNames %in% GroupD)
+GroupA.i <- which(geneNames \%in\% GroupA)
+GroupB.i <- which(geneNames \%in\% GroupB)
+GroupC.i <- which(geneNames \%in\% GroupC)
+GroupD.i <- which(geneNames \%in\% GroupD)
input.i <-list(A=GroupA.i,B=GroupB.i,C=GroupC.i,D=GroupD.i)
input.i
@@ -81,16 +83,16 @@
##
## Example using a data frame of indicator ('f'lag) columns
##
-GroupA.f <- geneNames %in% GroupA
-GroupB.f <- geneNames %in% GroupB
-GroupC.f <- geneNames %in% GroupC
-GroupD.f <- geneNames %in% GroupD
+GroupA.f <- geneNames \%in\% GroupA
+GroupB.f <- geneNames \%in\% GroupB
+GroupC.f <- geneNames \%in\% GroupC
+GroupD.f <- geneNames \%in\% GroupD
input.df <- data.frame(A=GroupA.f,B=GroupB.f,C=GroupC.f,D=GroupD.f)
head(input.df)
venn(input.df)
## smaller set to create empty groupings
-small <- input[1:20,]
+small <- input.df[1:20,]
venn(small, simplify=FALSE) # with empty groupings
venn(small, simplify=TRUE) # without empty groupings
@@ -114,10 +116,10 @@
##
universe <- unique(c(GroupA,GroupB,GroupC,GroupD))
-GroupA.l <-universe %in% GroupA
-GroupB.l <-universe %in% GroupB
-GroupC.l <-universe %in% GroupC
-GroupD.l <-universe %in% GroupD
+GroupA.l <-universe \%in\% GroupA
+GroupB.l <-universe \%in\% GroupB
+GroupC.l <-universe \%in\% GroupC
+GroupD.l <-universe \%in\% GroupD
## Genes that are in GroupA and in GroupB but not in GroupD (unification
## of sets III0 and II00 in the venn diagram:
@@ -126,7 +128,7 @@
##
## Alternatively: construct a function to test for the pattern you want.
##
-test <- function(x) (x %in% GroupA) & (x %in% GroupB) & !(x %in% GroupC)
+test <- function(x) (x \%in\% GroupA) & (x \%in\% GroupB) & !(x \%in\% GroupC)
universe[ test(universe) ]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2010-06-11 03:29:18
|
Revision: 1446
http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1446&view=rev
Author: warnes
Date: 2010-06-11 03:29:12 +0000 (Fri, 11 Jun 2010)
Log Message:
-----------
Fix errors detected by R CMD check
Modified Paths:
--------------
trunk/gplots/man/venn.Rd
Modified: trunk/gplots/man/venn.Rd
===================================================================
--- trunk/gplots/man/venn.Rd 2010-06-11 03:27:44 UTC (rev 1445)
+++ trunk/gplots/man/venn.Rd 2010-06-11 03:29:12 UTC (rev 1446)
@@ -25,7 +25,7 @@
should be omitted.}
\item{show.plot}{Logical flag indicating whether the plot should be
displayed. If false, simply returns the group count matrix.}
- \item{y}{Ignored}
+ \item{y,...}{Ignored}
}
\details{
\code{data} should be either a named list of vectors containing
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2015-05-01 15:58:44
|
Revision: 1997
http://sourceforge.net/p/r-gregmisc/code/1997
Author: warnes
Date: 2015-05-01 15:58:41 +0000 (Fri, 01 May 2015)
Log Message:
-----------
Summary: venn example used 'F' instead of 'FALSE'.
Modified Paths:
--------------
trunk/gplots/man/venn.Rd
Modified: trunk/gplots/man/venn.Rd
===================================================================
--- trunk/gplots/man/venn.Rd 2015-05-01 15:34:19 UTC (rev 1996)
+++ trunk/gplots/man/venn.Rd 2015-05-01 15:58:41 UTC (rev 1997)
@@ -37,7 +37,7 @@
indexes of group intersections (1, 2, .., N), or a data frame containing
indicator variables (TRUE, FALSE, TRUE, ..) for group intersectionship.
Group names will be taken from the component list element or column
- names.
+ names.
}
\value{
Invisibly returns an object of class "venn", containing a matrix of
@@ -59,8 +59,8 @@
## construct some fake gene names..
oneName <- function() paste(sample(LETTERS,5,replace=TRUE),collapse="")
geneNames <- replicate(1000, oneName())
-
-##
+
+##
GroupA <- sample(geneNames, 400, replace=FALSE)
GroupB <- sample(geneNames, 750, replace=FALSE)
GroupC <- sample(geneNames, 250, replace=FALSE)
@@ -113,7 +113,7 @@
tmp
##
-## Example to determine which elements are in A and B but not in
+## Example to determine which elements are in A and B but not in
## C and D: first determine the universe, then form indicator columns
## and perform intersections on these. R allows using the set operations
## directly, but some might find this approach more intuitive.
@@ -139,8 +139,7 @@
## Intriduced with gplots 2.16, the names of individuals for everz intersection
## is offered as an attribute to the retrun value.
##
-
-a<-venn(list(1:5,3:8),show.plot=F,intersections=TRUE)
+a<-venn(list(1:5,3:8), show.plot=FALSE)
intersections<-attr(a,"intersections")
print(intersections)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|