Not sure whether it is what you are looking for (it depends on the action you want to perform). For example, let's use a shapefile of populated places.
library(rgdal)
shp <- "C:\path\to\shapefile"
pts <- readOGR(shp,'ne_10m_populated_places_simple')
OGR data source with driver: ESRI Shapefile
Source: "C:\path\to\shapefile", layer: "ne_10m_populated_places_simple"
with 7322 features and 36 fields
Feature type: wkbPoint with 2 dimensions
class(pts)
[1] "SpatialPointsDataFrame"
attr(,"package")
[1] "sp"
names(pts)
[1] "scalerank" "natscale" "labelrank" "featurecla" "name" "namepar" "namealt" "diffascii" "nameascii"
[10] "adm0cap" "capalt" "capin" "worldcity" "megacity" "sov0name" "sov_a3" "adm0name" "adm0_a3"
[19] "adm1name" "iso_a2" "note" "latitude" "longitude" "changed" "namediff" "diffnote" "pop_max"
[28] "pop_min" "pop_other" "rank_max" "rank_min" "geonameid" "meganame" "ls_name" "ls_match" "checkme"
To access the name of the places:
pts$name
head(pts$name)
[1] Colonia del Sacramento Trinidad Fray Bentos Canelones Florida
[6] Bassar
7069 Levels: 25 de Mayo 28 de Noviembre Aalborg Aarau Aba Abadan Abadla Abaetetuba Abai Abakan Abancay Abau Abaza ... Zyryanovsk
If you want the associated coordinates:
pts["name"]
pts[1:5,"name"]
coordinates name
1 (-57.84, -34.48) Colonia del Sacramento
2 (-56.901, -33.544) Trinidad
3 (-58.304, -33.139) Fray Bentos
4 (-56.284, -34.538) Canelones
5 (-56.215, -34.099) Florida