Learn R Programming

amap (version 0.5-1)

r2xcluster: Write to Xcluster file format

Description

Converting data to Xcluster format

Usage

r2xcluster(data,labels=FALSE,description=FALSE,file="xcluster.txt")

Arguments

Details

Software Xcluster, made by G. Sherlock needs formatted input data like:

NAME DESCRIPTION GWEIGHT V2 V3 V4 EWEIGHT 1 1 1 gbk01 Gene1 1 0.9 0.4 1.4 gbk02 Gene2 1 0.6 0.2 0.2 gbk03 Gene3 1 1.6 1.1 0.9 gbk04 Gene4 1 0.4 1 1

Line begining with EWEIGHT gives weights for each column (variable). Column GWEIGHT gives weights for each line (individuals).

See Also

xcluster, xcluster2r, hclust, hcluster

Examples

Run this code
##   Create data
.Random.seed <- c(1,  416884367 ,1051235439)
m <- matrix(rep(1,3*24),ncol=3)  
m[9:16,3] <- 3 ; m[17:24,] <- 3    #create 3 groups
m <- m+rnorm(24*3,0,0.5)           #add noise
m <- floor(10*m)/10                #just one digits

r2xcluster(m)

## And once you have Xcluster program:

system('Xcluster -f xcluster.txt -e 0 -p 0 -s 0 -l 0')
h <- xcluster2r('xcluster.gtr')
plot(h,hang=-1)

Run the code above in your browser using DataLab