daily pastebin goal
67%
SHARE
TWEET

Untitled

a guest Oct 12th, 2017 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rm(list=ls())
  2. getwd()
  3. require("rgdal")
  4.  
  5. RST <- readOGR(dsn = "ArcGIS//CRS//E_Umpqua_C_TA_shapefiles", layer =
  6. "range_town_clip",p4s = NULL, encoding = "ESRI Shapefile") #Read in
  7. #shapefile
  8. plot(RST) #Checking shapefile
  9. str(RST) #Shows the structure of shapefile
  10. slotNames(RST) #Gets slot names of shapefiles
  11.  
  12. SelectRST <- as.data.frame(RST@data) #Creates a dataframe from the data slot
  13. SelectedRST <- SelectRST[sample(nrow(SelectRST), 100), ] #Selects 100 random
  14. #records from SelectRST
  15. RST.List <- as.list(rownames(SelectedRST)) #Creates a list of row numbers
  16. #for the randomly selected records
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top