lookup_coords will use google geocoding API if the location is not already included in the package. See ?rtweet::lookup_coords
You must have an API KEY and enable billing on GCP.
See
and
See the doc about Geocoding API
I think this is why you don't get what you want.
Is lookup_coords("nigeria") resulting with a list containing coordinates ?
If none, then the API does not return anything I thing...
You can check also the result of
jsonlite::fromJSON(glue::glue("https://maps.googleapis.com/maps/api/geocode/json?key={key}&address=nigeria", key = Sys.getenv("GOOGLE_MAPS_KEY")))
Hope it helps