Installing fpp, fpp2, forecasting on Rstudio for Mac 10.13.6

Need help installing the following packages

fpp
fpp2
forecasting

I'm using the below code:

install.packages(c('foreign', 'gmodels', 'lattice', 'ggplot2',
'RColorBrewer', 'psych', 'fpp', 'forecast', 'doBy'),
repos = "http://cran.r-project.org",
dependencies = c("Depends", "Suggests"))

I also downloaded the lasted Rstudio for Mac using the below link
macOS 10.13+
https://download1.rstudio.org/desktop/macos/RStudio-1.4.1103.dmg

Version 1.4.1103

Keep getting the following errors when running this code

library(fpp)
Error: package ‘forecast’ required by ‘fpp’ could not be found
library(fpp2)
Error in library(fpp2) : there is no package called ‘fpp2’
library(forecast)
Error in library(forecast) : there is no package called ‘forecast’

If you get this error message, then forcast package hasn't been successfully installed.
What error message do you get if you try to install it?

install.packages ("forecast")

Hello,

Thank you for your fast response.

My professor was able to help me install the packages. I had to install the packages that were not installing initially and when prompted to consolidate files I responded "No".

This is the codes I ran individually:

install.packages("tseries")
install.packages("RcppArmadillo")
install.packages("forecast")
install.packages("fpp")
install.packages("fpp2")

library(forecast)
library(fpp)
library(fpp2)

data(package="fpp")

Kindly,
Kristy

macOS has a different compiler toolchain and often needs tweaking to a level most users aren't comfortable doing.

Whenever you attempt to install a package and are presented with the a source package is later option to install, choose Y, but if it doesn't work the first time, choose N. There are very few packages that you need to be up to date on the most recent release and within a few days to a week, a new binary will usually be available. This is seldom a problem on Linux because, to steal a phrase, it just works, but macOS has its own ways.

1 Like

Thank you! This is very useful information to know.

-KL

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.