comparison nethlp.R @ 6:f86fec07f392 draft default tip

planemo upload commit c397cd8a93953798d733fd62653f7098caac30ce
author prog
date Fri, 22 Feb 2019 16:04:22 -0500
parents fb9c0409d85c
children
comparison
equal deleted inserted replaced
5:fb9c0409d85c 6:f86fec07f392
1 if ( ! exists('extract.address')) {
2
3 ###################
4 # EXTRACT ADDRESS #
5 ###################
6
7 extract.address <- function(url) {
8
9 addr <- sub('^([0-9A-Za-z.]+).*$', '\\1', url, perl = TRUE)
10
11 return(addr)
12 }
13
14 ################
15 # EXTRACT PORT #
16 ################
17
18 extract.port <- function(url) {
19
20 port <- sub('^.*:([0-9]+)$', '\\1', url, perl = TRUE)
21
22 return(as.integer(port))
23 }
24 }