Skip to content

Commit 818e503

Browse files
author
Lindsay Carr
committed
don't use xy.coords because it does not retain class
1 parent 24421d2 commit 818e503

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

R/set_args.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ set_args <- function(fun.name, ..., custom.config = FALSE, package='graphics'){
1515
user_args <- function_args(name=fun.name, package=package, ...)
1616

1717
if(fun.name %in% c('points', 'lines')){
18-
xy_args <- xy.coords(x = user_args[['x']], y = user_args[['y']])
19-
user_args <- append_replace(user_args, xy_args)
18+
if(!is.null(user_args[['x']]) & is.null(user_args[['y']])){
19+
xy_args <- list(x = seq_along(user_args[['x']]),
20+
y = user_args[['x']])
21+
user_args <- append_replace(user_args, xy_args)
22+
}
2023
}
2124

2225
indicesToAdd <- !(names(config_args) %in% names(user_args))

0 commit comments

Comments
 (0)