pryr package has a useful mem_change function you can use to see how much any code impacts your session memory. also profvis / profile that has rstudio integration shows memory consumption I believe.
Actually, I was able to solve this issue, even with a free account, by running the command "rsconnect::configureApp("MyAppName", size="xxlarge")"
in my RStudio console. I had to run it only once. Now, when I publish the project from RStudio, it seems to work OK. Still cutting my teeth on this though.