I am working in Andy Field's book on R, and am trying to get the 'foreign' package to work.
I was able to download it, but I can seem to load it or use it.
I get the following message when using library(foreign):
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://lib.ugent.be/CRAN/bin/macosx/el-capitan/contrib/3.6/foreign_0.8-72.tgz'
Content type 'application/x-gzip' length 328795 bytes (321 KB)
downloaded 321 KB
The downloaded binary packages are in
Error in value[3L] :
Package 'foreign' version 0.8.71 cannot be unloaded:
Error in unloadNamespace(package) : namespace 'foreign' is imported by 'RcmdrMisc', 'rio', 'Hmisc' so cannot be unloaded
lecturerData<-read.spss("Lecturer Data.sav", use.value.labels=TRUE, to.data.frame=TRUE)
Error in read.spss("Lecturer Data.sav", use.value.labels = TRUE, to.data.frame = TRUE) :
could not find function "read.spss"
I have not taken any steps so far as I am a novice and do not know what to do.
I am using R 3.6.0 GUI 1.70 El Capitan build on a mac laptop (OS Mojave version 10.14.5).
Thanks very much for your help! It would be really useful to be able to import SPSS files in R.