Skip to content
Snippets Groups Projects
Commit fd8b29af authored by Walmes Zeviani's avatar Walmes Zeviani
Browse files

Files generated automatically.

parent 5dd43a64
No related branches found
No related tags found
No related merge requests found
# Generated by roxygen2 (4.1.1): do not edit by hand # Generated by roxygen2 (4.1.1): do not edit by hand
export(biasBox) export(biasBox)
export(knit2wpCrayon)
export(loessGui) export(loessGui)
export(panel.segplot.by)
export(polyGui) export(polyGui)
export(runAllChunks) export(runAllChunks)
export(subsetDropAll) export(subsetDropAll)
export(twoStripCombined) export(twoStripCombined)
export(yscale.component.right)
import(gWidgets) import(gWidgets)
import(gWidgetstcltk) import(gWidgetstcltk)
import(knitr) import(knitr)
import(lattice) import(lattice)
import(latticeExtra)
% 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}
}
% 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}}
}
% 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}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment