The database driver needs more information: the address of the database server, the database name, which "role" (i.e. user) you can connect to the database with, and the associated password. Do you know all those?
A good setup is to collect and store all those parameters in a pg service file, labeled with an easy-to-type "service" name. For example:
[xyz]
host=<hostname or ip>
dbname=<database>
user=<role>
password=<password>
Then you can create a connection in R using the service name alone:
library('RPostgreSQL')
con <- dbConnect(PostgreSQL(), dbname = 'postgres://@/?service=xyz')
Save the pg service file in the correct path (~/.pg_service.conf on linux). You can include separate blocks for each service/database you use, so this file shouldn't live in a particular project's directory.