Unable to install TSA package

i have downloaded the package but i can't use it, when i downloaded it always came up like this, but still it didn't appear in my packages. any suggestions?

ERROR: dependency ‘locfit’ is not available for package ‘TSA’

  • removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/TSA’
    The downloaded source packages are in
    ‘/private/var/folders/f8/qy9t4r6n69x67nhcdcdz768c0000gn/T/RtmpL9OwQV/downloaded_packages’

The locfit package (which is a package dependency) requires R >= 3.5 and since you are using an even older R version, you would have to update R to be able to install it.

You have to update R, not RStudio.

i'm sorry for asking again, but do you know where can i update it? should i download R that support my mac? but i can't find it in https://cran.r-project.org. mine is mac os 10.13.6. please help me :"

oh hey, it works. thank you so much!!!!!!!!

how to update my Rstudio app? i have tried to redownload it but it didnt help. should i update R first so i can update my Rstudio? thank you for helping me btw