Trying to install rgdal package in R 3.3.0 on Ubuntu 16.04 using
In file included from
from OGR_write.cpp:11: /usr/share/R/include/S.h:41:3: error: #error S.h can not be used from C++ code: use R.h instead #
error S.h can not be used from C++ code: use R.h instead
Wild guess: you could try to reinstall
sp before, just to have any dependency up-to-date.