[R] read.spss {foreign} doesn't work over network?

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Jun 18 08:40:19 CEST 2008


This looks like a restriction on your network (assuming the file is named 
correctly).  I can read SPSS files with read.spss over ours, and the code 
in read.spss is just standard C I/O (fopen) that knows nothing about 
Windows network mappings.

On Tue, 17 Jun 2008, Farley, Robert wrote:

> I'm unable to open an SPSS file over my network.  If I copy it to my
> local C:/ drive I can read it.  I saved the command (in a "crib sheet"
> text file) in order to avoid all the typing, so I'm pretty sure I've
> done it before.  I verified that the file I'm trying to read is OK.
> This is what happens:
>
>
>
>> SurveyData <-
> read.spss("P:/Jobs/6015.Orange.Rapid.Survey/SurveyData/4.ProcessedData/D
> elivery4/mrb_delivery.sav", use.value.labels=TRUE, max.value.labels=Inf,
> to.data.frame=TRUE)
>
> Error in
> read.spss("P:/Jobs/6015.Orange.Rapid.Survey/SurveyData/4.ProcessedData/D
> elivery4/mrb_delivery.sav",  :
>
>  unable to open file
>
>>
>
>
>
>
>
>> SurveyData <- read.spss("C:/Data/R/mrb_delivery.sav",
> use.value.labels=TRUE, max.value.labels=Inf, to.data.frame=TRUE)
>
>> dimnames(SurveyData) [[2]]  #Variable (column) names
>
> [1] "LANG"     "SAMPN"    "ROUTE_NU" "BLOCK_NU" "ROUTE"    "TOD"
>
> [7] "DIRECTIO" "ASSIGN"   "TRIPID_N" "HNAME"    "HPHONE"   "HADDRESS"
>
> [13] "HCITY"    "HSTATE"   "HZIP"     "HAV_STAT" "H_XCORD"  "H_YCORD"
>
> [19] "H_TAZ"    "OPURP"    "O_OPURP"  "OCODE"    "ONAME"    "OGAVEHOM"
>
> [25] "OADDRESS" "OXSTRT1"  "OXSTRT2"  "OCITY"    "OZIP"     "OAV_STAT"
>
> [31] "O_XCORD"  "O_YCORD"  "O_TAZ"    "GETTO"    "O_GETTO"  "BUS1"
>
> [37] "BUS2"     "BUS3"     "BUS4"     "BOARD1"   "BOARD2"   "DEPART1"
>
> [43] "DEPART2"  "DPURP"    "O_DPURP"  "DCODE"    "DNAME"    "DGAVEHOM"
>
> [49] "DADDRESS" "DXSTRT1"  "DXSTRT2"  "DCITY"    "DZIP"     "DAV_STAT"
>
> [55] "D_XCORD"  "D_YCORD"  "D_TAZ"    "GETOFF"   "O_GETOFF" "FARE"
>
> [61] "DISCOUNT" "EMPDISC"  "EMPPAY"   "FREQ"     "DISABLE"  "HHVEH"
>
> [67] "VEHAVAIL" "HHSIZ"    "INCOME"   "AGE"      "KIDCORED" "BLOCK"
>
> [73] "DIRECT_A" "BUS_ON"   "BUS_ONS"  "BUS_ONG"  "BAV_STAT" "BAV_ADD"
>
> [79] "B_TAZ"    "B_XCORD"  "B_YCORD"  "BUS_OFF"  "BUS_OFFS" "BUS_OFFG"
>
> [85] "FAV_STAT" "FAV_ADD"  "F_TAZ"    "F_XCORD"  "F_YCORD"  "BUS_OF_A"
>
> [91] "LTFACTOR" "BUSREPFA" "ADDWEIGH" "RESPONSE" "VEHFACT"  "FINWGT"
>
> [97] "EXPFACTO" "EXPWGT"
>
>>
>
>
>
> Am I just loopy in thinking I've ever read this directly from the
> network drive?
>
> Did I do something stupid that "broke" read.spss?
>
>
>
>
>
>
>
>> version
>
>               _
>
> platform       i386-pc-mingw32
>
> arch           i386
>
> os             mingw32
>
> system         i386, mingw32
>
> status
>
> major          2
>
> minor          7.0
>
> year           2008
>
> month          04
>
> day            22
>
> svn rev        45424
>
> language       R
>
> version.string R version 2.7.0 (2008-04-22)
>
>
>
>> installed.packages()
>
>              Package         LibPath                          Version
>
>
> abind         "abind"         "C:/PROGRA~1/R/R-27~1.0/library" "1.1-0"
>
>
> acepack       "acepack"       "C:/PROGRA~1/R/R-27~1.0/library" "1.3-2.2"
>
>
> akima         "akima"         "C:/PROGRA~1/R/R-27~1.0/library" "0.5-1"
>
>
> ape           "ape"           "C:/PROGRA~1/R/R-27~1.0/library" "2.2"
>
>
> base          "base"          "C:/PROGRA~1/R/R-27~1.0/library" "2.7.0"
>
>
> boot          "boot"          "C:/PROGRA~1/R/R-27~1.0/library" "1.2-33"
>
>
> car           "car"           "C:/PROGRA~1/R/R-27~1.0/library" "1.2-8"
>
>
> chron         "chron"         "C:/PROGRA~1/R/R-27~1.0/library" "2.3-23"
>
>
> class         "class"         "C:/PROGRA~1/R/R-27~1.0/library" "7.2-42"
>
>
> cluster       "cluster"       "C:/PROGRA~1/R/R-27~1.0/library" "1.11.10"
>
>
> coda          "coda"          "C:/PROGRA~1/R/R-27~1.0/library" "0.13-2"
>
>
> codetools     "codetools"     "C:/PROGRA~1/R/R-27~1.0/library" "0.2-1"
>
>
> coin          "coin"          "C:/PROGRA~1/R/R-27~1.0/library" "0.6-9"
>
>
> colorspace    "colorspace"    "C:/PROGRA~1/R/R-27~1.0/library" "0.95"
>
>
> DAAG          "DAAG"          "C:/PROGRA~1/R/R-27~1.0/library" "0.97"
>
>
> datasets      "datasets"      "C:/PROGRA~1/R/R-27~1.0/library" "2.7.0"
>
>
> Design        "Design"        "C:/PROGRA~1/R/R-27~1.0/library" "2.1-1"
>
>
> dynlm         "dynlm"         "C:/PROGRA~1/R/R-27~1.0/library" "0.2-0"
>
>
> e1071         "e1071"         "C:/PROGRA~1/R/R-27~1.0/library" "1.5-18"
>
>
> Ecdat         "Ecdat"         "C:/PROGRA~1/R/R-27~1.0/library" "0.1-5"
>
>
> effects       "effects"       "C:/PROGRA~1/R/R-27~1.0/library" "1.0-12"
>
>
> ellipse       "ellipse"       "C:/PROGRA~1/R/R-27~1.0/library" "0.3-5"
>
>
> fCalendar     "fCalendar"     "C:/PROGRA~1/R/R-27~1.0/library" "270.75"
>
>
> fEcofin       "fEcofin"       "C:/PROGRA~1/R/R-27~1.0/library" "270.73"
>
>
> flexmix       "flexmix"       "C:/PROGRA~1/R/R-27~1.0/library" "2.1-0"
>
>
> foreign       "foreign"       "C:/PROGRA~1/R/R-27~1.0/library" "0.8-25"
>
>
> fortunes      "fortunes"      "C:/PROGRA~1/R/R-27~1.0/library" "1.3-4"
>
>
> fSeries       "fSeries"       "C:/PROGRA~1/R/R-27~1.0/library" "260.72"
>
>
> fUtilities    "fUtilities"    "C:/PROGRA~1/R/R-27~1.0/library" "270.73"
>
>
> gee           "gee"           "C:/PROGRA~1/R/R-27~1.0/library" "4.13-13"
>
>
> graphics      "graphics"      "C:/PROGRA~1/R/R-27~1.0/library" "2.7.0"
>
>
> grDevices     "grDevices"     "C:/PROGRA~1/R/R-27~1.0/library" "2.7.0"
>
>
> grid          "grid"          "C:/PROGRA~1/R/R-27~1.0/library" "2.7.0"
>
>
> Hmisc         "Hmisc"         "C:/PROGRA~1/R/R-27~1.0/library" "3.4-3"
>
>
> ipred         "ipred"         "C:/PROGRA~1/R/R-27~1.0/library" "0.8-5"
>
>
> its           "its"           "C:/PROGRA~1/R/R-27~1.0/library" "1.1.5"
>
>
> kernlab       "kernlab"       "C:/PROGRA~1/R/R-27~1.0/library" "0.9-5"
>
>
> KernSmooth    "KernSmooth"    "C:/PROGRA~1/R/R-27~1.0/library" "2.22-22"
>
>
> kinship       "kinship"       "C:/PROGRA~1/R/R-27~1.0/library"
> "1.1.0-21"
>
> lattice       "lattice"       "C:/PROGRA~1/R/R-27~1.0/library" "0.17-8"
>
>
> leaps         "leaps"         "C:/PROGRA~1/R/R-27~1.0/library" "2.7"
>
>
> lme4          "lme4"          "C:/PROGRA~1/R/R-27~1.0/library"
> "0.99875-9"
>
> lmtest        "lmtest"        "C:/PROGRA~1/R/R-27~1.0/library" "0.9-21"
>
>
> mapproj       "mapproj"       "C:/PROGRA~1/R/R-27~1.0/library" "1.1-7.1"
>
>
> maps          "maps"          "C:/PROGRA~1/R/R-27~1.0/library" "2.0-40"
>
>
> MASS          "MASS"          "C:/PROGRA~1/R/R-27~1.0/library" "7.2-42"
>
>
> Matrix        "Matrix"        "C:/PROGRA~1/R/R-27~1.0/library"
> "0.999375-9"
>
> mboost        "mboost"        "C:/PROGRA~1/R/R-27~1.0/library" "1.0-1"
>
>
> mclust        "mclust"        "C:/PROGRA~1/R/R-27~1.0/library" "3.1-5"
>
>
> methods       "methods"       "C:/PROGRA~1/R/R-27~1.0/library" "2.7.0"
>
>
> mgcv          "mgcv"          "C:/PROGRA~1/R/R-27~1.0/library" "1.4-0"
>
>
> mlbench       "mlbench"       "C:/PROGRA~1/R/R-27~1.0/library" "1.1-3"
>
>
> mlmRev        "mlmRev"        "C:/PROGRA~1/R/R-27~1.0/library" "0.995-1"
>
>
> modeltools    "modeltools"    "C:/PROGRA~1/R/R-27~1.0/library" "0.2-15"
>
>
> moonsun       "moonsun"       "C:/PROGRA~1/R/R-27~1.0/library" "0.1"
>
>
> multcomp      "multcomp"      "C:/PROGRA~1/R/R-27~1.0/library" "1.0-0"
>
>
> mvtnorm       "mvtnorm"       "C:/PROGRA~1/R/R-27~1.0/library" "0.9-0"
>
>
> nlme          "nlme"          "C:/PROGRA~1/R/R-27~1.0/library" "3.1-89"
>
>
> nnet          "nnet"          "C:/PROGRA~1/R/R-27~1.0/library" "7.2-42"
>
>
> oz            "oz"            "C:/PROGRA~1/R/R-27~1.0/library" "1.0-16"
>
>
> party         "party"         "C:/PROGRA~1/R/R-27~1.0/library" "0.9-96"
>
>
> plm           "plm"           "C:/PROGRA~1/R/R-27~1.0/library" "0.3-2"
>
>
> prettyR       "prettyR"       "C:/PROGRA~1/R/R-27~1.0/library" "1.3"
>
>
> quadprog      "quadprog"      "C:/PROGRA~1/R/R-27~1.0/library" "1.4-11"
>
>
> randomForest  "randomForest"  "C:/PROGRA~1/R/R-27~1.0/library" "4.5-25"
>
>
> Rcmdr         "Rcmdr"         "C:/PROGRA~1/R/R-27~1.0/library" "1.3-14"
>
>
> RColorBrewer  "RColorBrewer"  "C:/PROGRA~1/R/R-27~1.0/library" "1.0-2"
>
>
> relimp        "relimp"        "C:/PROGRA~1/R/R-27~1.0/library" "0.9-9"
>
>
> rgl           "rgl"           "C:/PROGRA~1/R/R-27~1.0/library" "0.79"
>
>
> rmeta         "rmeta"         "C:/PROGRA~1/R/R-27~1.0/library" "2.14"
>
>
> robustbase    "robustbase"    "C:/PROGRA~1/R/R-27~1.0/library" "0.2-8"
>
>
> RODBC         "RODBC"         "C:/PROGRA~1/R/R-27~1.0/library" "1.2-3"
>
>
> rpart         "rpart"         "C:/PROGRA~1/R/R-27~1.0/library" "3.1-41"
>
>
> RUnit         "RUnit"         "C:/PROGRA~1/R/R-27~1.0/library" "0.4.17"
>
>
> sandwich      "sandwich"      "C:/PROGRA~1/R/R-27~1.0/library" "2.1-0"
>
>
> scatterplot3d "scatterplot3d" "C:/PROGRA~1/R/R-27~1.0/library" "0.3-27"
>
>
> sem           "sem"           "C:/PROGRA~1/R/R-27~1.0/library" "0.9-12"
>
>
> sgeostat      "sgeostat"      "C:/PROGRA~1/R/R-27~1.0/library" "1.0-21"
>
>
> spatial       "spatial"       "C:/PROGRA~1/R/R-27~1.0/library" "7.2-42"
>
>
> splines       "splines"       "C:/PROGRA~1/R/R-27~1.0/library" "2.7.0"
>
>
> stats         "stats"         "C:/PROGRA~1/R/R-27~1.0/library" "2.7.0"
>
>
> stats4        "stats4"        "C:/PROGRA~1/R/R-27~1.0/library" "2.7.0"
>
>
> strucchange   "strucchange"   "C:/PROGRA~1/R/R-27~1.0/library" "1.3-3"
>
>
> survival      "survival"      "C:/PROGRA~1/R/R-27~1.0/library" "2.34-1"
>
>
> systemfit     "systemfit"     "C:/PROGRA~1/R/R-27~1.0/library" "1.0-2"
>
>
> tcltk         "tcltk"         "C:/PROGRA~1/R/R-27~1.0/library" "2.7.0"
>
>
> TeachingDemos "TeachingDemos" "C:/PROGRA~1/R/R-27~1.0/library" "2.2"
>
>
> tkrplot       "tkrplot"       "C:/PROGRA~1/R/R-27~1.0/library" "0.0-18"
>
>
> tools         "tools"         "C:/PROGRA~1/R/R-27~1.0/library" "2.7.0"
>
>
> tseries       "tseries"       "C:/PROGRA~1/R/R-27~1.0/library" "0.10-15"
>
>
> utils         "utils"         "C:/PROGRA~1/R/R-27~1.0/library" "2.7.0"
>
>
> vcd           "vcd"           "C:/PROGRA~1/R/R-27~1.0/library" "1.0-8"
>
>
> xtable        "xtable"        "C:/PROGRA~1/R/R-27~1.0/library" "1.5-2"
>
>
> xts           "xts"           "C:/PROGRA~1/R/R-27~1.0/library" "0.0-15"
>
>
> zoo           "zoo"           "C:/PROGRA~1/R/R-27~1.0/library" "1.5-3"
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Robert Farley
>
> Metro
>
> 1 Gateway Plaza
>
> Mail Stop 99-23-7
>
> Los Angeles, CA 90012-2952
>
> Voice: (213)922-2532
>
> Fax:    (213)922-2868
>
> www.Metro.net
>
>
>
>
>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list