[Sciviews-commits] r311 - in pkg/svSweave: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Sep 25 09:32:17 CEST 2010
Author: phgrosjean
Date: 2010-09-25 09:32:17 +0200 (Sat, 25 Sep 2010)
New Revision: 311
Added:
pkg/svSweave/man/svSweave-package.Rd
Modified:
pkg/svSweave/DESCRIPTION
pkg/svSweave/NEWS
pkg/svSweave/R/cleanLyxRnw.R
pkg/svSweave/man/cleanLyxRnw.Rd
Log:
Added a package man page and reworked R code and man pages
Modified: pkg/svSweave/DESCRIPTION
===================================================================
--- pkg/svSweave/DESCRIPTION 2010-09-25 07:31:45 UTC (rev 310)
+++ pkg/svSweave/DESCRIPTION 2010-09-25 07:32:17 UTC (rev 311)
@@ -4,8 +4,8 @@
Depends: R (>= 2.6.0)
Imports: utils
Description: Supporting functions for the GUI API (Sweave functions)
-Version: 0.9-1
-Date: 2009-07-14
+Version: 0.9-2
+Date: 2010-09-11
Author: Philippe Grosjean
Maintainer: Philippe Grosjean <phgrosjean at sciviews.org>
License: GPL-2
Modified: pkg/svSweave/NEWS
===================================================================
--- pkg/svSweave/NEWS 2010-09-25 07:31:45 UTC (rev 310)
+++ pkg/svSweave/NEWS 2010-09-25 07:32:17 UTC (rev 311)
@@ -1,10 +1,15 @@
= svSweave News
+== Changes in svSweave 0.9-2
+
+* Added a svSweave-package help page.
+
+
== Changes in svSweave 0.9-1
-* The LaTeX command for our chunks is renamed from \Rchunk{} to \rchunk{}
+* The LaTeX command for our chunks is renamed from \Rchunk{} to \rchunk{}.
== Changes in svSweave 0.9-0
-This is the first version distributed on R-forge.
+This is the first version distributed on R-forge and CRAN.
Modified: pkg/svSweave/R/cleanLyxRnw.R
===================================================================
--- pkg/svSweave/R/cleanLyxRnw.R 2010-09-25 07:31:45 UTC (rev 310)
+++ pkg/svSweave/R/cleanLyxRnw.R 2010-09-25 07:32:17 UTC (rev 311)
@@ -1,39 +1,39 @@
-"cleanLyxRnw" <- function (RnwCon, RnwCon2 = RnwCon)
+cleanLyxRnw <- function (RnwCon, RnwCon2 = RnwCon)
{
- # Read the data in the Rnw file
+ ## Read the data in the Rnw file
Rnw <- readLines(RnwCon)
- # If the Rnw file is produced with LyX and SciViews Sweave module, chunks are
- # separated by \rchunk{<<[pars]>>= ... @}
+ ## If the Rnw file is produced with LyX and SciViews Sweave module, chunks are
+ ## separated by \rchunk{<<[pars]>>= ... @}
- # Beginning of R-Chunks (rewrite into <<[pars]>>=)
+ ## Beginning of R-Chunks (rewrite into <<[pars]>>=)
starts <- grepl("^\\\\rchunk\\{<<.*>>=$", Rnw)
Rnw[starts] <- sub("^\\\\rchunk\\{", "", Rnw[starts])
- # End of R-Chunks (rewrite as @)
+ ## End of R-Chunks (rewrite as @)
ends <- grepl("^@[ \t]*\\}$", Rnw)
Rnw[ends] <- "@"
parts <- cumsum(starts | ends)
chunk <- parts %% 2 > 0 # R chunks are odd parts
- # Do we need to change something?
+ ## Do we need to change something?
if (!any(chunk))
return(writeLines(Rnw, RnwCon2))
- # Eliminate empty strings not followed by empty strings inside chunks
+ ## Eliminate empty strings not followed by empty strings inside chunks
Rnw[chunk & Rnw == "" & Rnw != c(Rnw[-1], " ")] <- NA
isna <- is.na(Rnw)
Rnw <- Rnw[!isna]
chunk <- chunk[!isna]
- # Eliminate successive empty strings (keep only one)
+ ## Eliminate successive empty strings (keep only one)
Rnw[chunk & Rnw == "" & Rnw == c(Rnw[-1], " ")] <- NA
Rnw <- Rnw[!is.na(Rnw)]
- # Convert tabulations into four spaces inside chunks (8 spaces by default)
+ ## Convert tabulations into four spaces inside chunks (8 spaces by default)
Rnw[chunk] <- gsub("\t", " ", Rnw[chunk])
- # Write the result to the new .Rnw file
+ ## Write the result to the new .Rnw file
return(writeLines(Rnw, RnwCon2))
}
Modified: pkg/svSweave/man/cleanLyxRnw.Rd
===================================================================
--- pkg/svSweave/man/cleanLyxRnw.Rd 2010-09-25 07:31:45 UTC (rev 310)
+++ pkg/svSweave/man/cleanLyxRnw.Rd 2010-09-25 07:32:17 UTC (rev 311)
@@ -17,10 +17,10 @@
}
\arguments{
- \item{RnwCon}{ A connection object or a character string corresponding to the
- path to a R noweb file to be read }
- \item{RnwCon2}{ Idem, but where the cleaned up R noweb file should be written
- (by default, on the same file or connection) }
+ \item{RnwCon}{ a connection object or a character string corresponding to the
+ path to a R noweb file to be read. }
+ \item{RnwCon2}{ idem, but where the cleaned up R noweb file should be written
+ (by default, on the same file or connection). }
}
\value{
@@ -29,3 +29,5 @@
\author{ Philippe Grosjean <phgrosjean at sciviews.org> }
\keyword{ utilities }
+
+\concept{ Litterate programming, weaving, tangling from LyX using Sweave }
Added: pkg/svSweave/man/svSweave-package.Rd
===================================================================
--- pkg/svSweave/man/svSweave-package.Rd (rev 0)
+++ pkg/svSweave/man/svSweave-package.Rd 2010-09-25 07:32:17 UTC (rev 311)
@@ -0,0 +1,31 @@
+\name{svSweave-package}
+\alias{svSweave-package}
+\alias{svSweave}
+\docType{package}
+
+\title{ SciViews GUI API - Sweave functions }
+\description{
+ The SciViews svSweave package provides additional function to use Sweave with
+ LyX and Sciviews-L.
+}
+\details{
+ \tabular{ll}{
+ Package: \tab svSweave\cr
+ Type: \tab Package\cr
+ Version: \tab 0.9-2\cr
+ Date: \tab 2010-09-11\cr
+ License: \tab GPL 2 or above, at your convenience\cr
+ }
+ % TODO: add description of main functions here. Also add examples
+}
+
+\author{
+ Philippe Grosjean
+
+ Maintainer: Ph. Grosjean <phgrosjean at sciviews.org>
+}
+
+\keyword{ package }
+\keyword{ utilities }
+
+\concept{ GUI API sweave LyX litterate programming }
More information about the Sciviews-commits
mailing list