Skip to content

Commit 0f98b77

Browse files
author
Lindsay Carr
committed
fixing indexing: "pt.lwd" was replacing "bg", etc
1 parent 0296796 commit 0f98b77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/set_args.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ set_legend_args <- function(object, fun.name, ..., legend.name) {
8585
if (fun.name == "points") {
8686
pt.names <- c("lwd","bg","cex")
8787
names(paramsAll) <- replace(names(paramsAll), which(names(paramsAll) %in% pt.names),
88-
paste0("pt.", pt.names[which(pt.names %in% names(paramsAll))]))
88+
paste0("pt.", pt.names[na.omit(match(names(paramsAll), pt.names))]))
8989
fun.specific <- list(border=quote(par("bg")),
9090
pch=1,
9191
pt.bg=quote(par("bg")),

0 commit comments

Comments
 (0)