BIC Function in RStudio

How to perform the BIC(Bayesian Information Criterion) function in RStudio?

Rstudio is a Graphical User Interface (GUI) for the R language.
The R language provides BIC() in its stats base package.
You can read the help which includes an example of its use by typing

?stats::BIC

into your console