R/vkCurrentAdAccount.R

Defines functions vkCurrentClientAccount vkCurrentAdAccount

# function for detect account_id and client_id ----------------------------
vkCurrentAdAccount <- function() {
  
  if ( is.null(getOption("rvkstat.agency_id")) ) {
    
    return(getOption("rvkstat.account_id"))
    
  } else {
    
    return(getOption("rvkstat.agency_id"))
    
  }
  
}

vkCurrentClientAccount <- function() {
  
  if ( !is.null(getOption("rvkstat.agency_id")) ) {
    
    return(getOption("rvkstat.account_id"))
    
  } else {
    
    return(NULL)
    
  }
  
}

Try the rvkstat package in your browser

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

rvkstat documentation built on Oct. 18, 2021, 5:07 p.m.