R/acronyms.R

Defines functions install.pakcages ans

Documented in ans

#' Get last value
#' @description A shorter way to get the \code{.Last.value}
#' @export
ans = function(){
    base::.Last.value
}


# function acronyms ----
#' @export
len = length
#' @export
as.char = as.character
#' @export
as.df = as.data.frame
#' @export
as.num = as.numeric
#' @export
rn = rownames
#' @export
cn = colnames

#' @export
`rn<-` = `rownames<-`
#' @export
`cn<-` = `colnames<-`

#' @export
install.pakcages = function(...){
    # don't insult strangers
    if(Sys.info()['nodename'] %in%  c('nelson.msl.ubc.ca','pavdesk-26','oganm','oganGR')){
        warning('you spelled it wrong moron')
    } else{
        warning("You seem to have mispelled install.packages. Worry not, I got you. Just don't do it again.")
    }
    install.packages(...)
}

#' @export
insPack = install.packages
oganm/ogbox documentation built on Feb. 18, 2024, 12:37 a.m.