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.