Does it turn on? If so, it might be a good idea to test every feature you can before it dies, in case there are less obvious problems.
For the charging port, you'll need [guide|3748|take the motherboard out,|new_window=true] desolder and remove the port, then solder the new one in place. If you're not familiar with soldering, take a look here: [[Topic:Soldering]]
The R button might be a little more complicated; there are a few things that could be going on
* It could be fine (or just dirty), and the shaking noise could be coming from something else.
* It could have broken off, but left the traces intact. In terms of reattaching the button, this is much easier to fix
* It could have broken off and taken the traces with it. That would make it a lot harder to reattach, though not impossible
Regardless, start by [guide|3739|taking out the SD reader.|new_window=true] The R button is attached to that. If it's still securely in place, take a qtip, dip it in isopropyl alcohol, and use it to press the button several (~50+) times. That should hopefully cleaan out any dirt built up in there.
If it's broken off, there are 2 ways to fix it. The easiest solution is to simply replace the SD board assembly. On the other hand, it's possible to solder the button back onto the board. That method is a lot harder, but probably also cheaper