[...]
For users who would really prefer to not type in ports and/or tokens each time, you might consider adding options, where the defaults are sane (allowing them to set personal prefs in ~/.Rprofile):
In related packages, I've found it useful when the "random port" remains constant for the current R session. It's not hard to do: generate a random port and token in .onLoad and/or you can use a local({ ... function(...) {... } }) trick for a function (likely httpgd::httpgd).
[...] For users who would really prefer to not type in ports and/or tokens each time, you might consider adding
options
, where the defaults are sane (allowing them to set personal prefs in~/.Rprofile
):In related packages, I've found it useful when the "random port" remains constant for the current R session. It's not hard to do: generate a random port and token in
.onLoad
and/or you can use alocal({ ... function(...) {... } })
trick for a function (likelyhttpgd::httpgd
).[...]
Originally posted by @r2evans in https://github.com/nx10/httpgd/issues/5#issuecomment-637157337