I am new to Emacs and one thing I really like about it is the "tramp". I use R with ESS and usually "tramp" to my work computer from home. We also have an HPC server and I am wondering whether it is possible to open a "tramp" to the HPC server, call an interactive session using "qrsh" and open an ESS based R process. I've done this just by "tramping" to a terminal then called "qrsh" and ran an R process inside the terminal. I could send commands from my script to the shell-based R process but obviously this is not the same as having ESS's inferior R mode.
Thanks.
Edit: I've tried
(add-to-list 'tramp-methods
'("qrsh"
(tramp-login-program "qrsh")
(tramp-login-args (("-V -cwd -l inter -l short"))) ; other options here?
;; Local $SHELL could be a nasty one, like zsh or fish. Let's override it.
(tramp-login-env (("SHELL") ("/bin/sh")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-args ("-c"))
(tramp-connection-timeout 10)))
Then after M-x R RET /ssh:myserver|qrsh:myserver:TempDir RET