How to make if statement to check whether a R package is installed or not in R : <p>I am trying to make a personal R-function.</p>

<p>I want add if statement which can check whether essential R packages are installed.</p>

<p>I used exist() function but its purpose is to examine existence of an object
so it didn't work.</p>

<p>Is there a basic command for checking existence of a specific R-package in R?</p>

<p>Thx</p>
