% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/write_shapefile.R
\name{write_shapefile}
\alias{write_shapefile}
\title{Function to export geometries as shapefiles.}
\usage{
write_shapefile(sp, file)
}
\arguments{
\item{sp}{Spatial object to be written as a shapefile.}

\item{file}{Filename of shapefile to write. \code{file} will be cleaned to be
the "base" filename because many files make up a shapefile.}
}
\description{
\code{write_shapefile} uses \code{rgdal::writeOGR} for the shapefile writer
and will write projection information. \code{write_shapefile} will create the
directory where the shapefile is to be exported if necessary.
}
\examples{
\dontrun{

write_shapefile(sp_county, "~/Desktop/county_spatial_data")

}

}
\author{
Stuart K. Grange
}
