How to fix this error in R while installing packages?
<p>This is what I did: </p>

<pre><code>install.packages("TSA",lib="D:/R/packages")    
library(TSA,lib.loc="D:/R/packages")    
install.packages("leaps",lib="D:/R/packages")  
</code></pre>

<p>still getting the error:</p>

<pre><code>library(TSA,lib.loc="D:/R/packages") 
#Error: package ‘leaps’ required by ‘TSA’ could not be found
</code></pre>