Skip to content

Commit f5b22ea

Browse files
committed
removed unused link() macro from two vignettes
1 parent cade8e4 commit f5b22ea

File tree

2 files changed

+3
-46
lines changed

2 files changed

+3
-46
lines changed

vignettes/Rcpp-extending.Rnw

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -43,37 +43,15 @@
4343
<<echo=FALSE,print=FALSE>>=
4444
prettyVersion <- packageDescription("Rcpp")$Version
4545
prettyDate <- format(Sys.Date(), "%B %e, %Y")
46+
require(inline)
47+
require(highlight)
48+
require(Rcpp)
4649
@
4750

4851
\author{Dirk Eddelbuettel \and Romain Fran\c{c}ois}
4952
\title{Extending \pkg{Rcpp}}
5053
\date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}}
5154

52-
<<echo=FALSE>>=
53-
link <- function( f, package, text = f, root = "http://finzi.psych.upenn.edu/R/library/" ){
54-
h <- if( missing(package) ) {
55-
as.character( help( f ) )
56-
} else {
57-
as.character( help( f, package = paste( package, sep = "" ) ) )
58-
}
59-
if( ! length(h) ){
60-
sprintf( "\\\\textbf{%s}", f )
61-
} else {
62-
rx <- "^.*/([^/]*?)/help/(.*?)$"
63-
package <- sub( rx, "\\1", h, perl = TRUE )
64-
page <- sub( rx, "\\2", h, perl = TRUE )
65-
sprintf( "\\\\href{%s%s/html/%s.html}{\\\\texttt{%s}}", root, package, page, text )
66-
}
67-
}
68-
linkS4class <- function( cl, package, text = cl, root = "http://finzi.psych.upenn.edu/R/library/" ){
69-
link( sprintf("%s-class", cl), package, text, root )
70-
}
71-
72-
require(inline)
73-
require(highlight)
74-
require(Rcpp)
75-
@
76-
7755
\begin{document}
7856
\maketitle
7957

vignettes/Rcpp-sugar.Rnw

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -47,27 +47,6 @@ prettyDate <- format(Sys.Date(), "%B %e, %Y")
4747
\title{\pkg{Rcpp} syntactic sugar}
4848
\date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}}
4949

50-
<<echo=FALSE>>=
51-
link <- function( f, package, text = f, root = "http://finzi.psych.upenn.edu/R/library/" ){
52-
h <- if( missing(package) ) {
53-
as.character( help( f ) )
54-
} else {
55-
as.character( help( f, package = paste( package, sep = "" ) ) )
56-
}
57-
if( ! length(h) ){
58-
sprintf( "\\\\textbf{%s}", f )
59-
} else {
60-
rx <- "^.*/([^/]*?)/help/(.*?)$"
61-
package <- sub( rx, "\\1", h, perl = TRUE )
62-
page <- sub( rx, "\\2", h, perl = TRUE )
63-
sprintf( "\\\\href{%s%s/html/%s.html}{\\\\texttt{%s}}", root, package, page, text )
64-
}
65-
}
66-
linkS4class <- function( cl, package, text = cl, root = "http://finzi.psych.upenn.edu/R/library/" ){
67-
link( sprintf("%s-class", cl), package, text, root )
68-
}
69-
@
70-
7150
\begin{document}
7251
\maketitle
7352

0 commit comments

Comments
 (0)