title: R packages reinstallation on a new system not working
body: <p>i changed to a new laptop and i am trying to install all old packages from the former laptop but its given me an error message:</p>
  
  <p>Error in install.packages : invalid subscript type 'list'</p>
  
  <p>I have tried to use the unlist function but its not working </p>
  
  <pre><code>installedpreviously &lt;- read.csv('installed_previously.csv')
      baseR&lt;- as.data.frame(installed.packages())
          toInstall &lt;- setdiff(installedpreviously , baseR)
              install.packages(toInstall)
  </code></pre>
  
  <p>it should automatically load and install the packages</p>