Here's your rectangle points, note the first and last point match up:
rect.1 <- data.frame(long=c(-117,-117,-114,-114,-117),lat=c(35,40,40,35,35))
Now create spatial polygons object. You only need five levels of nested parens:
rectS = SpatialPolygons(list(
Polygons(list(
Polygon(coords=rect.1)
),ID=1)),
proj4string=proj4string(cali))
where cali
is my SpatialPolygonsDataFrame of California, it has a lat-long projection and you have to set the rectangle to be the same.
Now you can:
gIntersects(rectS,cali)
## [1] TRUE
Repeat over rectangles.
Oh, and of course four points in lat-long coordinates don't make a "rectangle" in the sense we learned at school because the earth isn't flat...