We consider f(R) gravity and Born-Infeld-Einstein (BIE) gravity in formulations where the metric and connection are treated independently and integrate out the metric to find the corresponding models solely in terms of the connection, the archetypical treatment being that of Eddington-Schrodinger (ES) duality between cosmological Einstein and Eddington theories. For dimensions D =? 2, we find that this requires f(R) to have a specific form which makes the model Weyl invariant, and that its Eddington reduction is then equivalent to that of BIE with certain parameters. For D = 2 dimensions, where ES duality is not applicable, we find that both models are Weyl invariant and equivalent to a first order formulation of the bosonic string. We also discuss the form of the boundary terms needed for the variational principle to be well defined on manifolds with non-null boundaries. This requires a modification of the Gibbons-Hawking-York (GHY) boundary term for gravity. This modification also means that the dualities between metric and connection formulations are consistent and include the boundary terms.