I would like to extract land cover data in a buffer of 10 km around objects of class SpatialLines and calculate proportion of each land cover type. So, I used the function extract (package raster). I also used the function crop to crop my raster. In my raster, I have 10 land cover types. Here is my code:
buf_line
buf_line