view nethlp.R @ 4:b34c14151f25 draft

planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit 494194bb501d1d7033613131865f7bd68976041c
author prog
date Tue, 14 Mar 2017 12:40:22 -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))
	}
}