1
2
3
4
5
6
7
8
9
10
11
12
13
14
| #安装limma包
#source("http://www.bioconductor.org/biocLite.R")
#biocLite("limma")
#载入limma包
library(limma)
hsb2 《- read.table("http://www.ats.ucla.edu/stat/R/notes/hsb2.csv", sep=',', header=T)
attach(hsb2)
hw 《- (write《=60)
hm 《- (math 《=60)
hr 《- (read 《=60)
c3 《- cbind(hw, hm, hr)
a 《- vennCounts(c3)
vennDiagram(a, include = "both", names = c("High Writing", "High Math", "High Reading"), cex = 1, counts.col = "red") |
#安装limma包
#source("http://www.bioconductor.org/biocLite.R")
#biocLite("limma")
#载入limma包
library(limma)
hsb2 《- read.table("http://www.ats.ucla.edu/stat/R/notes/hsb2.csv", sep=',', header=T)
attach(hsb2)
hw 《- (write《=60)
hm 《- (math 《=60)
hr 《- (read 《=60)
c3 《- cbind(hw, hm, hr)
a 《- vennCounts(c3)
vennDiagram(a, include = "both", names = c("High Writing", "High Math", "High Reading"), cex = 1, counts.col = "red")
1
2
3
4
5
6
7
8
9
10
11
12
13
| #安装gplots包
#install.packages("gplots")
#载入gplots包
library(gplots)
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)
GroupD 《- sample(geneNames, 300, replace=FALSE)
input 《-list(GroupA,GroupB,GroupC,GroupD)
venn(input) |
#安装gplots包
#install.packages("gplots")
#载入gplots包
library(gplots)
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)
GroupD 《- sample(geneNames, 300, replace=FALSE)
input 《-list(GroupA,GroupB,GroupC,GroupD)
venn(input)
Continue reading →