This tutorial is currently in construction.
IDmining is available on the CRAN repository: https://CRAN.R-project.org/package=IDmining.
library(IDmining)
bf <- Butterfly(10000)
bf_select <- MBRM(bf[,-9], 5:25)
var_order <- bf_select[[2]]
var_perf <- bf_select[[3]]
plot(var_perf,type="b",pch=16,lwd=2,xaxt="n",xlab="", ylab="",
col="red",ylim=c(0,max(var_perf)),panel.first={grid(lwd=1.5)})
axis(1,1:length(var_order),labels=var_order)
mtext(1,text="Added Features (from left to right)",line=2.5,cex=1)
mtext(2,text="Estimated ID",line=2.5,cex=1)
library(IDmining)
library(foreign)
library(raster)
library(colorRamps)
library(fields)
library(rgl)
library(grDevices)
source("./Functions/makeTransparent.R")
df_dem <- read.dbf(file="./Data/dem_100_zinal_marked_pts.dbf")[,c(4,5,3)]
names(df_dem )<-c("X","Y","Z")
r_dem <- rasterFromXYZ(df_dem)
plot(r_dem,col=grey(1:100/100))
proj4string(r_dem) <- CRS("+init=epsg:21781") # CH1903/LV03 (code 21781)
r_dem@data@names <- "elevation"
slope = terrain(r_dem,opt='slope')
aspect = terrain(r_dem, opt='aspect')
hill = hillShade(slope, aspect, 40, 270)
plot(hill, col=grey(0:100/100),legend=FALSE,axes=FALSE,box=FALSE)
plot(r_dem, col=makeTransparent(matlab.like(64),50), add=TRUE ,legend=FALSE)
image.plot(legend.only=TRUE,smallplot=c(.85,.87,.25,.75),
legend.cex=1,zlim=range(r_dem@data@values),col=makeTransparent(matlab.like(64),50),
legend.args=list(text='Elevation (m)', side=4, line=3))
id90 <- df_dem[,3]>quantile(df_dem$Z,probs=0.9)
df_dem90 <- df_dem[id90,]
c <- df_dem$Z
c <- cut(c, breaks=64)
cols <- matlab.like(64)[as.numeric(c)]
plot3d(df_dem90,aspect=FALSE,axes=TRUE,box=TRUE,xlab="",ylab="",zlab="",col=cols[id90])
You must enable Javascript to view this page properly.