Hi, and welcome!
Please see the FAQ: What's a reproducible example (`reprex`) and how do I do one? Using a reprex, complete with representative data will attract quicker and more answers for future reference.
My first suggestion is to catch up on both R
(now at 3.6.2) and RStudio
,now at at least 1.3.