pred_prob_map: Create map of discrete predicted probabilities

Description Usage Arguments Examples

View source: R/pred_prob_map.R

Description

This function takes the predicted class probabilites and maps them for the predicted class

Usage

1
pred_prob_map(states, lakes, probs, save_sep = FALSE)

Arguments

states

data for states, as data.frame

lakes

point locations for lake samples as data.frame with NLA ID

probs

class probabilites with NLA ID

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
state<-map_data('state')
lakes_alb<-data.frame(ltmData[["AlbersX"]],ltmData[["AlbersY"]],
                      ltmData[["NLA_ID"]])
p4s<-"+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=37.5 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs" 
ll<-"+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs" 
lakes_alb_sp<-SpatialPointsDataFrame(coordinates(lakes_alb[,1:2]),proj4string=CRS(p4s),
                                     data=data.frame(nla_id = as.character(lakes_alb[,3])))
lakes_dd<-spTransform(lakes_alb_sp,CRS=CRS(ll))
lakes_dd<-data.frame(coordinates(lakes_dd),lakes_dd$nla_id)
names(lakes_dd)<-c("long","lat","nla_id")
pred_prob_map(state,lakes_dd,gis_rf_ts_prob)

USEPA/LakeTrophicModelling documentation built on Oct. 15, 2020, 4:13 p.m.