how elem_list_rect function accept named vector or list to be used as parameters?
junjunlab opened this issue · comments
JunJun commented
Hi, I am comming again. I want to used a named vector or list to the elem_list_rect() function, but I found the doesn't work:
column_strip_setting_list = c(color = "red",fill = "white")
# or
column_strip_setting_list = list(color = "red",fill = "white")
background_x = elem_list_rect(column_strip_setting_list)
Teun van den Brand commented
The function accepts key = value
arguments, not a list of arguments.
To programmatically call the function with arguments in a list, you can do do.call(elem_list_rect, column_strip_setting_list)
.
This isn't really any different to how most functions in R work with ellipsis (...), so I don't think this is a bug.