R/set_username.R

Defines functions set_username

Documented in set_username

#' Set your ICES username
#'
#' Set the ICES user or logon name that will be used for requests
#'
#' @param username the ices username you use to login to the ICES SharePoint
#'   for example.
#'
#' @return invisible value: the previous username that was set
#'
#' @examples
#' \dontrun{
#' set_username("myusername")
#' }
#'
#' @rdname set_username
#'
#' @export
set_username <- function(username) {
  write.dcf(
    list(username = username),
    file.path(config_dir(), "username.dcf")
  )
}

Try the icesConnect package in your browser

Any scripts or data that you put into this service are public.

icesConnect documentation built on June 8, 2025, 10:53 a.m.