You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
library(BoutrosLab.plotting.general);
set.seed(13);
call.args<-list(
formula=y~x,
data=data.frame(
x= rnorm(100),
y= rnorm(100)
),
main='Not going to work'
);
do.call(create.scatterplot, call.args)
#> Error in function.name == "create.lollipopplot": comparison (1) is possible only for atomic and list types
Note that this does work with other BPG functions.
Note: I thought this was as simple as changing match.call() to sys.calls() but issues occur if evaluating (such as reprex).
The three cases to check if the function name can be accessed:
Standard call: create.scatterplot(...)
do.call(create.scatterplot, list(...))
Evaluated in another context (such as reprex, etc.)
Current implementation using match.call() works for 1. and 3. but not 2. Using sys.calls() works for 1. and 2. but not 3.
Note that this does work with other BPG functions.
Created on 2023-07-11 with reprex v2.0.2
Code errors here:
https://github.com/uclahs-cds/public-R-BoutrosLab-plotting-general/blob/main/R/create.scatterplot.R#L203-L208
The text was updated successfully, but these errors were encountered: