You are using RStudio Cloud service, this is different from using Rstudio Desktop or Server installed in your own infrastructure. In Rstudio Cloud you don't have access to sudo commands in the server itself (this is not a VM service), so it's not going to be possible for you to install htop.