Closed andrew-MET closed 4 years ago
Alternatively, we can use a better strsplit command (+ must be preceded by spaces or start of string) p1 <- strsplit(pp,"[ ]+[+]|^[+]")[[1]][-1] # vector of "x=n" strings
That's certainly more concise. I had trouble coming up with the regex to do that! I have updated the PR with that solution.
In situations where values in the proj4 string are in scientific format, e.g. "+proj=lcc +lat_0=63.3 +lon_0=15 +lat_1=63.3 +lat_2=63.3 +no_defs +R=6.371e+06" the value for R would be split at the "+". This PR ensures that the proj4 string is split at "+" followed by a letter.
Old version:
New version: