I have a character column of multiplygon type where each value has a string containing multiple lat long coordinates,i want to find all the rows having lat long less than 4 along with the values.I have done this using for loops in R but that makes the execution very slow. Is there a better way to achieve this.I have tried using str.split with lapply and rbind but as the column number changes with each str.split the rbind fills the columns automatically instead of leaving NAs.Below is the sample code that is working fine with for loops but but with large data it gets very slow. 'test3' is the dataframe and 'location' is the column containing multiple lat long values(each column value is of different length) Sample column value:
1660|ABC|Urban|const|ABC|1660|ABC-23_Girvan|MultiPolygon (((-4.8066907 55.04347151, -4.80276148 55.04454913, -4.80273576 55.04455619, -4.80272906 55.0445397, -4.8019362 55.04259356, -4.80144005 55.04137563, -4.80143642 55.04136669, -4.80143318 55.04136487, -4.79932797 55.04017957, -4.79603597 55.03832586, -4.79602477 55.03831956, -4.79602909 55.03830962, -4.79681797 55.03648828, -4.79736311 55.0352296, -4.79736682 55.03522103, -4.79737054 55.03521246, -4.79734694 55.03519212, -4.79442154 55.03266764, -4.79436702 55.03262058, -4.79429576 55.032635, -4.79012226 55.03347964, -4.79007062 55.03349009, -4.78999373 55.03356092, -4.78954942 55.03397026, -4.78945452 55.03396611, -4.78523126 55.03378099, -4.78474862 55.03585432, -4.78410562 55.03755613, -4.78131992 55.03769417, -4.77995653 55.03933729, -4.7781591 55.04093226, -4.77183228 55.03970088, -4.77169854 55.03967882, -4.76459029 55.03850547, -4.76218988 55.03966093, -4.76218404 55.03966375, -4.76216777 55.03967074, -4.76208001 55.03970845, -4.75859975 55.03906771, -4.7524626 55.04284217, -4.7463334 55.04429135, -4.74314492 55.04672472, -4.74144307 55.04822486, -4.74077155 55.04822731, -4.74042671 55.04785351, -4.73920006 55.04652378, -4.73823528 55.04516571, -4.73819305 55.04511062, -4.73818743 55.04510704, -4.73738004 55.04459257, -4.73737984 55.04459012, -4.73729138 55.04348033, -4.73404678 55.0427649, -4.73162755 55.04424351, -4.72684084 55.04622438, -4.72454247 55.0462497, -4.72419217 55.04606356, -4.72258998 55.04538684, -4.72258924 55.04538653, -4.72258871 55.04538461, -4.72235393 55.04454127, -4.72220504 55.04400487, -4.72219207 55.04395817, -4.72215619 55.04393533, -4.72058722 55.04293649, -4.72057629 55.04292953, -4.72024656 55.04287095, -4.72024615 55.04287087, -4.72024571 55.0428708, -4.71960906 55.04275791, -4.71960096 55.04274676, -4.71872616 55.04154264, -4.71859094 55.04135649, -4.71824434 55.04082598, -4.71821688 55.04077155, -4.71791095 55.0401652, -4.71788206 55.04011276, -4.71787802 55.04010957, -4.71722657 55.03959414, -4.71540401 55.03999767, -4.71538959 55.04000086, -4.71487796 55.04025596, -4.71443494 55.03989911, -4.6918896 55.04502024, -4.69187352 55.04502389, -4.68493194 55.04330826, -4.68485827 55.04330196, -4.68484986 55.04331181, -4.68281241 55.04569817, -4.68274628 55.04570207, -4.67796529 55.04598422, -4.67578179 55.04884382, -4.67396727 55.05046258, -4.67239289 55.05062117, -4.67207876 55.05062863, -4.67145075 55.05064354, -4.67135174 55.05067477, -4.67083231 55.0508386, -4.67050812 55.05090876, -4.67020746 55.05097384, -4.66989921 55.05104055, -4.6692961 55.05105565, -4.6692866 55.05105588, -4.66928375 55.05105675, -4.66870015 55.05123527, -4.66865176 55.05125052, -4.66847284 55.05141605, -4.66821431 55.0516552, -4.6598276 55.0539769, -4.65904234 55.05348943, -4.65899383 55.05345932, -4.65895686 55.05347453, -4.65713805 55.0542235, -4.65541219 55.05510604, -4.64918418 55.05654281, -4.64529045 55.05746473, -4.64472591 55.05740647, -4.64454119 55.05540513, -4.64597245 55.05372462, -4.64620866 55.05173229, -4.64481074 55.0506421, -4.6444775 55.05038221, -4.64067873 55.05173855, -4.63732431 55.05211035, -4.63358558 55.05256525, -4.63336187 55.05388239, -4.63337637 55.05575676, -4.6329212 55.05646996, -4.63148884 55.05659632, -4.62928993 55.05736526, -4.6273795 55.05758632, -4.62386505 55.05783972, -4.62063736 55.0575441, -4.61845101 55.05867326, -4.61688535 55.05942835, -4.61469633 55.06055804, -4.61215512 55.06115143, -4.6086278 55.06140072, -4.61068485 55.06371569, -4.6145987 55.06472496, -4.6178753 55.06592646, -4.62214499 55.06783014, -4.62384362 55.06978576, -4.62435655 55.07070437, -4.62308292 55.07251163, -4.62535069 55.07251111, -4.62665101 55.07515748, -4.62832449 55.07617534, -4.62740353 55.07789383, -4.63292986 55.08032549, -4.63636727 55.07929898, -4.63674717 55.08035457, -4.63597826 55.08579344, -4.63208926 55.09491179, -4.62966443 55.10145779, -4.62555688 55.12333185, -4.62453006 55.1264075, -4.62308495 55.12787298, -4.61804869 55.13120733, -4.6118031 55.13473534, -4.60906361 55.13760085, -4.60737243 55.14124439, -4.60729076 55.14142037, -4.60728565 55.14308823, -4.60728565 55.14308823, -4.60288497 55.14207939, -4.59554115 55.14069688, -4.59311992 55.14314738, -4.58945406 55.14296188, -4.58688111 55.14342821, -4.58565648 55.14532862, -4.58217713 55.14502652, -4.57473495 55.14578197, -4.57715915 55.14850591, -4.57255628 55.15058907, -4.57241801 55.15306662, -4.57060383 55.1575286, -4.56503363 55.15633224, -4.56497722 55.15817053, -4.56450719 55.15971754, -4.56253598 55.16039597, -4.55886596 55.15930976, -4.55401746 55.16075999, -4.54797659 55.16110981, -4.5408484 55.16088173, -4.5369834 55.15979893, -4.53252787 55.16054235, -4.53143396 55.16070717, -4.51799229 55.15707571, -4.51271254 55.15362149, -4.50458987 55.15491117, -4.49940285 55.1544539, -4.47472464 55.15592548, -4.47382559 55.15789315, -4.47166113 55.15951106, -4.46809419 55.15890751, -4.46608368 55.15995999, -4.46179496 55.16375731, -4.45882785 55.16869028, -4.45995621 55.17162983, -4.45685079 55.17289131, -4.45143386 55.17198661, -4.44301984 55.1702411, -4.44306281 55.16724087, -4.44288324 55.16476994, -4.4446801 55.16345964, -4.44554009 55.16183049, -4.44485583 55.16049424, -4.43952776 55.15808756, -4.43976355 55.1496472, -4.43755762 55.14335338, -4.43805226 55.14283349, -4.57473486 55.14578185, -4.60588908 55.07343634, -4.59519957 55.06233673, -4.60013217 55.06077222, -4.58944762 55.04967193, -4.58979889 55.04956051, -4.60742485 55.0511097, -4.60742485 55.05110969, -4.60742504 55.0511097, -4.60751859 55.05075858, -4.60818492 55.05109407, -4.608185 55.05109402, -4.60818511 55.05109407, -4.62479165 55.04021827, -4.62507206 55.04295189, -4.62507226 55.04295188, -4.62507226 55.0429519, -4.63288233 55.04268746, -4.63071659 55.02160371, -4.64992574 55.04154173, -4.64992589 55.04154168, -4.64992594 55.04154173, -4.65485366 55.03997507, -4.65572824 55.04088217, -4.65572834 55.04088214, -4.65572838 55.04088218, -4.66257217 55.03870582, -4.66055361 55.0366125, -4.66548053 55.03504536, -4.66346206 55.03295215, -4.66838841 55.03138489, -4.65562524 55.01814485, -4.66790927 55.01520004, -4.66595911 55.01785411, -4.72205117 55.03144487, -4.72205119 55.03144484, -4.72205135 55.03144487, -4.72508752 55.02730471, -4.72508752 55.02730471, -4.72727318 55.02432375, -4.83764211 54.99347404, -4.8391614 54.99347765, -4.84818311 54.99349909, -4.8538311 54.99932518, -4.80669355 55.04346885, -4.8066907 55.04347151))|Pnt (-4.65723857 55.07320805)|||
1552|ABC|Urban|const|ABC|1552|ABC-23_Girvan|MultiPolygon (((-4.27763349 55.3106471, -4.27809894 55.31053055, -4.28715259 55.30983888, -4.29059196 55.31033773, -4.29705406 55.31287996, -4.29825773 55.31022995, -4.29915871 55.31080432, -4.3040445 55.31063359, -4.32196403 55.30841057, -4.35013465 55.30337916, -4.35608607 55.30381051, -4.36029362 55.30259222, -4.36348063 55.30099468, -4.36629835 55.29901995, -4.36777166 55.29666621, -4.36854792 55.29393497, -4.36859387 55.29046006, -4.36444536 55.27604388, -4.36310057 55.27124315, -4.36296541 55.27076095, -4.36290831 55.27021376, -4.36010948 55.26458948, -4.35921514 55.2627564, -4.35605039 55.25626822, -4.35456341 55.25080791, -4.35539054 55.24894911, -4.35797725 55.24485067, -4.35873852 55.24082456, -4.3592542 55.23702803, -4.36225353 55.23415897, -4.36549236 55.23098519, -4.36801163 55.22688783, -4.37341748 55.221123, -4.37385869 55.21721542, -4.37523926 55.21366483, -4.3793209 55.2104371, -4.38160336 55.20671897, -4.3877229 55.204614, -4.38954584 55.20262034, -4.39093331 55.20110279, -4.39231314 55.19665216, -4.39260793 55.19589522, -4.39380369 55.19564477, -4.39652619 55.19507449, -4.40571406 55.19426214, -4.41280656 55.19434166, -4.41869148 55.19478236, -4.42677958 55.19588568, -4.43924456 55.19779309, -4.44834509 55.19939003, -4.45205979 55.20004164, -4.46744208 55.20312624, -4.46992825 55.20353096, -4.46926582 55.20713926, -4.46942315 55.20942647, -4.4696447 55.21260001, -4.47045278 55.21524371, -4.4715235 55.21718096, -4.47293288 55.21947482, -4.47572079 55.22354572, -4.47812634 55.22656423, -4.48298204 55.23604339, -4.48339424 55.23712038, -4.4835154 55.23838193, -4.48391374 55.23927942, -4.48464117 55.24035335, -4.48664623 55.24177203, -4.48803303 55.24319935, -4.48880194 55.24463532, -4.48814179 55.24717571, -4.48656682 55.24972967, -4.48588827 55.25191147, -4.48554678 55.25427066, -4.48464194 55.25700088, -4.48341866 55.25955612, -4.48126257 55.26194436, -4.47822172 55.26452863, -4.47488634 55.26711767, -4.47115682 55.26898763, -4.47084436 55.26910913, -4.46970303 55.26955302, -4.46682164 55.27086635, -4.46490688 55.27252975, -4.46388379 55.27399928, -4.46402284 55.27727229, -4.46597052 55.28033742, -4.46811244 55.28248736, -4.47054703 55.28444876, -4.47407458 55.28747954, -4.47681134 55.28924873, -4.48081946 55.29117462, -4.48491314 55.29364022, -4.49071678 55.29715731, -4.49389421 55.29981433, -4.49578891 55.30231379, -4.49675655 55.30501139, -4.49776705 55.30825135, -4.49833939 55.31059465, -4.50014046 55.31291222, -4.50202214 55.31631459, -4.50542276 55.31968523, -4.51009609 55.32393858, -4.51441426 55.32820807, -4.51834953 55.33176287, -4.52164867 55.33551663, -4.52584909 55.33870505, -4.52849713 55.3424766, -4.53244048 55.34767851, -4.53507095 55.35126714, -4.53535285 55.35164433, -4.53868897 55.3561076, -4.54165075 55.35986615, -4.54364242 55.36273418, -4.54404772 55.3654532, -4.54421522 55.3659913, -4.54511516 55.36888201, -4.54602098 55.3699382, -4.52896118 55.37263801, -4.50087758 55.35824432, -4.47661559 55.37139693, -4.44762781 55.38682775, -4.32023047 55.33238024, -4.27301552 55.31545439, -4.27763349 55.3106471)))|Point (-4.42368856 55.2960241)|||
1625|ABC|Urban|const|ABC|1625|ABC-23_Girvan|MultiPolygon (((-4.6 55.07929898, -4.63292986 55.08032549, -4.62740353 55.07789383, -4.62832449 55.07617534, -4.62894805 55.07655459, -4.63067565 55.07719054, -4.63218879 55.07774751, -4.63603734 55.0783822, -4.63636727 55.07929898)))|Point (-4.63175565 55.0784619)|||
And so on..... My expected output for 'location'should be a dataframe with all the lat long values that are less than 4 like
col1 col2 col3 col4 col5 col6 col7 col8
Row1: -5.233 -5.679 NA -6.345 NA
Row2: -5.285 -5.888 -5.2 -5.0 NA -5.7 NA -5.888 and so on
test3<- data.frame(lapply(test3, function(x) {gsub("[A-Z]", "", x )}))
test3<- data.frame(lapply(test3, function(x) {gsub("[a-z]", "", x )}))
test3<- data.frame(lapply(test3, function(x) {gsub("[(]", "", x )}))
test3<- data.frame(lapply(test3, function(x) {gsub("[)]", "", x )}))
test3<- data.frame(lapply(test3, function(x) {gsub(", ", " ", x )}))
#test3<- data.frame(lapply(test3, function(x) {gsub(",", " ", x )}))
test3 <- data.frame(lapply(test3, trimws), stringsAsFactors = FALSE)
datt <- data.frame()
for (k in 1:nrow(test3)){
test4<-data.frame(do.call("rbind", strsplit(as.character(test3[k,"Location"]), " ", fixed = TRUE)))
for (i in colnames(test4)){
if( nchar(strsplit(as.character(test4[[i]]), "\\.")[[1]][2])<4 || is.na(nchar(strsplit(as.character(test4[[i]]), "\\.")[[1]][2]))==TRUE){
datt[k,i] <- data.frame(test4[[i]])
next
}
}
}
d_chk_loc<- datt[rowSums(is.na(datt)) != ncol(datt), ]
dput output
structure(list(Id = c(1660L, 1552L, 1625L), Coverage = c("MultiPolygon (((-4.8066907 55.04347151, -4.80276148 55.04454913, -4.80273576 55.04455619, -4.80272906 55.0445397, -4.8019362 55.04259356, -4.80144005 55.04137563, -4.80143642 55.04136669, -4.80143318 55.04136487, -4.79932797 55.04017957, -4.79603597 55.03832586, -4.79602477 55.03831956, -4.79602909 55.03830962, -4.79681797 55.03648828, -4.79736311 55.0352296, -4.79736682 55.03522103, -4.79737054 55.03521246, -4.79734694 55.03519212, -4.79442154 55.03266764, -4.79436702 55.03262058, -4.79429576 55.032635, -4.79012226 55.03347964, -4.79007062 55.03349009, -4.78999373 55.03356092, -4.78954942 55.03397026, -4.78945452 55.03396611, -4.78523126 55.03378099, -4.78474862 55.03585432, -4.78410562 55.03755613, -4.78131992 55.03769417, -4.77995653 55.03933729, -4.7781591 55.04093226, -4.77183228 55.03970088, -4.77169854 55.03967882, -4.76459029 55.03850547, -4.76218988 55.03966093, -4.76218404 55.03966375, -4.76216777 55.03967074, -4.76208001 55.03970845, -4.75859975 55.03906771, -4.7524626 55.04284217, -4.7463334 55.04429135, -4.74314492 55.04672472, -4.74144307 55.04822486, -4.74077155 55.04822731, -4.74042671 55.04785351, -4.73920006 55.04652378, -4.73823528 55.04516571, -4.73819305 55.04511062, -4.73818743 55.04510704, -4.73738004 55.04459257, -4.73737984 55.04459012, -4.73729138 55.04348033, -4.73404678 55.0427649, -4.73162755 55.04424351, -4.72684084 55.04622438, -4.72454247 55.0462497, -4.72419217 55.04606356, -4.72258998 55.04538684, -4.72258924 55.04538653, -4.72258871 55.04538461, -4.72235393 55.04454127, -4.72220504 55.04400487, -4.72219207 55.04395817, -4.72215619 55.04393533, -4.72058722 55.04293649, -4.72057629 55.04292953, -4.72024656 55.04287095, -4.72024615 55.04287087, -4.72024571 55.0428708, -4.71960906 55.04275791, -4.71960096 55.04274676, -4.71872616 55.04154264, -4.71859094 55.04135649, -4.71824434 55.04082598, -4.71821688 55.04077155, -4.71791095 55.0401652, -4.71788206 55.04011276, -4.71787802 55.04010957, -4.71722657 55.03959414, -4.71540401 55.03999767, -4.71538959 55.04000086, -4.71487796 55.04025596, -4.71443494 55.03989911, -4.6918896 55.04502024, -4.69187352 55.04502389, -4.68493194 55.04330826, -4.68485827 55.04330196, -4.68484986 55.04331181, -4.68281241 55.04569817, -4.68274628 55.04570207, -4.67796529 55.04598422, -4.67578179 55.04884382, -4.67396727 55.05046258, -4.67239289 55.05062117, -4.67207876 55.05062863, -4.67145075 55.05064354, -4.67135174 55.05067477, -4.67083231 55.0508386, -4.67050812 55.05090876, -4.67020746 55.05097384, -4.66989921 55.05104055, -4.6692961 55.05105565, -4.6692866 55.05105588, -4.66928375 55.05105675, -4.66870015 55.05123527, -4.66865176 55.05125052, -4.66847284 55.05141605, -4.66821431 55.0516552, -4.6598276 55.0539769, -4.65904234 55.05348943, -4.65899383 55.05345932, -4.65895686 55.05347453, -4.65713805 55.0542235, -4.65541219 55.05510604, -4.64918418 55.05654281, -4.64529045 55.05746473, -4.64472591 55.05740647, -4.64454119 55.05540513, -4.64597245 55.05372462, -4.64620866 55.05173229, -4.64481074 55.0506421, -4.6444775 55.05038221, -4.64067873 55.05173855, -4.63732431 55.05211035, -4.63358558 55.05256525, -4.63336187 55.05388239, -4.63337637 55.05575676, -4.6329212 55.05646996, -4.63148884 55.05659632, -4.62928993 55.05736526, -4.6273795 55.05758632, -4.62386505 55.05783972, -4.62063736 55.0575441, -4.61845101 55.05867326, -4.61688535 55.05942835, -4.61469633 55.06055804, -4.61215512 55.06115143, -4.6086278 55.06140072, -4.61068485 55.06371569, -4.6145987 55.06472496, -4.6178753 55.06592646, -4.62214499 55.06783014, -4.62384362 55.06978576, -4.62435655 55.07070437, -4.62308292 55.07251163, -4.62535069 55.07251111, -4.62665101 55.07515748, -4.62832449 55.07617534, -4.62740353 55.07789383, -4.63292986 55.08032549, -4.63636727 55.07929898, -4.63674717 55.08035457, -4.63597826 55.08579344, -4.63208926 55.09491179, -4.62966443 55.10145779, -4.62555688 55.12333185, -4.62453006 55.1264075, -4.62308495 55.12787298, -4.61804869 55.13120733, -4.6118031 55.13473534, -4.60906361 55.13760085, -4.60737243 55.14124439, -4.60729076 55.14142037, -4.60728565 55.14308823, -4.60728565 55.14308823, -4.60288497 55.14207939, -4.59554115 55.14069688, -4.59311992 55.14314738, -4.58945406 55.14296188, -4.58688111 55.14342821, -4.58565648 55.14532862, -4.58217713 55.14502652, -4.57473495 55.14578197, -4.57715915 55.14850591, -4.57255628 55.15058907, -4.57241801 55.15306662, -4.57060383 55.1575286, -4.56503363 55.15633224, -4.56497722 55.15817053, -4.56450719 55.15971754, -4.56253598 55.16039597, -4.55886596 55.15930976, -4.55401746 55.16075999, -4.54797659 55.16110981, -4.5408484 55.16088173, -4.5369834 55.15979893, -4.53252787 55.16054235, -4.53143396 55.16070717, -4.51799229 55.15707571, -4.51271254 55.15362149, -4.50458987 55.15491117, -4.49940285 55.1544539, -4.47472464 55.15592548, -4.47382559 55.15789315, -4.47166113 55.15951106, -4.46809419 55.15890751, -4.46608368 55.15995999, -4.46179496 55.16375731, -4.45882785 55.16869028, -4.45995621 55.17162983, -4.45685079 55.17289131, -4.45143386 55.17198661, -4.44301984 55.1702411, -4.44306281 55.16724087, -4.44288324 55.16476994, -4.4446801 55.16345964, -4.44554009 55.16183049, -4.44485583 55.16049424, -4.43952776 55.15808756, -4.43976355 55.1496472, -4.43755762 55.14335338, -4.43805226 55.14283349, -4.57473486 55.14578185, -4.60588908 55.07343634, -4.59519957 55.06233673, -4.60013217 55.06077222, -4.58944762 55.04967193, -4.58979889 55.04956051, -4.60742485 55.0511097, -4.60742485 55.05110969, -4.60742504 55.0511097, -4.60751859 55.05075858, -4.60818492 55.05109407, -4.608185 55.05109402, -4.60818511 55.05109407, -4.62479165 55.04021827, -4.62507206 55.04295189, -4.62507226 55.04295188, -4.62507226 55.0429519, -4.63288233 55.04268746, -4.63071659 55.02160371, -4.64992574 55.04154173, -4.64992589 55.04154168, -4.64992594 55.04154173, -4.65485366 55.03997507, -4.65572824 55.04088217, -4.65572834 55.04088214, -4.65572838 55.04088218, -4.66257217 55.03870582, -4.66055361 55.0366125, -4.66548053 55.03504536, -4.66346206 55.03295215, -4.66838841 55.03138489, -4.65562524 55.01814485, -4.66790927 55.01520004, -4.66595911 55.01785411, -4.72205117 55.03144487, -4.72205119 55.03144484, -4.72205135 55.03144487, -4.72508752 55.02730471, -4.72508752 55.02730471, -4.72727318 55.02432375, -4.83764211 54.99347404, -4.8391614 54.99347765, -4.84818311 54.99349909, -4.8538311 54.99932518, -4.80669355 55.04346885, -4.8066907 55.04347151))",
"MultiPolygon (((-4.27763349 55.3106471, -4.27809894 55.31053055, -4.28715259 55.30983888, -4.29059196 55.31033773, -4.29705406 55.31287996, -4.29825773 55.31022995, -4.29915871 55.31080432, -4.3040445 55.31063359, -4.32196403 55.30841057, -4.35013465 55.30337916, -4.35608607 55.30381051, -4.36029362 55.30259222, -4.36348063 55.30099468, -4.36629835 55.29901995, -4.36777166 55.29666621, -4.36854792 55.29393497, -4.36859387 55.29046006, -4.36444536 55.27604388, -4.36310057 55.27124315, -4.36296541 55.27076095, -4.36290831 55.27021376, -4.36010948 55.26458948, -4.35921514 55.2627564, -4.35605039 55.25626822, -4.35456341 55.25080791, -4.35539054 55.24894911, -4.35797725 55.24485067, -4.35873852 55.24082456, -4.3592542 55.23702803, -4.36225353 55.23415897, -4.36549236 55.23098519, -4.36801163 55.22688783, -4.37341748 55.221123, -4.37385869 55.21721542, -4.37523926 55.21366483, -4.3793209 55.2104371, -4.38160336 55.20671897, -4.3877229 55.204614, -4.38954584 55.20262034, -4.39093331 55.20110279, -4.39231314 55.19665216, -4.39260793 55.19589522, -4.39380369 55.19564477, -4.39652619 55.19507449, -4.40571406 55.19426214, -4.41280656 55.19434166, -4.41869148 55.19478236, -4.42677958 55.19588568, -4.43924456 55.19779309, -4.44834509 55.19939003, -4.45205979 55.20004164, -4.46744208 55.20312624, -4.46992825 55.20353096, -4.46926582 55.20713926, -4.46942315 55.20942647, -4.4696447 55.21260001, -4.47045278 55.21524371, -4.4715235 55.21718096, -4.47293288 55.21947482, -4.47572079 55.22354572, -4.47812634 55.22656423, -4.48298204 55.23604339, -4.48339424 55.23712038, -4.4835154 55.23838193, -4.48391374 55.23927942, -4.48464117 55.24035335, -4.48664623 55.24177203, -4.48803303 55.24319935, -4.48880194 55.24463532, -4.48814179 55.24717571, -4.48656682 55.24972967, -4.48588827 55.25191147, -4.48554678 55.25427066, -4.48464194 55.25700088, -4.48341866 55.25955612, -4.48126257 55.26194436, -4.47822172 55.26452863, -4.47488634 55.26711767, -4.47115682 55.26898763, -4.47084436 55.26910913, -4.46970303 55.26955302, -4.46682164 55.27086635, -4.46490688 55.27252975, -4.46388379 55.27399928, -4.46402284 55.27727229, -4.46597052 55.28033742, -4.46811244 55.28248736, -4.47054703 55.28444876, -4.47407458 55.28747954, -4.47681134 55.28924873, -4.48081946 55.29117462, -4.48491314 55.29364022, -4.49071678 55.29715731, -4.49389421 55.29981433, -4.49578891 55.30231379, -4.49675655 55.30501139, -4.49776705 55.30825135, -4.49833939 55.31059465, -4.50014046 55.31291222, -4.50202214 55.31631459, -4.50542276 55.31968523, -4.51009609 55.32393858, -4.51441426 55.32820807, -4.51834953 55.33176287, -4.52164867 55.33551663, -4.52584909 55.33870505, -4.52849713 55.3424766, -4.53244048 55.34767851, -4.53507095 55.35126714, -4.53535285 55.35164433, -4.53868897 55.3561076, -4.54165075 55.35986615, -4.54364242 55.36273418, -4.54404772 55.3654532, -4.54421522 55.3659913, -4.54511516 55.36888201, -4.54602098 55.3699382, -4.52896118 55.37263801, -4.50087758 55.35824432, -4.47661559 55.37139693, -4.44762781 55.38682775, -4.32023047 55.33238024, -4.27301552 55.31545439, -4.27763349 55.3106471)))",
"MultiPolygon (((-4.6 55.07929898, -4.63292986 55.08032549, -4.62740353 55.07789383, -4.62832449 55.07617534, -4.62894805 55.07655459, -4.63067565 55.07719054, -4.63218879 55.07774751, -4.63603734 55.0783822, -4.63636727 55.07929898)))"
)), row.names = c(NA, 3L), class = "data.frame")
> View(MA_in)
>