I'm trying to use Douglas Peucker's algorithm in R. By executing the following code, I get the following error:
Px <- (1:100)/10
Py <- dnorm(Px,3,1)+dnorm(Px,7,1)+Px/10
### Example 1
### Simplification using epsilon
par(mfrow=c(2,2))
plot(Px,Py,type="l")
plot(DouglasPeuckerEpsilon(Px,Py,0.01),type="b",col=4)
Could not find the "DouglasPeuckerEpsilon" in R language.
This is because I do not have the DP package installed?
Perform the following Steps:
Then load the Library (kmlShape)
install.packages("kmlShape")
library("kmlShape")
Then run plot(DouglasPeuckerEpsilon(Px,Py,0.01),type="b",col=4)
for Ramer-Douglas-Peucker algorithm (RDP)