How to connect to a Postgresql Server with an IPv6 address using obdc dbi packages?

I can connect to the Postgresql Server through an SSH tunnel using an IPv4 address and also directly with the static IPv6 address using other software (DBeaver) that uses JDBC drivers, but I can't connect using the IPv6 address with ODBC drivers on R. I get an error message saying that the address can't be reached. I know that under the hood the IPv6 address should be enclosed between brackets ([]), maybe there is a setting I need to enable on the odbc or DBI packages? Does anyone have experience with these?