From 4a01a836f7fddb025f7aadcf1b48f0182792832a Mon Sep 17 00:00:00 2001 From: Jamie Lentin Date: Fri, 27 Oct 2017 17:09:42 +0000 Subject: [PATCH] demo/example-minouw: Replace non-ascii characters to keep CMD check happy --- demo/example-minouw-size_frq.R | 6 +++--- demo/example-minouw-taxon1.R | 4 ++-- demo/example-minouw-taxon2.R | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/demo/example-minouw-size_frq.R b/demo/example-minouw-size_frq.R index a0768ce..a1e7359 100644 --- a/demo/example-minouw-size_frq.R +++ b/demo/example-minouw-size_frq.R @@ -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') } @@ -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" diff --git a/demo/example-minouw-taxon1.R b/demo/example-minouw-taxon1.R index 875100b..749d940 100644 --- a/demo/example-minouw-taxon1.R +++ b/demo/example-minouw-taxon1.R @@ -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" @@ -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') } diff --git a/demo/example-minouw-taxon2.R b/demo/example-minouw-taxon2.R index 77fcc4c..912544f 100644 --- a/demo/example-minouw-taxon2.R +++ b/demo/example-minouw-taxon2.R @@ -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') } @@ -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) {