Mercurial > repos > prog > lcmsmatching
view nethlp.R @ 5:fb9c0409d85c draft
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit 608d9e59a0d2dcf85a037968ddb2c61137fb9bce
author | prog |
---|---|
date | Wed, 19 Apr 2017 10:00:05 -0400 |
parents | e66bb061af06 |
children |
line wrap: on
line source
if ( ! exists('extract.address')) { ################### # EXTRACT ADDRESS # ################### extract.address <- function(url) { addr <- sub('^([0-9A-Za-z.]+).*$', '\\1', url, perl = TRUE) return(addr) } ################ # EXTRACT PORT # ################ extract.port <- function(url) { port <- sub('^.*:([0-9]+)$', '\\1', url, perl = TRUE) return(as.integer(port)) } }