[rkward-cvs] SF.net SVN: rkward:[3067] trunk/rkward/rkward/rbackend/rpackages/rkward

kapatp at users.sourceforge.net kapatp at users.sourceforge.net
Thu Sep 23 06:57:10 UTC 2010


Revision: 3067
          http://rkward.svn.sourceforge.net/rkward/?rev=3067&view=rev
Author:   kapatp
Date:     2010-09-23 06:57:09 +0000 (Thu, 23 Sep 2010)

Log Message:
-----------
Fill in some of the skeleton Rd files.

Modified Paths:
--------------
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/public.R
    trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.get.label.Rd
    trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.misc.Rd
    trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.results.Rd
    trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.sync.Rd

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/public.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/public.R	2010-09-22 15:30:17 UTC (rev 3066)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/public.R	2010-09-23 06:57:09 UTC (rev 3067)
@@ -268,7 +268,7 @@
 }
 
 "rk.make.repos.string" <- function () {
-	x <- options ("repos")$repos
+	x <- getOption ("repos")
 	len <- length (x)
 	ret <- sprintf ("c (")
 	first <- TRUE

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.get.label.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.get.label.Rd	2010-09-22 15:30:17 UTC (rev 3066)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.get.label.Rd	2010-09-23 06:57:09 UTC (rev 3067)
@@ -21,7 +21,7 @@
   \item{label}{a string, to set the label attribute of an object}
   \item{envir}{an environment, where the attribute is evaluated}
   \item{paste.sep}{a string, used as the \code{collapse} argument for paste}
-  \item{is.substitute}{a logical (not NA), \bold{TODO} __explain me__}
+  \item{is.substitute}{a logical (not NA). See Details.}
 }
 
 \details{

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.misc.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.misc.Rd	2010-09-22 15:30:17 UTC (rev 3066)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.misc.Rd	2010-09-23 06:57:09 UTC (rev 3067)
@@ -4,7 +4,7 @@
 \alias{rk.make.repos.string}
 \alias{rk.select.CRAN.mirror}
 
-\title{TODO}
+\title{Miscellaneous utility functions}
 
 \description{
 }
@@ -16,17 +16,38 @@
 }
 
 \arguments{
+\item{x}{a data.frame or list.}
+\item{old_name}{a string, the name of the column or element to be renamed.}
+\item{new_name}{a string, the new name.}
+\item{envir}{an environment where \code{x} is available.}
 }
 
 \details{
+\code{rk.rename.in.container} renames a named object (column/element) in a data.frame/list without changing its position.
+
+\code{rk.make.repos.string} just creates a R statement for \code{repos}. A typical user should not need to use this function.
+
+\code{rk.select.CRAN.mirror} is an in-house replacement for \code{\link{chooseCRANmirror}} without changing \code{options ("repos")}, permanently. It uses native KDE gui and provides more information on each mirror.
 }
 
 \value{
+\code{rk.rename.in.container} returns \code{NULL} on successfule renaming, otherwise an error.
+
+\code{rk.make.repos.string} returns a valid R expression as a character string which can then be parsed and evaluated.
+
+\code{rk.select.CRAN.mirror} returns the URL of the chosen mirror, as a string.
 }
 
 \author{Thomas Friedrichsmeier \email{rkward-devel at lists.sourceforge.net}}
 
 \examples{
+## rk.rename.in.container
+ir <- iris
+str (ir)
+rk.rename.in.container(ir, "Species", "Taxonomic.Group")
+str (ir)
 }
 
+\keyword{attribute}
+\keyword{misc}
 \keyword{utilities}

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.results.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.results.Rd	2010-09-22 15:30:17 UTC (rev 3066)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.results.Rd	2010-09-23 06:57:09 UTC (rev 3067)
@@ -5,9 +5,10 @@
 \alias{rk.results}
 \alias{rk.describe.alternative}
 
