How can i use getopts arugments in renv::run()

I'm trying to create an Rscript which is in a renv project but I couldn't find out how can I give getopts arguments to run the script.

When I tried something like this
Rscript -e "renv::run('pdf_tables.R -i /home -o /home', project = '/home/user/code/project')"
got this error message

Error in normalizePath(path, winslash, mustWork) :
path[1]="/home/krishna/code/rna_seq_amlab/pdf_tables.R -i /home -o /home": No such file or directory
Calls: -> renv_path_normalize -> normalizePath
Traceback (most recent calls last):
3: renv::run("pdf_tables.R -i /home -o /home", project = "/home/krishna/code/rna_seq_amlab")
2: renv_path_normalize(script, mustWork = TRUE)
1: normalizePath(path, winslash, mustWork)
Execution halted

Help me out.
Thanks in advance.

renv::run() doesn't currently support passing of custom arguments to a script. You might want to file a feature request at Issues · rstudio/renv · GitHub.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.