Skip to content

Commit

Permalink
Remove the 2nd setwd() call
Browse files Browse the repository at this point in the history
  • Loading branch information
Anirban166 committed Jul 6, 2021
1 parent d0ba98f commit 0715166
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions R/doc.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ dldoc <- function # Make directlabels documentation
### Package directory root.
){
odir <- setwd(pkgdir)
on.exit(setwd(odir))
docdir <- file.path("tests","doc")
docdirs <- dir(docdir)
plotfiles <- sapply(docdirs,function(d)Sys.glob(file.path(docdir,d,"*.R")))
Expand Down Expand Up @@ -52,7 +51,7 @@ dldoc <- function # Make directlabels documentation
plotcodes <- paste("{\n",sapply(L$plots,"[[","code"),"\n}",sep="",collapse=",\n")
forloop <- paste("\nfor(p in list(",plotcodes,"))",sep="")
dlines <- paste(paste('print(direct.label(p,"',
names(L$posfuns),'"))',sep=""),collapse="\n ")
names(L$posfuns),'"))',sep=""),collapse="\n ")
sprintf("### %s Positioning Methods%s{\n %s\n}\n",L$type,forloop,dlines)
}
rd <- apply(m[rownames(m)!="utility.function",],1,makerd)
Expand Down

0 comments on commit 0715166

Please sign in to comment.