[Genabel-commits] r1132 - in pkg/DatABEL: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Mar 12 13:32:11 CET 2013
Author: yurii
Date: 2013-03-12 13:32:11 +0100 (Tue, 12 Mar 2013)
New Revision: 1132
Modified:
pkg/DatABEL/CHANGES.LOG
pkg/DatABEL/DESCRIPTION
pkg/DatABEL/R/DatABEL-package.R
pkg/DatABEL/R/apply2dfo_util.R
pkg/DatABEL/R/databel_class.R
pkg/DatABEL/R/zzz.R
pkg/DatABEL/generate_documentation.R
pkg/DatABEL/man/DatABEL-package.Rd
pkg/DatABEL/man/apply2dfo.Rd
pkg/DatABEL/man/databel-class.Rd
pkg/DatABEL/man/databel.Rd
pkg/DatABEL/man/databel2matrix.Rd
pkg/DatABEL/man/databel2text.Rd
pkg/DatABEL/man/extract_text_file_columns.Rd
pkg/DatABEL/man/get_temporary_file_name.Rd
pkg/DatABEL/man/make_empty_fvf.Rd
pkg/DatABEL/man/matrix2databel.Rd
pkg/DatABEL/man/process_lm_output.Rd
pkg/DatABEL/man/text2databel.Rd
Log:
preparing CRAN release
Modified: pkg/DatABEL/CHANGES.LOG
===================================================================
--- pkg/DatABEL/CHANGES.LOG 2013-03-11 23:40:55 UTC (rev 1131)
+++ pkg/DatABEL/CHANGES.LOG 2013-03-12 12:32:11 UTC (rev 1132)
@@ -1,4 +1,9 @@
+**** v. 0.9-4 (2013.03.12)
+- Fixing warning messages (Lennart)
+- Fixing documentation a bit (Yurii)
+- Change version number: next CRAN submission
+
**** v. 0.9-3 (2011.02.09)
- Fixed bug #2173: wrong maintainer e-mail address
Modified: pkg/DatABEL/DESCRIPTION
===================================================================
--- pkg/DatABEL/DESCRIPTION 2013-03-11 23:40:55 UTC (rev 1131)
+++ pkg/DatABEL/DESCRIPTION 2013-03-12 12:32:11 UTC (rev 1132)
@@ -1,10 +1,10 @@
Package: DatABEL
Type: Package
Title: file-based access to large matrices stored on HDD in binary format
-Version: 0.9-3
-Date: 2011-02-09
+Version: 0.9-4
+Date: 2013-03-12
Author: Yurii Aulchenko, Stepan Yakovenko, Erik Roos, Marcel Kempenaar
-Maintainer: Yurii Aulchenko <yurii.aulchenko at gmail.com>
+Maintainer: Yurii Aulchenko <yurii at bionet.nsc.ru>
Depends: R (>= 2.4.0), methods
Suggests: GenABEL, RUnit
Description: a package providing an interface to the C++ FILEVECTOR
Modified: pkg/DatABEL/R/DatABEL-package.R
===================================================================
--- pkg/DatABEL/R/DatABEL-package.R 2013-03-11 23:40:55 UTC (rev 1131)
+++ pkg/DatABEL/R/DatABEL-package.R 2013-03-12 12:32:11 UTC (rev 1132)
@@ -15,9 +15,10 @@
#' \code{\link{text2databel}},
#' \code{\linkS4class{databel}}
#'
-#' @aliases DatABEL-package DatABEL
+#' @docType package
+#' @name DatABEL-package
+#' @aliases "DatABEL"
#'
#' @author Yurii Aulchenko (R code), Stepan Yakovenko (R and C++ code), Andrey Chernyh (C++ code)
#'
-
-"DatABEL-package" <- function(){}
+NA
\ No newline at end of file
Modified: pkg/DatABEL/R/apply2dfo_util.R
===================================================================
--- pkg/DatABEL/R/apply2dfo_util.R 2013-03-11 23:40:55 UTC (rev 1131)
+++ pkg/DatABEL/R/apply2dfo_util.R 2013-03-12 12:32:11 UTC (rev 1132)
@@ -13,14 +13,9 @@
#' @aliases process_lm_output process_simple_output sum_not_NA sum_NA
#'
#' @usage process_lm_output(lmo,verbosity=2)
-#' process_simple_output(o)
-#' sum_not_NA(x)
-#' sum_NA(x)
#'
#' @param lmo object returned by analysis with "lm", "glm", etc.
#' @param verbosity verbosity
-#' @param o output for processing
-#' @param x vector of data on which function is applied
#'
#' @seealso \link{apply2dfo}
#'
Modified: pkg/DatABEL/R/databel_class.R
===================================================================
--- pkg/DatABEL/R/databel_class.R 2013-03-11 23:40:55 UTC (rev 1131)
+++ pkg/DatABEL/R/databel_class.R 2013-03-12 12:32:11 UTC (rev 1132)
@@ -1,3 +1,24 @@
+#' DatABEL class
+#'
+#' @section Slots:
+#' \describe{
+#' \item{\code{usedRowIndex}:}{\code{"integer"}}
+#' \item{\code{usedColIndex}:}{\code{"integer"}}
+#' \item{\code{uninames}:}{\code{"list"}}
+#' \item{\code{backingfilename}:}{\code{"character"}}
+#' \item{\code{cachesizeMb}:}{\code{"integer"}}
+#' \item{\code{data}:}{\code{"externalptr"}}
+#' }
+#'
+#' @note Will extend description here
+#' @docType methods
+#' @name databel
+#' @rdname databel-class
+#' @aliases databel-class
+#' @exportClass databel
+#' @author Yurii Aulchenko
+#' '
+
#
# databel R class
# (C) 2009, 2010, Yurii Aulchenko, EMCR
@@ -535,12 +556,15 @@
}
);
+#' setReadOnly method
+#'
+#' @docType methods
+#' @rdname setReadOnly-method
setGeneric(
name = "setReadOnly<-",
def = function(x,value) {standardGeneric("setReadOnly<-");}
);
-
setMethod(
f = "setReadOnly<-",
signature = "databel",
Modified: pkg/DatABEL/R/zzz.R
===================================================================
--- pkg/DatABEL/R/zzz.R 2013-03-11 23:40:55 UTC (rev 1131)
+++ pkg/DatABEL/R/zzz.R 2013-03-12 12:32:11 UTC (rev 1132)
@@ -1,6 +1,6 @@
.onAttach <- function(lib, pkg) {
- pkgVersion <- "0.9-3"
- pkgDate <- "February 09, 2011"
+ pkgVersion <- "0.9-4"
+ pkgDate <- "March 12, 2013"
welcomeMessage <- paste(pkg, " v.", pkgVersion,
" (", pkgDate, ") loaded\n", sep="")
Modified: pkg/DatABEL/generate_documentation.R
===================================================================
--- pkg/DatABEL/generate_documentation.R 2013-03-11 23:40:55 UTC (rev 1131)
+++ pkg/DatABEL/generate_documentation.R 2013-03-12 12:32:11 UTC (rev 1132)
@@ -4,6 +4,7 @@
files <- list.files(".",pattern="*.R")
files
class_files <- files[grep("*class.R",files)]
+#class_files <- c()
class_files <- c(class_files,files[grep("internal.R",files)])
class_files <- c(class_files,files[grep("zzz.R",files)])
#class_files <- c(class_files,files[grep("package.R",files)])
Modified: pkg/DatABEL/man/DatABEL-package.Rd
===================================================================
--- pkg/DatABEL/man/DatABEL-package.Rd 2013-03-11 23:40:55 UTC (rev 1131)
+++ pkg/DatABEL/man/DatABEL-package.Rd 2013-03-12 12:32:11 UTC (rev 1132)
@@ -1,19 +1,23 @@
+\docType{package}
\name{DatABEL-package}
+\alias{"DatABEL"}
\alias{DatABEL-package}
-\title{DatABEL package for fast consecutive access to large out-of-RAM stored matrices...}
-\description{DatABEL package for fast consecutive access to large out-of-RAM stored matrices}
-\details{A package interfacing FILEVECTOR C++ library
-for storage of and fast consecutive access to
-large data matrices in out-of-RAM disk mode
-with regulated cache size. Columns of matrix
-are accessible very quickly.}
+\title{DatABEL package for fast consecutive access to large out-of-RAM stored matrices}
+\description{
+ A package interfacing FILEVECTOR C++ library for storage
+ of and fast consecutive access to large data matrices in
+ out-of-RAM disk mode with regulated cache size. Columns
+ of matrix are accessible very quickly.
+}
+\author{
+ Yurii Aulchenko (R code), Stepan Yakovenko (R and C++
+ code), Andrey Chernyh (C++ code)
+}
\seealso{
-\code{\link{apply2dfo}},
-\code{\link{databel2matrix}},
-\code{\link{databel2text}},
-\code{\link{extract_text_file_columns}},
-\code{\link{matrix2databel}},
-\code{\link{text2databel}},
-\code{\linkS4class{databel}}
+ \code{\link{apply2dfo}}, \code{\link{databel2matrix}},
+ \code{\link{databel2text}},
+ \code{\link{extract_text_file_columns}},
+ \code{\link{matrix2databel}}, \code{\link{text2databel}},
+ \code{\linkS4class{databel}}
}
-\author{Yurii Aulchenko (R code), Stepan Yakovenko & Andrey Chernyh (C++ code)}
+
Modified: pkg/DatABEL/man/apply2dfo.Rd
===================================================================
--- pkg/DatABEL/man/apply2dfo.Rd 2013-03-11 23:40:55 UTC (rev 1131)
+++ pkg/DatABEL/man/apply2dfo.Rd 2013-03-12 12:32:11 UTC (rev 1132)
@@ -1,32 +1,49 @@
\name{apply2dfo}
\alias{apply2dfo}
-\title{applies a function to 'databel' object...}
-\usage{apply2dfo(..., dfodata, anFUN="lm", MAR=2, procFUN, outclass="matrix",
- outfile, type="DOUBLE", transpose=TRUE)}
-\description{applies a function to 'databel' object}
-\details{An iterator applying a user-defined function to
-an object of 'databel-class'
-object}
-\arguments{\item{dfodata}{'databel' object which is
-iterated over}
-\item{anFUN}{user-defined analysis function}
-\item{MAR}{which margin to iteracte over (default = 2,
-usually these are 'columns' used to store SNP data)}
-\item{procFUN}{function to process the output and present
-that as a fixed-number-of-columns matrix or fixed-length
-vector. Can be missing if standard functions listed below are
-used. Pre-defined processors included are "process_lm_output"
-(can process functions "lm", "glm", "coxph") and "process_simple_output"
-(process output from "sum", "prod", "sum_not_NA" [no. non-missing obs],
-"sum_NA" [no. missing obs.])}
-\item{outclass}{output to ("matrix" or "databel")}
-\item{outfile}{if output class is "databel", the generated
-object is bond to the outfile}
-\item{type}{if output class is "databel", what data
-tyoe to use for storage}
-\item{transpose}{whether to transpose the output}
-\item{...}{arguments passed to the anFUN}}
-\examples{unlink("tmp*")
+\title{applies a function to 'databel' object}
+\usage{
+ apply2dfo(..., dfodata, anFUN = "lm", MAR = 2, procFUN,
+ outclass = "matrix", outfile, type = "DOUBLE",
+ transpose = TRUE)
+}
+\arguments{
+ \item{dfodata}{'databel' object which is iterated over}
+
+ \item{anFUN}{user-defined analysis function}
+
+ \item{MAR}{which margin to iteracte over (default = 2,
+ usually these are 'columns' used to store SNP data)}
+
+ \item{procFUN}{function to process the output and present
+ that as a fixed-number-of-columns matrix or fixed-length
+ vector. Can be missing if standard functions listed below
+ are used. Pre-defined processors included are
+ "process_lm_output" (can process functions "lm", "glm",
+ "coxph") and "process_simple_output" (process output from
+ "sum", "prod", "sum_not_NA" [no. non-missing obs],
+ "sum_NA" [no. missing obs.])}
+
+ \item{outclass}{output to ("matrix" or "databel")}
+
+ \item{outfile}{if output class is "databel", the
+ generated object is bond to the outfile}
+
+ \item{type}{if output class is "databel", what data tyoe
+ to use for storage}
+
+ \item{transpose}{whether to transpose the output}
+
+ \item{...}{arguments passed to the anFUN}
+}
+\value{
+ A matrix (or 'databel'-matrix) containing results of
+ applying the function
+}
+\description{
+ An iterator applying a user-defined function to an object
+ of 'databel-class' object
+}
+\examples{
a <- matrix(rnorm(50),10,5)
rownames(a) <- paste("id",1:10,sep="")
colnames(a) <- paste("snp",1:5,sep="")
@@ -53,4 +70,9 @@
as(tD,"matrix")
rm(tA,tB,tC,tD)
gc()
-unlink("tmp*")}
+unlink("tmp*")
+}
+\author{
+ Yurii Aulchenko
+}
+
Modified: pkg/DatABEL/man/databel-class.Rd
===================================================================
--- pkg/DatABEL/man/databel-class.Rd 2013-03-11 23:40:55 UTC (rev 1131)
+++ pkg/DatABEL/man/databel-class.Rd 2013-03-12 12:32:11 UTC (rev 1132)
@@ -2,6 +2,8 @@
\Rdversion{1.1}
\docType{class}
\alias{databel-class}
+\alias{[-methods}
+\alias{[,databel,ANY,ANY,ANY-method}
\alias{[,databel-method}
\alias{[<-,databel-method}
\alias{connect,databel-method}
Modified: pkg/DatABEL/man/databel.Rd
===================================================================
--- pkg/DatABEL/man/databel.Rd 2013-03-11 23:40:55 UTC (rev 1131)
+++ pkg/DatABEL/man/databel.Rd 2013-03-12 12:32:11 UTC (rev 1132)
@@ -1,11 +1,22 @@
\name{databel}
\alias{databel}
-\title{initiates databel object...}
-\usage{databel(baseobject, cachesizeMb=64, readonly=TRUE)}
-\description{initiates databel object}
-\details{this is a simple wrapper for "new" function
-creating databel object}
-\author{Yurii Aulchenko}
-\arguments{\item{baseobject}{name of the file or \link{databel-class} object}
-\item{cachesizeMb}{cache size (amount of RAM) to be used}
-\item{readonly}{readonly flag}}
+\title{initiates databel object}
+\usage{
+ databel(baseobject, cachesizeMb = 64, readonly = TRUE)
+}
+\arguments{
+ \item{baseobject}{name of the file or
+ \link{databel-class} object}
+
+ \item{cachesizeMb}{cache size (amount of RAM) to be used}
+
+ \item{readonly}{readonly flag}
+}
+\description{
+ this is a simple wrapper for "new" function creating
+ databel object
+}
+\author{
+ Yurii Aulchenko
+}
+
Modified: pkg/DatABEL/man/databel2matrix.Rd
===================================================================
--- pkg/DatABEL/man/databel2matrix.Rd 2013-03-11 23:40:55 UTC (rev 1131)
+++ pkg/DatABEL/man/databel2matrix.Rd 2013-03-12 12:32:11 UTC (rev 1132)
@@ -1,13 +1,26 @@
\name{databel2matrix}
\alias{databel2matrix}
-\title{converts 'databel' to matrix...}
-\usage{databel2matrix(from, rows, cols)}
-\description{converts 'databel' to matrix}
-\details{Converts regular R matrix to \code{\linkS4class{databel}} object.
-This is the procedure used by "as" converting to DatABEL objects,
-in which case a temporary file name is created}
-\value{object of \code{\linkS4class{matrix}} class}
-\author{Stepan Yakovenko}
-\arguments{\item{from}{'databel' matrix}
-\item{rows}{which rows to include}
-\item{cols}{which columns to include}}
+\title{converts 'databel' to matrix}
+\usage{
+ databel2matrix(from, rows, cols)
+}
+\arguments{
+ \item{from}{'databel' matrix}
+
+ \item{rows}{which rows to include}
+
+ \item{cols}{which columns to include}
+}
+\value{
+ object of \code{\linkS4class{matrix}} class
+}
+\description{
+ Converts a \code{\linkS4class{databel}} object to a
+ regular R matrix. This is the procedure used by the "as"
+ converting to DatABEL objects, in which case a temporary
+ file name is created.
+}
+\author{
+ Stepan Yakovenko
+}
+
Modified: pkg/DatABEL/man/databel2text.Rd
===================================================================
--- pkg/DatABEL/man/databel2text.Rd 2013-03-11 23:40:55 UTC (rev 1131)
+++ pkg/DatABEL/man/databel2text.Rd 2013-03-12 12:32:11 UTC (rev 1132)
@@ -1,14 +1,27 @@
\name{databel2text}
\alias{databel2text}
-\title{Exports DatABEL object to a text file...}
-\usage{databel2text(databel, file, NAString="NA", row.names=TRUE,
- col.names=TRUE, transpose=FALSE)}
-\description{Exports DatABEL object to a text file}
-\details{Exports DatABEL object to a text file}
-\author{Stepan Yakovenko}
-\arguments{\item{databel}{DatABEL object}
-\item{file}{output file name}
-\item{NAString}{string to replace NA with}
-\item{row.names}{export row names if TRUE}
-\item{col.names}{export col names if TRUE}
-\item{transpose}{whether the matrix should be transposed}}
+\title{Exports DatABEL object to a text file}
+\usage{
+ databel2text(databel, file, NAString = "NA",
+ row.names = TRUE, col.names = TRUE, transpose = FALSE)
+}
+\arguments{
+ \item{databel}{DatABEL object}
+
+ \item{file}{output file name}
+
+ \item{NAString}{string to replace NA with}
+
+ \item{row.names}{export row names if TRUE}
+
+ \item{col.names}{export col names if TRUE}
+
+ \item{transpose}{whether the matrix should be transposed}
+}
+\description{
+ Exports DatABEL object to a text file
+}
+\author{
+ Stepan Yakovenko
+}
+
Modified: pkg/DatABEL/man/extract_text_file_columns.Rd
===================================================================
--- pkg/DatABEL/man/extract_text_file_columns.Rd 2013-03-11 23:40:55 UTC (rev 1131)
+++ pkg/DatABEL/man/extract_text_file_columns.Rd 2013-03-12 12:32:11 UTC (rev 1132)
@@ -1,11 +1,20 @@
\name{extract_text_file_columns}
\alias{extract_text_file_columns}
-\title{extract_text_file_columns}
-\usage{extract_text_file_columns(file, whichcols)}
-\description{extracts columns from text file}
-\details{Extracts a column from text file to a matrix.
-If in a particular file line the number of columns is less
-then a column specified, returns last column!}
-\value{matrix of strings with values from that columns}
-\arguments{\item{file}{file name}
-\item{whichcols}{which columns to extract}}
+\title{extracts columns from text file}
+\usage{
+ extract_text_file_columns(file, whichcols)
+}
+\arguments{
+ \item{file}{file name}
+
+ \item{whichcols}{which columns to extract}
+}
+\value{
+ matrix of strings with values from that columns
+}
+\description{
+ Extracts a column from text file to a matrix. If in a
+ particular file line the number of columns is less then a
+ column specified, returns last column!
+}
+
Modified: pkg/DatABEL/man/get_temporary_file_name.Rd
===================================================================
--- pkg/DatABEL/man/get_temporary_file_name.Rd 2013-03-11 23:40:55 UTC (rev 1131)
+++ pkg/DatABEL/man/get_temporary_file_name.Rd 2013-03-12 12:32:11 UTC (rev 1132)
@@ -1,10 +1,17 @@
\name{get_temporary_file_name}
\alias{get_temporary_file_name}
-\title{generates temporary file name...}
-\usage{get_temporary_file_name(path=".", withFVext=TRUE)}
-\description{generates temporary file name}
-\details{function to generate temporary file name}
-\arguments{\item{path}{path to directory where
-the temporary file will be located}
-\item{withFVext}{whether function should check
-presence of *FVD and *FVI files too}}
+\title{generates temporary file name}
+\usage{
+ get_temporary_file_name(path = ".", withFVext = TRUE)
+}
+\arguments{
+ \item{path}{path to directory where the temporary file
+ will be located}
+
+ \item{withFVext}{whether function should check presence
+ of *FVD and *FVI files too}
+}
+\description{
+ function to generate temporary file name
+}
+
Modified: pkg/DatABEL/man/make_empty_fvf.Rd
===================================================================
--- pkg/DatABEL/man/make_empty_fvf.Rd 2013-03-11 23:40:55 UTC (rev 1131)
+++ pkg/DatABEL/man/make_empty_fvf.Rd 2013-03-12 12:32:11 UTC (rev 1132)
@@ -1,15 +1,33 @@
\name{make_empty_fvf}
\alias{make_empty_fvf}
-\title{makes empty filevector object...}
-\usage{make_empty_fvf(name, nvariables, nobservations, type="DOUBLE",
- cachesizeMb=64, readonly=FALSE)}
-\description{makes empty filevector object}
-\details{function to generate empty filevector object (and disk files)}
-\value{databel object; also file is created in file system}
-\arguments{\item{name}{name fo the file to be assoiated with new object}
-\item{nvariables}{number of variables (R columns)}
-\item{nobservations}{number of observations (R rows)}
-\item{type}{data type of the object ("UNSIGNED_SHORT_INT",
-"SHORT_INT", "UNSIGNED_INT", "INT", "FLOAT", "DOUBLE", "CHAR", "UNSIGNED_CHAR")}
-\item{cachesizeMb}{what cache size to use for newly generated 'databel' object}
-\item{readonly}{whether to open new 'databel' in readonly mode}}
+\title{makes empty filevector object}
+\usage{
+ make_empty_fvf(name, nvariables, nobservations,
+ type = "DOUBLE", cachesizeMb = 64, readonly = FALSE)
+}
+\arguments{
+ \item{name}{name fo the file to be assoiated with new
+ object}
+
+ \item{nvariables}{number of variables (R columns)}
+
+ \item{nobservations}{number of observations (R rows)}
+
+ \item{type}{data type of the object
+ ("UNSIGNED_SHORT_INT", "SHORT_INT", "UNSIGNED_INT",
+ "INT", "FLOAT", "DOUBLE", "CHAR", "UNSIGNED_CHAR")}
+
+ \item{cachesizeMb}{what cache size to use for newly
+ generated 'databel' object}
+
+ \item{readonly}{whether to open new 'databel' in readonly
+ mode}
+}
+\value{
+ databel object; also file is created in file system
+}
+\description{
+ function to generate empty filevector object (and disk
+ files)
+}
+
Modified: pkg/DatABEL/man/matrix2databel.Rd
===================================================================
--- pkg/DatABEL/man/matrix2databel.Rd 2013-03-11 23:40:55 UTC (rev 1131)
+++ pkg/DatABEL/man/matrix2databel.Rd 2013-03-12 12:32:11 UTC (rev 1132)
@@ -1,17 +1,35 @@
\name{matrix2databel}
\alias{matrix2databel}
-\title{converts matrix to 'databel'...}
-\usage{matrix2databel(from, filename, cachesizeMb=64, type="DOUBLE",
- readonly=FALSE)}
-\description{converts matrix to 'databel'}
-\details{Converts regular R matrix to \code{\linkS4class{databel}} object.
-This is the procedure used by "as" converting to DatABEL objects,
-in which case a temporary file name is created}
-\value{object of class \code{\linkS4class{databel}}}
-\author{Yurii Aulchenko}
-\arguments{\item{from}{R matrix}
-\item{filename}{which FILEVECTOR BASE file name to use}
-\item{cachesizeMb}{cache size to be used when accessing the object}
-\item{type}{type of data to use for storage ("DOUBLE", "FLOAT", "INT",
-"UNSIGNED_INT", "UNSIGNED_SHORT_INT", "SHORT_INT", "CHAR", "UNSIGNED_CHAR")}
-\item{readonly}{whether to generate new 'databel' in read only mode}}
+\title{converts matrix to 'databel'}
+\usage{
+ matrix2databel(from, filename, cachesizeMb = 64,
+ type = "DOUBLE", readonly = FALSE)
+}
+\arguments{
+ \item{from}{R matrix}
+
+ \item{filename}{which FILEVECTOR BASE file name to use}
+
+ \item{cachesizeMb}{cache size to be used when accessing
+ the object}
+
+ \item{type}{type of data to use for storage ("DOUBLE",
+ "FLOAT", "INT", "UNSIGNED_INT", "UNSIGNED_SHORT_INT",
+ "SHORT_INT", "CHAR", "UNSIGNED_CHAR")}
+
+ \item{readonly}{whether to generate new 'databel' in read
+ only mode}
+}
+\value{
+ object of class \code{\linkS4class{databel}}
+}
+\description{
+ Converts regular R matrix to \code{\linkS4class{databel}}
+ object. This is the procedure used by "as" converting to
+ DatABEL objects, in which case a temporary file name is
+ created
+}
+\author{
+ Yurii Aulchenko
+}
+
Modified: pkg/DatABEL/man/process_lm_output.Rd
===================================================================
--- pkg/DatABEL/man/process_lm_output.Rd 2013-03-11 23:40:55 UTC (rev 1131)
+++ pkg/DatABEL/man/process_lm_output.Rd 2013-03-12 12:32:11 UTC (rev 1132)
@@ -1,29 +1,30 @@
\name{process_lm_output}
-\title{'apply2dfo'-associated functions...}
-\usage{process_lm_output(lmo,verbosity=2)
-process_simple_output(o)
-sum_not_NA(x)
-sum_NA(x)}
-\description{'apply2dfo'-associated functions}
-\details{A number of functions used in
-conjunction with 'apply2dfo'.
-Standardly supported apply2dfo's anFUN analysis functions
-include 'lm', 'glm', 'coxph', 'sum', 'prod', "sum_not_NA"
-(no. non-missing obs), and "sum_NA" (no. missing obs.).
-Pre-defined processing functions include "process_lm_output"
-(can process functions "lm", "glm", "coxph") and "process_simple_output"
-(process output from "sum", "prod", "sum_not_NA",
-"sum_NA")}
\alias{process_lm_output}
\alias{process_simple_output}
+\alias{sum_NA}
\alias{sum_not_NA}
-\alias{sum_NA}
-\seealso{\link{apply2dfo}}
-\arguments{\item{lmo}{object returned by analysis with "lm", "glm", etc.}
-\item{verbosity}{verbosity}
-\item{o}{output for processing}
-\item{x}{vector of data on which function is applied}}
-\examples{a <- matrix(rnorm(50),10,5)
+\title{'apply2dfo'-associated functions}
+\usage{
+ process_lm_output(lmo,verbosity=2)
+}
+\arguments{
+ \item{lmo}{object returned by analysis with "lm", "glm",
+ etc.}
+
+ \item{verbosity}{verbosity}
+}
+\description{
+ A number of functions used in conjunction with
+ 'apply2dfo'. Standardly supported apply2dfo's anFUN
+ analysis functions include 'lm', 'glm', 'coxph', 'sum',
+ 'prod', "sum_not_NA" (no. non-missing obs), and "sum_NA"
+ (no. missing obs.). Pre-defined processing functions
+ include "process_lm_output" (can process functions "lm",
+ "glm", "coxph") and "process_simple_output" (process
+ output from "sum", "prod", "sum_not_NA", "sum_NA")
+}
+\examples{
+a <- matrix(rnorm(50),10,5)
rownames(a) <- paste("id",1:10,sep="")
colnames(a) <- paste("snp",1:5,sep="")
b <- as(a,"databel")
@@ -33,4 +34,9 @@
sex <- 1*(runif(10)>.5)
trait <- rnorm(10)+sex+as(b[,2],"vector")+as(b[,2],"vector")*sex*5
-apply2dfo(trait~SNP*sex,dfodata=b,anFUN="lm",procFUN="process_lm_output")}
+apply2dfo(trait~SNP*sex,dfodata=b,anFUN="lm",procFUN="process_lm_output")
+}
+\seealso{
+ \link{apply2dfo}
+}
+
Modified: pkg/DatABEL/man/text2databel.Rd
===================================================================
--- pkg/DatABEL/man/text2databel.Rd 2013-03-11 23:40:55 UTC (rev 1131)
+++ pkg/DatABEL/man/text2databel.Rd 2013-03-12 12:32:11 UTC (rev 1132)
@@ -1,56 +1,81 @@
\name{text2databel}
\alias{text2databel}
-\title{converts text file to filevector format...}
-\usage{text2databel(infile, outfile, colnames, rownames, skipcols, skiprows,
- transpose=FALSE, R_matrix=FALSE, type="DOUBLE", cachesizeMb=64,
- readonly=TRUE, naString="NA")}
-\description{converts text file to filevector format}
-\details{The file provides the data to be converted to filevector format.
-The file may provide the data only (no row and column names)
-in which case col/row names may be left empty or provided in
-separate files (in which case it is assumed that names are provided
-only for the imported columns/rows -- see skip-options).
-There is an option to skip a number of
-first ros and columns. The row and column names may also
-be provided in the file itself, in which case one needs to
-tell the row/column number providing column/row names.
-Unless option "R_matrix" is set to TRUE, it is asumed that the
-number of columns is always the same acorss the file. If above
-option is provided, it is assumed that both column and row
-names are provided in the file, and the first line contains
-one column less than other lines (such is the case with
-file produced from R using function
-"write.table(...,col.mnames=TRUE,row.names=TRUE)"}
-\author{Yurii Aulchenko}
-\value{file converted is stored in file system, \link{databel-class}
-object connection to the file}
-\arguments{\item{infile}{input text file name}
-\item{outfile}{output filevector file name; if missing,
-it is set to infile+".filevector"}
-\item{colnames}{where are the column names stored? If missing,
-no column names; if integer, this denotes the row of the
-input file where the column names are specified; if
-character string then the string specifies the name of the file
-with column names}
-\item{rownames}{where are the row names stored? If missing,
-no row names; if integer, this denotes the column of the
-input file where the row names are specified; if
-character string then the string specifies the name of the file
-with row names}
-\item{skipcols}{how many columns of the input file to skip}
-\item{skiprows}{how many rows of the input file to skip}
-\item{transpose}{whether the file is to be transposed}
-\item{R_matrix}{if true, the file format is assumed to follow
-the format of R data matrix produced with
-"write.table(...,col.mnames=TRUE,row.names=TRUE)"}
-\item{type}{data DatABEL type to use ("DOUBLE", "FLOAT", "INT",
-"UNSIGNED_INT", "UNSIGNED_SHORT_INT", "SHORT_INT", "CHAR", "UNSIGNED_CHAR")}
-\item{cachesizeMb}{cache size for the resulting 'databel-class' object}
-\item{readonly}{whether the resulting 'databel-class' object should
-be opened in readonly mode}
-\item{naString}{the string used for missing data (default: NA)}}
-\examples{cat("this is an example which you can run if you can write to the file system\n")
+\title{converts text file to filevector format}
+\usage{
+ text2databel(infile, outfile, colnames, rownames,
+ skipcols, skiprows, transpose = FALSE,
+ R_matrix = FALSE, type = "DOUBLE", cachesizeMb = 64,
+ readonly = TRUE, naString = "NA")
+}
+\arguments{
+ \item{infile}{input text file name}
+ \item{outfile}{output filevector file name; if missing,
+ it is set to infile+".filevector"}
+
+ \item{colnames}{where are the column names stored? If
+ missing, no column names; if integer, this denotes the
+ row of the input file where the column names are
+ specified; if character string then the string specifies
+ the name of the file with column names}
+
+ \item{rownames}{where are the row names stored? If
+ missing, no row names; if integer, this denotes the
+ column of the input file where the row names are
+ specified; if character string then the string specifies
+ the name of the file with row names}
+
+ \item{skipcols}{how many columns of the input file to
+ skip}
+
+ \item{skiprows}{how many rows of the input file to skip}
+
+ \item{transpose}{whether the file is to be transposed}
+
+ \item{R_matrix}{if true, the file format is assumed to
+ follow the format of R data matrix produced with
+ \code{write.table(...,col.names=TRUE,row.names=TRUE)}}
+
+ \item{type}{data DatABEL type to use ("DOUBLE", "FLOAT",
+ "INT", "UNSIGNED_INT", "UNSIGNED_SHORT_INT", "SHORT_INT",
+ "CHAR", "UNSIGNED_CHAR")}
+
+ \item{cachesizeMb}{cache size for the resulting
+ 'databel-class' object}
+
+ \item{readonly}{whether the resulting 'databel-class'
+ object should be opened in readonly mode}
+
+ \item{naString}{the string used for missing data
+ (default: NA)}
+}
+\value{
+ The converted file is stored in the file system, a
+ \link{databel-class} object connection to the file is
+ returned.
+}
+\description{
+ The file provides the data to be converted to filevector
+ format. The file may provide the data only (no row and
+ column names) in which case col/row names may be left
+ empty or provided in separate files (in which case it is
+ assumed that names are provided only for the imported
+ columns/rows -- see skip-options). There is an option to
+ skip a number of first ros and columns. The row and
+ column names may also be provided in the file itself, in
+ which case one needs to tell the row/column number
+ providing column/row names. Unless option "R_matrix" is
+ set to TRUE, it is asumed that the number of columns is
+ always the same acorss the file. If above option is
+ provided, it is assumed that both column and row names
+ are provided in the file, and the first line contains one
+ column less than other lines (such is the case with files
+ produced from R using the function
+ \code{write.table(...,col.names=TRUE,row.names=TRUE)}.
+}
+\examples{
+cat("this is an example which you can run if you can write to the file system\\n")
+
\dontrun{
# create matrix
@@ -78,22 +103,22 @@
# convert text two filevector format
text2databel(infile="test_matrix_NOnames.dat",outfile="test_matrix_NOnames.fvf",
-colnames="test_matrix.colnames",rownames="test_matrix.rownames")
+ colnames="test_matrix.colnames",rownames="test_matrix.rownames")
x <- databel("test_matrix_NOnames.fvf")
if (!identical(data,as(x,"matrix"))) stop("not identical data")
text2databel(infile="test_matrix_NOnames.dat",outfile="test_matrix_NOnames_T.fvf",
-colnames="test_matrix.colnames",rownames="test_matrix.rownames",transpose=TRUE)
+ colnames="test_matrix.colnames",rownames="test_matrix.rownames",transpose=TRUE)
x <- databel("test_matrix_NOnames_T.fvf")
if (!identical(data,t(as(x,"matrix")))) stop("not identical data")
text2databel(infile="test_matrix_rownames.dat",outfile="test_matrix_rownames.fvf",
-rownames=1,colnames="test_matrix.colnames")
+ rownames=1,colnames="test_matrix.colnames")
x <- databel("test_matrix_rownames.fvf")
if (!identical(data,as(x,"matrix"))) stop("not identical data")
text2databel(infile="test_matrix_colnames.dat",outfile="test_matrix_colnames.fvf",
-colnames=1,rownames="test_matrix.rownames")
+ colnames=1,rownames="test_matrix.rownames")
x <- databel("test_matrix_colnames.fvf")
if (!identical(data,as(x,"matrix"))) stop("not identical data")
@@ -110,8 +135,13 @@
write.table(newmat,file="test_matrix_strange.dat",col.names=FALSE,row.names=FALSE,quote=FALSE)
text2databel(infile="test_matrix_strange.dat",outfile="test_matrix_strange.fvf",
-colnames=2,rownames=3)
+ colnames=2,rownames=3)
x <- databel("test_matrix_strange.fvf")
if (!identical(data,as(x,"matrix"))) stop("not identical data")
-}}
+}
+}
+\author{
+ Yurii Aulchenko
+}
+
More information about the Genabel-commits
mailing list