Put libfcitx5platforminputcontextplugin.so to /usr/lib/rstudio/plugins/platforminputcontexts/, libFcitx5Qt5DBusAddons.so.1 to /usr/lib/rstudio/plugins/dbusaddons and restart RStudio.
Only tested in Archlinux with rstudio-desktop-bin.
Fcitx5 Qt library (compiled with Qt version 5.12)