Skip to content

Commit

Permalink
demo/example-minouw: Replace non-ascii characters to keep CMD check h…
Browse files Browse the repository at this point in the history
…appy
  • Loading branch information
lentinj committed Oct 27, 2017
1 parent 82bc82a commit 4a01a83
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions demo/example-minouw-size_frq.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ xlsx_files <- c(
""
)
sanitize_lat_lon <- function (s) {
s <- gsub("°", " ", s)
s <- gsub("\u00B0", " ", s) # i.e. degree symbol
s <- gsub("'", " ", s)
measurements::conv_unit(s, from = 'deg_min_sec', to = 'dec_deg')
}
Expand Down Expand Up @@ -72,9 +72,9 @@ OTB.DM57 "traditional Catalan trawl" 40 40
OTB.DM58 "traditional Catalan trawl" 40 40
OTB.DM59 "traditional Catalan trawl" 40 40
HOK.5 "Bottom Longline hooksize <5" 5 5
GTS.GNS_50_100 "Gill net ≥50 mm and <100 mm" 50 100
GTS.GNS_50_100 "Gill net \u226550 mm and <100 mm" 50 100
GTS.GTR_40 "Trammel net <40 mm" 0 40
GTS.GTR_40_60 "Trammel net ≥40 and <60" 40 6
GTS.GTR_40_60 "Trammel net \u226540 and <60" 40 6
'), header = TRUE)
########### Read in CSIC
case_study <- "csic"
Expand Down
4 changes: 2 additions & 2 deletions demo/example-minouw-taxon1.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ library(mfdb)
# "42:32" mins/secs
# cibm problems
# * Empty rows at start of spreadsheet
# * Inconsistent lat/lon formats: 42°29'50 vs 42 26 13
# * Inconsistent lat/lon formats: 42\u00B029'50 vs 42 26 13
# * 10 46978 --> 10 46 978
# * No locations defined
# * Column names including all data "discarded (D) N"
Expand All @@ -27,7 +27,7 @@ xlsx_files <- c(
""
)
sanitize_lat_lon <- function (s) {
s <- gsub("°", " ", s)
s <- gsub("\u00B0", " ", s) # i.e. degree symbol
s <- gsub("'", " ", s)
measurements::conv_unit(s, from = 'deg_min_sec', to = 'dec_deg')
}
Expand Down
6 changes: 3 additions & 3 deletions demo/example-minouw-taxon2.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ xlsx_files <- c(
""
)
sanitize_lat_lon <- function (s) {
s <- gsub("°", " ", s)
s <- gsub("\u00B0", " ", s) # i.e. degree symbol
s <- gsub("'", " ", s)
measurements::conv_unit(s, from = 'deg_min_sec', to = 'dec_deg')
}
Expand Down Expand Up @@ -90,9 +90,9 @@ fleets <- c(
otb.large = "OTBlarge",
otb.small = "OTBsmall",
bll.small = "Bottom Longline hooksize <5",
gil.med = "Gill net ≥50 mm and <100 mm",
gil.med = "Gill net \u226550 mm and <100 mm",
gtr.small = "Trammel net <40 mm",
gtr.med = "Trammel net ≥40 and <60",
gtr.med = "Trammel net \u226540 and <60",
gtr.large = "Trammel net <40 mm"
)
reverse_lookup <- function (l, col) {
Expand Down

0 comments on commit 4a01a83

Please sign in to comment.