From 21133af8f70a4841a2156976d4d6091e4cf18d31 Mon Sep 17 00:00:00 2001 From: einarr Date: Sun, 6 Mar 2011 21:27:36 +0000 Subject: [PATCH] Removing old r-laydi directory. --- r-laydi/laydi.R | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 r-laydi/laydi.R diff --git a/r-laydi/laydi.R b/r-laydi/laydi.R deleted file mode 100644 index 54f878a..0000000 --- a/r-laydi/laydi.R +++ /dev/null @@ -1,30 +0,0 @@ - -write.ftsv <- function(data, con, name="unnamed_dataset", rowdim="rows", coldim="cols") { - /* If con is a file name, open it */ - opened.here = FALSE - if (is.character(con)){ - con = file(con, "w") - opened.here = TRUE - } - - /* Substitute all whitespace with underscores in identifiers */ - rows <- paste(gsub("\\s", "_", rownames(data)), collapse=" ") - cols <- paste(gsub("\\s", "_", colnames(data)), collapse=" ") - - /* Write header */ - writeLines(c("# type: dataset", - paste("# dimension:", rowdim, rows, collapse=' '), - paste("# dimension:", coldim, cols, collapse=' '), - paste("# name:", name, collapse=' '), - ""), - con=con) - - /* Write matrix */ - write.table(data, file=con, col.names=FALSE, row.names=FALSE, sep="\t") - - /* If con was a string, close file now */ - if (opened.here) - close(con) -} - -