First item is to install the appropriate R library. In this case, it happens to be a library called foreign.
Run R in administrative mode so that library can be installed in the universal library
sudo R
> install.packages("foreign")
Quit R and re-enter R in non-administrative (non-sudo) mode
At, the R prompt, enter the following commands
library(foreign)
fatal_yr <- read.dbf("~/Work/Transportation/NYC/data/shpfiles/fatality_yearly.dbf")
dim(fatal_yr)
That's it, we have loaded the dbf file.
No comments:
Post a Comment