Skip to content
Prev 393679 / 398503 Next

function doesn't exists but still runs..... (akshay kulkarni)

This is not a "problem" ... it is a "feature". Packages often use functions from other packages, but that does NOT mean that you as a user can automatically use those functions  also.

If Package A uses Package B to implement something, but Package B becomes unavailable, the maintainer of Package A would like to fill in the gap. If Package A "Depends" on Package B then users of package A automatically get access to Package B and they get used to treating Package A like it contains all of the functions in Package B directly.

Therefore it is common to have Package A "Import" Package B so that the Package A maintainer won't have to re-implement all of Package B to avoid breaking code for users of Package A. They can fix things under the hood for their own Package A functions using other code.

If a user wants to depend on Package B, it is up to them to use the library function to do so explicitly... and when Package B goes away, they are responsible for dealing with that mess themselves.

You asked "how", and got answers... but you didn't bother to follow up on those answers by reading things like "Writing R Extensions" or Hadley Wickham's "R Packages" or "Advanced R". Don't turn that laziness into a value judgement about "problems" with R.
On January 20, 2023 9:18:54 AM PST, akshay kulkarni <akshay_e4 at hotmail.com> wrote: