This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.
Try executing this chunk by clicking the Run button within the chunk or by placing your cursor inside it and pressing Ctrl+Shift+Enter.
library(sf)
package 㤼㸱sf㤼㸲 was built under R version 4.0.3Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1
library(readxl)
package 㤼㸱readxl㤼㸲 was built under R version 4.0.3
library(xlsx)
package 㤼㸱xlsx㤼㸲 was built under R version 4.0.3
rm(list=ls())
bermen<-st_read("C:/Users/d15589/Desktop/R/Vlaamse_bermen/Bermen_ouptut.gpkg")
Reading layer `Bermen_ouptut2' from data source `C:\Users\d15589\Desktop\R\Vlaamse_bermen\Bermen_ouptut.gpkg' using driver `GPKG'
Simple feature collection with 7321 features and 25 fields
geometry type: MULTILINESTRING
dimension: XY
bbox: xmin: 23401.97 ymin: 154478.9 xmax: 250722 ymax: 241887.9
Error in (function (srcref) : unimplemented type (29) in 'eval'
Error: no more error handlers available (recursive errors?); invoking 'abort' restart
type 29 is unimplemented in 'type2char'Error in stopifnot(is.character(x), length(x) == 1) :
INTEGER() can only be applied to a 'integer', not a 'unknown type #29'
bermen<-bermen[ , !(names(uitprobeersel) %in% drops)]
Error in names(uitprobeersel) %in% drops :
object 'uitprobeersel' not found
unique(bermen_LS$typo1)
[1] "R5;"
[2] "R2;G4a;S5"
[3] "R2;G4a;H4;R5"
[4] "G4a;H4;R5"
[5] "H4;"
[6] "G4a;"
[7] "R2;H1"
[8] "R1;"
[9] "G2/G1;H2"
[10] "G2/G1;H3"
[11] "R2;G4a;R5"
[12] "R2;"
[13] "R2;S5;H3"
[14] "R2;R5"
[15] "R2;G4a"
[16] "G4a;S5;R5"
[17] "G4a;H3"
[18] "R2"
[19] "G4a;R5"
[20] "H3;"
[21] "H4;R2;S5"
[22] "R2;G4a;S5;R5"
[23] "R2;G4a;R5;H3"
[24] "R2;H4;R5"
[25] "G4a;H2"
[26] "R2;G4a;H1"
[27] "G4a;H4;S5"
[28] "G4a;G2/G1"
[29] "H2;H1"
[30] "G4a;H3;R5"
[31] "H5;"
[32] "G4a;G2/G1;H2;S5;H2;H1"
[33] "G4a"
[34] "R2;R4;S5"
[35] "G4a;G4a"
[36] "R2;H3"
[37] "R2;G4a;R4;R5;S5"
[38] "G2/G1;H5"
[39] "R5;H3"
[40] "G2/G1;H3;H1"
[41] "H3;G2/G1;G4a"
[42] "G4a;G2/G1;H3"
[43] "G4a;H1"
[44] "R2;H4;H1"
[45] "R2;S5;R5"
[46] "H5"
[47] "G2/G1;"
[48] "R2;G4a;H4;S5"
[49] "R5;S5;H3"
[50] "G2/G1;H1"
[51] "R2;S5"
[52] "R2;H3;S5"
[53] "R2;G4a;H4;S5;R5"
[54] "G4a;R5;H3"
[55] "G4a;H1;H3"
[56] "G4a;R2;H4;R5"
[57] "H4;R2;R4;S5"
[58] "G4a;G2/G1;H4"
[59] "R2;H1;S3"
[60] "G4a;G2/G1;H2;S5;H2;H1;H3"
[61] "S5;"
[62] "R2;H4"
[63] "G4a;S5"
[64] "G2/G1;H1;H1"
[65] "G2/G1;G4a;H2;S5;H4"
[66] "H1;"
[67] "G4a;H3;R5;H1"
[68] "R2;G4a;H4"
[69] "G4a;H4"
[70] "G2/G1;H1;H2"
[71] "G4a;H3;R5;S5;H1"
[72] "R2;G4a;G4e;S5;R5"
[73] "G2/G1;G4a;H2;S5;H1;H2"
[74] "G4a;G2/G1;H2;H1;H4"
[75] "H1;H3"
[76] "R2;S5;H1;S5"
[77] "R2;H1;H3"
[78] "S5;R5"
[79] "R1;G4a;R5"
[80] "G4d/G5b;G4a"
[81] "H3;H4;S3"
[82] "S5;G4a"
[83] "R2;G4a;H3;H3"
[84] "G4a;G2/G1;S5;H1;H4"
[85] "G2/G1;G4a;H2"
[86] "G4a;G2/G1;H2;S5;H1;H4"
[87] "G4a;H3;H2;S5;S5;H1;H4"
[88] "G3"
[89] "G2"
[90] "G4d"
[91] "H4"
[92] "H3"
[93] "G5b"
[94] "G1"
[95] "S2"
[96] "S4"
[97] "S1"
[98] "None"
[99] "R1"
[100] "G0"
[101] "R5"
[102] "G2-G3"
[103] "R3"
[104] "H1"
[105] "S5"
[106] "S3"
[107] "G"
[108] "H2"
[109] "R4"
[110] "H4 - H5"
[111] "G4"
[112] "?"
[113] "kruidige ondergroei van houtige vegetaties (H1-H5)"
[114] "G3/G4"
[115] "G4;G4"
[116] "G4;R1"
[117] "R1;G2"
[118] "R1;G4"
[119] "G2;G4"
[120] "G3;R1"
[121] "G3;G2"
[122] "G2;G3"
[123] "G3;R2"
[124] "kruidige ondergroei van houtige vegetaties (H1-H5);kruidige ondergroei van houtige vegetaties (H1-H5)"
[125] "R1;R2"
[126] "G4;R2"
[127] "R1;G1"
[128] "G3;G1"
[129] "G2;R2"
[130] "R2;G2"
[131] "R2;R1"
[132] "R2;G3"
[133] "R4;R2"
[134] "R2;R4"
[135] "G3;R4"
[136] "R1;R4"
[137] "R1;G3"
[138] "G2;R1"
[139] "G4;G3"
[140] "G3;G4;G3"
[141] "G3;R1;R4"
[142] "G3;kruidige ondergroei van houtige vegetaties (H1-H5)"
[143] "G3;G4"
[144] "G2;G2"
[145] "G1;kruidige ondergroei van houtige vegetaties (H1-H5)"
[146] "G2;G4;G2"
[147] "G3;R1;G4"
[148] "G3/G4;G2;kruidige ondergroei van houtige vegetaties (H1-H5)"
[149] "G3/G4;kruidige ondergroei van houtige vegetaties (H1-H5);R1"
[150] "G1;R2;G3"
[151] "G4;G3;R1"
[152] "R1;G3;G4"
[153] "G2;R2;R1"
[154] "R4;G3"
[155] "G2;G1"
[156] "G3;R3"
[157] "R3;G3"
[158] "R3;G2"
[159] "G3;R1;G3"
[160] "R3;R1"
[161] "R1;R3;R1"
[162] "G2;R3;G2"
[163] "G3;R3;G3"
[164] "R2;R3"
[165] "R4;G1"
[166] "R2;G4"
bermen_LS<-left_join(bermen,LS, by="typo1",all.x=TRUE)
drops<-c("typo1")
bermen_LS<-bermen_LS[ , !(names(bermen_LS) %in% drops)]
bermen<-bermen_LS
bermen<-bermen %>%
mutate(biotische_score=habitat+vogel)
bermen<-bermen %>%
bermen$biotische_score[bermen$biotische_score == 4] <- 2
bermen$biotische_score[bermen$biotische_score == 3] <- 2
bermen<-bermen %>%
mutate(biotische_score=biotische_score+ErkendNatuurRes+VEN+HPG+waterloop)
getwd()
bermen %>%
st_write("bermen.gpkg")