-\title{TODO}
+\title{Print objects and results to output}
 
 \description{
+  Various utilty functions which can be used to print or export R objects to the (html) output file. The output file can be accessed from Windows -> Show Output. Basically, these functions along with the ones described in \code{\link{rk.get.label}}, \code{\link{rk.get.tempfile.name}}, and \code{\link{rk.graph.on}} can be used to create a HTML report.
 }
 
 \usage{
@@ -19,21 +20,66 @@
 }
 
 \arguments{
+\item{x}{any R object to be printed/exported. A suitable list in case of \code{rk.describe.alternative}.}
+\item{title}{a string, used as a header for the html output}
+\item{level}{an integer, header level. For example, \code{level=2} creates the header with \code{<h2></h>} tag.}
+\item{parameters}{a list, preferably named, giving a list of "parameters" to be printed to the output}
+\item{titles}{a character vector, giving the column headers for a html table.}
 }
 
 \details{
+\code{rk.print} prints/exports the given object to the output (html) file using the \code{\link{HTML}} function. This requires the \code{R2HTML} package. Additional arguments in \code{...} are passed on to \code{\link{HTML}}.
+
+\code{rk.print.literal} prints/exports the given object using a \code{paste(x, collapse="\n")} construct to the output (html) file.
+
+\code{rk.header} prints a html header, possibly with parameters, to the output file. See example.
+
+\code{rk.results} is similar to \code{rk.print} but prints in a more tabulated fashion. This has been implemented only for certain types of \code{x}: tables, lists (or data.frames), and vectors. See example.
+
+\code{rk.describe.alternatives} describes the alternative (H1) hypothesis of a \code{htest}. This is similar to \code{stats:::print.htext} and makes sense only when \code{x$alternatives} exists.
 }
 
 \value{
+\code{rk.describe.alternatives} returns a string while all other functions return \code{NULL}, invisibly.
 }
 
 \author{Thomas Friedrichsmeier \email{rkward-devel at lists.sourceforge.net}}
 
 \seealso{
-\url{rkward://page/rkward_output}
+\code{\link{HTML}}, \code{\link{rk.get.output.html.file}}, \code{\link{rk.get.description}}, \url{rkward://page/rkward_output}
 }
 
 \examples{
+require (rkward)
+require (R2HTML)
+
+## see the output: Windows->Show Output
+## stolen from the two-sample t-test plugin ;)
+local({
+x1 <- rnorm (100)
+x2 <- rnorm (100, 2)
+nm <- rk.get.description (x1,x2)
+
+result <- t.test (x1, x2, alternative="less")
+
+rk.header (result$method,
+  parameters=list ("Comparing", paste (nm[1], "against", nm[2]),
+  "H1", rk.describe.alternative (result),
+  "Equal variances", "not assumed"))
+
+rk.print.literal ("Raw data (first few rows):")
+rk.print (head (cbind (x1,x2)), align = "left")
+
+rk.print.literal ("Test results:")
+rk.results (list (
+  'Variable Name'=nm,
+  'estimated mean'=result$estimate,
+  'degrees of freedom'=result$parameter,
+  t=result$statistic,
+  p=result$p.value,
+  'confidence interval percent'=(100 * attr(result$conf.int, "conf.level")),
+  'confidence interval of difference'=result$conf.int ))
+})
 }
 
 \keyword{utilities}

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.sync.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.sync.Rd	2010-09-22 15:30:17 UTC (rev 3066)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.sync.Rd	2010-09-23 06:57:09 UTC (rev 3067)
@@ -2,7 +2,7 @@
 \alias{rk.sync}
 \alias{rk.sync.global}
 
-\title{TODO}
+\title{Sync R object(s)}
 
 \usage{
 rk.sync(x)
@@ -10,21 +10,25 @@
 }
 
 \arguments{
+\item{x}{any R object to sync}
 }
 
 \details{
+\bold{TODO}: Explain what is "sync"
+
+While \code{rk.sync} syncs a single object, \code{x}, \code{rk.sync.global} syncs all objects in  \code{.GlobalEnv}.
 }
 
 \value{
+\code{NULL}, invisibly.
 }
 
 \author{Thomas Friedrichsmeier \email{rkward-devel at lists.sourceforge.net}}
 
 \section{Warning}{
-This is not to be used by a normal user.
+A typical user should not need to use these.
 }
 
-
 \examples{
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list