[R] regex in maps package
    Ashim Kapoor 
    ashimkapoor at gmail.com
       
    Tue Oct 17 14:20:34 CEST 2017
    
    
  
Dear All,
>From :
?maps::map
we have :
     map(database = "world", regions = ".", exact = FALSE, boundary = TRUE,
       interior = TRUE, projection = "", parameters = NULL, orientation =
NULL,
       fill = FALSE, col = 1, plot = TRUE, add = FALSE, namesonly = FALSE,
       xlim = NULL, ylim = NULL, wrap = FALSE, resolution = if (plot) 1
else 0,
       type = "l", bg = par("bg"), mar = c(4.1, 4.1, par("mar")[3], 0.1),
       myborder = 0.01, namefield="name", lforce="n", ...)
My query is the regex regions="." will match any single character. Should
it not be regions =".*" to be precise? Although I do realize that "." will
also match any string except "" (the empty string)? To be precise it should
be ".*" which can match an empty string as well ANY arbitrary string. I was
confused for a short while when I first read this. Look forward to
clarification on this.
Many thanks,
Ashim
	[[alternative HTML version deleted]]
    
    
More information about the R-help
mailing list