There is also hydrogen bonding between R groups (amongst ionic, covalent etc); together, these are responsible for tertiary structure.
Just adding to that, the overall three-dimensional shape of a protein is determined by the irregular foldings of amino acid chains (secondary structures) and the formation of bonds - these bonds are:
* Ionic bonds - between the positively charged and negatively charged R-variable groups.
* Hydrogen bonds - (see secondary structure for alpha helices/ beta-pleated sheet).
* Disulfide bridges - the formation of disulfide bridges joining cysteine amino acids together.
As mentioned this forms the tertiary structure of the protein, critical to its function, especially when we look at enzymes and how the active site of an enzyme complementary to a substrate depends on its tertiary structure.