Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Use of as.name #10

Open
mboyas-mitre opened this issue Jan 16, 2019 · 1 comment
Open

Question: Use of as.name #10

mboyas-mitre opened this issue Jan 16, 2019 · 1 comment

Comments

@mboyas-mitre
Copy link
Contributor

openVA/openVA/R/VAmain.r

Lines 168 to 173 in d6e2af7

args$data <- as.name("data")
args$train <- as.name("data.train")
args$cause <- as.name("causes.train")
args$type <- convert.type
fit <- do.call("insilico.train", pairlist(args)[[1]][-1])

What is the logic behind using as.name and then a do.call here? Why not just call insilico.train directly on the appropriate arguments? At first glance, this seems like a complicated way of achieving the end goal, but we wanted to double check about what is happening in these lines of code before experimenting with alternatives.

@richardli
Copy link
Collaborator

It was supposed to pass the additional arguments, i.e., the "..." in the input argument, to insilico.train, without specifying everything in the document here. And it also serves to map the different argument names. Any suggestions to make it easier?

I know the best option is perhaps to rename everything across packages so that they are consistent. Will see if at some point someone can do that...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants