<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def Rscript_cmd():
 """Retrieve path to locally installed Rscript or first in PATH. Prefers Rscript version installed via conda to a system version. """

    rscript = which(os.path.join(get_bcbio_bin(), "Rscript"))
    if rscript:
        return rscript
    else:
        return which("Rscript")