Error installing package quanteda and dependency RSpectra on rstudio.cloud - g++: internal compiler error: Killed (program cc1plus)

There is nothing special one needs to do.

You do not appear to have included the error message you are encountering, just the console command you are running.