Loading a function from a specific package

I download two packages R Hmisc and TeachingDemos , which contain the subplot() function. First, I download the Hmisc package, and it seems that after that I use the subplot() function from Hmisc . This happens even when I first load the TeachingDemos library.

How can I use the subplot() function from the TeachingDemos package, even if the Hmisc package Hmisc also loaded?

+6
source share
1 answer

You can use the :: operator to indicate which function to use so ...

 TeachingDemos::subplot() 
+9
source

Source: https://habr.com/ru/post/953354/