[R-sig-Geo] readOGR problem in Windows
James Rooney
ROONEYJ4 at tcd.ie
Tue Dec 23 16:43:20 CET 2014
Dear List,
I have some code I have developed on a Mac that I'm trying to transfer onto a higher spec windows 8.1 machine and I am running into a problem with the readOGR function in rgdal.
My code is below. This works fine under Mac, but under windows readOGR gives me the error:
"Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv, :
Cannot open file "
The rgdal version on the Mac is rgdal_0.8-16
whilst on Win 8.1 is rgdal 0.9-1
The preceding read.csv statement works just fine.
Any ideas anyone ?
Thanks,
James
Code:
library(rgdal)
library(rgeos)
library(maptools)
library(RColorBrewer)
library(classInt)
library(ggplot2)
library(INLA)
# Set working directory
setwd("/Users/james/Project Work")
source("R_Files/Ireland - General Functions/SA.data-prep.functions.R")
# Load soils databse
soils <- read.csv("Irish Data/NSDB_SA_kriged.csv", header=TRUE)
# Load shape files and data file
SA <- readOGR("./Irish Data/Processed Data/","SA.basic.analysis.shapes",TRUE)
More information about the R-sig-Geo
mailing list