[Genabel-commits] r1341 - pkg/DatABEL/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Oct 7 21:34:36 CEST 2013


Author: lckarssen
Date: 2013-10-07 21:34:36 +0200 (Mon, 07 Oct 2013)
New Revision: 1341

Modified:
   pkg/DatABEL/man/apply2dfo.Rd
Log:
Fix layout of the apply2dfo man page in the DatABEL package. Added some spaces after comma's and reduced the length of long lines (R CMD build --as-cran complained about lines > 100 characters). 


Modified: pkg/DatABEL/man/apply2dfo.Rd
===================================================================
--- pkg/DatABEL/man/apply2dfo.Rd	2013-10-07 18:55:54 UTC (rev 1340)
+++ pkg/DatABEL/man/apply2dfo.Rd	2013-10-07 19:34:36 UTC (rev 1341)
@@ -11,13 +11,13 @@
 
   \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{MAR}{which margin to iterate over (default = 2,
+  usually these are the '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
+  vector. Can be missing if one of the standard functions listed
+  below is 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],
@@ -26,9 +26,9 @@
   \item{outclass}{output to ("matrix" or "databel")}
 
   \item{outfile}{if output class is "databel", the
-  generated object is bond to the outfile}
+  generated object is bound to the outfile}
 
-  \item{type}{if output class is "databel", what data tyoe
+  \item{type}{if output class is "databel", what data type
   to use for storage}
 
   \item{transpose}{whether to transpose the output}
@@ -41,34 +41,38 @@
 }
 \description{
   An iterator applying a user-defined function to an object
-  of 'databel-class' object
+  of 'databel-class'.
 }
 \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")
-apply(a,FUN="sum",MAR=2)
-apply2dfo(SNP,dfodata=b,anFUN="sum")
-tA <- apply2dfo(SNP,dfodata=b,anFUN="sum",outclass="databel",outfile="tmpA")
+a <- matrix(rnorm(50), 10, 5)
+rownames(a) <- paste("id", 1:10, sep="")
+colnames(a) <- paste("snp", 1:5, sep="")
+b <- as(a, "databel")
+apply(a, FUN="sum", MAR=2)
+apply2dfo(SNP, dfodata=b, anFUN="sum")
+tA <- apply2dfo(SNP, dfodata=b, anFUN="sum",
+                outclass="databel", outfile="tmpA")
 tA
-as(tA,"matrix")
-apply2dfo(SNP,dfodata=b,anFUN="sum",transpose=FALSE)
-tB <- apply2dfo(SNP,dfodata=b,anFUN="sum",transpose=FALSE,outclass="databel",outfile="tmpB")
+as(tA, "matrix")
+apply2dfo(SNP, dfodata=b, anFUN="sum", transpose=FALSE)
+tB <- apply2dfo(SNP, dfodata=b, anFUN="sum", transpose=FALSE,
+                outclass="databel", outfile="tmpB")
 tB
-as(tB,"matrix")
+as(tB, "matrix")
 
-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")
-tC <- apply2dfo(trait~SNP*sex,dfodata=b,anFUN="lm",outclass="databel",outfile="tmpC")
+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")
+tC <- apply2dfo(trait~SNP*sex, dfodata=b, anFUN="lm",
+                outclass="databel", outfile="tmpC")
 tC
-as(tC,"matrix")
-apply2dfo(trait~SNP*sex,dfodata=b,anFUN="lm",transpose=FALSE)
-tD <- apply2dfo(trait~SNP*sex,dfodata=b,anFUN="lm",transpose=FALSE,outclass="databel",outfile="tmpD")
+as(tC, "matrix")
+apply2dfo(trait~SNP*sex, dfodata=b, anFUN="lm", transpose=FALSE)
+tD <- apply2dfo(trait~SNP*sex, dfodata=b, anFUN="lm", transpose=FALSE,
+                outclass="databel", outfile="tmpD")
 tD
-as(tD,"matrix")
-rm(tA,tB,tC,tD)
+as(tD, "matrix")
+rm(tA, tB, tC, tD)
 gc()
 unlink("tmp*")
 }



More information about the Genabel-commits mailing list