From fd8b29af93c6feeb261d5e5464e401228600dd2c Mon Sep 17 00:00:00 2001 From: Walmes Zeviani <walmeszeviani@gmail.com> Date: Sun, 13 Sep 2015 15:58:01 -0300 Subject: [PATCH] Files generated automatically. --- NAMESPACE | 4 ++ man/knit2wpCrayon.Rd | 68 ++++++++++++++++++++++++++++ man/panel.segplot.by.Rd | 82 ++++++++++++++++++++++++++++++++++ man/yscale.components.right.Rd | 55 +++++++++++++++++++++++ 4 files changed, 209 insertions(+) create mode 100644 man/knit2wpCrayon.Rd create mode 100644 man/panel.segplot.by.Rd create mode 100644 man/yscale.components.right.Rd diff --git a/NAMESPACE b/NAMESPACE index 1734ab7..85522d0 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,12 +1,16 @@ # Generated by roxygen2 (4.1.1): do not edit by hand export(biasBox) +export(knit2wpCrayon) export(loessGui) +export(panel.segplot.by) export(polyGui) export(runAllChunks) export(subsetDropAll) export(twoStripCombined) +export(yscale.component.right) import(gWidgets) import(gWidgetstcltk) import(knitr) import(lattice) +import(latticeExtra) diff --git a/man/knit2wpCrayon.Rd b/man/knit2wpCrayon.Rd new file mode 100644 index 0000000..d916883 --- /dev/null +++ b/man/knit2wpCrayon.Rd @@ -0,0 +1,68 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/knit2wpCrayon.R +\name{knit2wpCrayon} +\alias{knit2wpCrayon} +\title{knit to wordpress that uses crayon sintax highlight} +\usage{ +knit2wpCrayon(input, title = "A post from knitr", ..., action = c("newPost", + "editPost", "newPage"), postid, encoding = getOption("encoding"), + upload = FALSE, publish = FALSE, write = TRUE) +} +\arguments{ +\item{input}{a markdown or Rmarkdown file.} + +\item{title}{title for the post.} + +\item{...}{other meta information of the post. See} + +\item{action}{indicates a new post, a edition of the post or a new +page.} + +\item{postid}{number of the post.} + +\item{encoding}{ht encoding of the input file.} + +\item{upload}{logical, if the file is to be updated to the blog.} + +\item{publish}{logical, if the post is to be published or stay in +draft mode.} + +\item{write}{logical, is the result of knit be written to a html + file. This is useful to copy from this file and paste inside the + wordpress post editor (on text mode, not visual mode).} +} +\value{ +None is returned by the function. +} +\description{ +This function improves the \code{RWordPress::knit2wp} to + allow properly render code when using Crayon Sintax Highlighter. +} +\examples{ +\donttest{ + +library(knitr) +library(RWordPress) + +post <- "2015-08-24_polyGui.Rmd" +title <- "Interface para regressão polinomial" +categ <- c("gui", "rbloggers_pt") +keywd <- c("gWdigets", "legTools", "lm", "poly") + +pass <- scan(n=1, what=character()) +options(WordpressLogin=c(walmes=pass), + WordpressURL="http://blog.leg.ufpr.br/xmlrpc.php") + +knit2wpCrayon(post, title=title, + action="editPost", postid=179, + categories=categ, mt_keywords=keywd, + ## write=TRUE, upload=FALSE, + write=FALSE, upload=TRUE, + publish=FALSE) + +} +} +\author{ +Walmes Zeviani, \email{walmes@ufpr.br} +} + diff --git a/man/panel.segplot.by.Rd b/man/panel.segplot.by.Rd new file mode 100644 index 0000000..bebaf57 --- /dev/null +++ b/man/panel.segplot.by.Rd @@ -0,0 +1,82 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/panel.segplot.by.R +\name{panel.segplot.by} +\alias{panel.segplot.by} +\title{Lattice panel to non overlapping segments in \code{segplot()}} +\usage{ +panel.segplot.by(x, y, z, data, centers, subscripts, groups, f = 0.05, + rev = FALSE, ...) +} +\arguments{ +\item{x,y,z,data,centers,subscripts,...}{see +\code{\link[latticeExtra]{segplot}}.} + +\item{groups}{the grouping variable. Must be a factor.} + +\item{f}{numeric, factor that is the vertical distance among +arrows. In general a value less than 1. Default is 0.05.} + +\item{rev}{logical, use the reverse order of the factor levels to + place the segments. Default is \code{FALSE}.} +} +\value{ +None is returned. +} +\description{ +This panel allows no overlapping of segments in + \code{latticeExtra::segplot()} when using the argument groups. +} +\examples{ +library(latticeExtra) + +m0 <- lm(log(breaks)~wool*tension, data=warpbreaks) +anova(m0) +par(mfrow=c(2,2)); plot(m0); layout(1) + +pred <- data.frame(wool=c("A", "B", "A", "B", "A", "B"), + tension=c("L", "L", "M", "M", "H", "H")) + +X <- matrix(c(1, 1, 1, 1, 1, 1, + 0, 1, 0, 1, 0, 1, + 0, 0, 1, 1, 0, 0, + 0, 0, 0, 0, 1, 1, + 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 1), nrow=6, ncol=6) + +## Estimate and standart error. +## X\%*\%coef(m0) +## sqrt(diag(X\%*\%vcov(m0)\%*\%t(X))) + +U <- chol(vcov(m0)) +pred$est <- X\%*\%coef(m0) +pred$se <- sqrt(apply(X\%*\%t(U), MARGIN=1, FUN=function(x) sum(x^2))) + +tval <- qt(p=c(lwr=0.025, upr=0.975), df=df.residual(m0)) +pred <- cbind(pred, sweep(x=outer(pred$se, tval, "*"), + MARGIN=1, STATS=pred$est, FUN="+")) + +## Overlapping segments. +segplot(wool~lwr+upr, centers=est, data=pred, draw=FALSE) + +## Prefer ordering always before using "pch=". +pred <- pred[with(pred, order(tension, wool)), ] + +segplot(tension~lwr+upr, data=pred, + centers=est, draw=FALSE, + ylab="Tension level", + xlab=expression("Estimate"\%+-\%"error margin for a 0.95 CI"), + groups=wool, f=0.05, rev=TRUE, + pch=as.integer(pred$wool), + panel=panel.segplot.by, + key=list(title="Type of wool", cex.title=1.1, + text=list(levels(pred$wool)), + lines=list(pch=1:2, lty=1), + divide=1, type="o")) +} +\author{ +Walmes Zeviani, \email{walmes@ufpr.br} +} +\seealso{ +\code{\link[latticeExtra]{segplot}} +} + diff --git a/man/yscale.components.right.Rd b/man/yscale.components.right.Rd new file mode 100644 index 0000000..cfe1220 --- /dev/null +++ b/man/yscale.components.right.Rd @@ -0,0 +1,55 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/yscale.components.right.R +\name{yscale.components.right} +\alias{yscale.component.right} +\alias{yscale.components.right} +\title{y-axis annotations on the right side} +\source{ +When such feature was necessary, a search in the web was done + and a post in the r-help mailing list inspired us + \code{http://r.789695.n4.nabble.com/Spacing-between-lattice-panels-td855613.html}. +} +\usage{ +yscale.component.right(...) +} +\arguments{ +\item{...}{arguments passed by the lattice function called. See + \link[lattice]{yscale.components.default}.} +} +\description{ +This function if for place y axis annotation on the + right side of the plot. +} +\examples{ +library(lattice) +library(latticeExtra) + +## alternating=2 works when relation="same". +p1 <- xyplot(yield~K|N+P, data=npk, + scales=list(y=list(alternating=2))) +useOuterStrips(p1) + +## y annotation don't is written on the right side. +p2 <- xyplot(yield~K|N+P, data=npk, + scales=list(y=list(relation="free", alternating=2))) +useOuterStrips(p2) + +## The desired result. +p3 <- xyplot(yield~K|N+P, data=npk, + scales=list(y=list(relation="free", alternating=2)), + ylab=NULL, ylab.right="Yield", + yscale.component=yscale.component.right, + between=list(x=0.5, y=0.2), + par.settings=list( + layout.widths=list( + right.padding=-2, + left.padding=-2, + ylab.right=5), + strip.background=list(col=c("gray50", "gray90"))), + ) +useOuterStrips(p3) +} +\author{ +Walmes Zeviani, \email{walmes@ufpr.br} +} + -- GitLab