File: tree-plot1-3D.R

package info (click to toggle)
bali-phy 3.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 10,608 kB
  • sloc: cpp: 67,094; xml: 4,074; perl: 3,715; haskell: 1,861; yacc: 1,067; python: 555; lex: 528; sh: 259; makefile: 20
file content (13 lines) | stat: -rw-r--r-- 234 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
args = commandArgs(trailingOnly=T)
infile = args[1]

M = as.matrix(read.table(infile))
L = dim(M)[1]

library(stats)
points = cmdscale(M, k=3)

for (i in 1:L)
{
    cat(sprintf("%f\t%f\t%f\n",points[i,1], points[i,2], points[i,3]))
}