[R] Name spaces in R 1.7.0
Berwin Turlach
berwin at maths.uwa.edu.au
Mon May 12 13:35:48 CEST 2003
Dear all,
a colleague of mine has some code that calls "linbin2D" in package
"KernSmooth" directly. That code is broken under R 1.7.0 since
"KernSmooth" does not export "linbin2D" from its namespace. Via
trial and error we found to possible solutions:
1) Edit the file NAMESPACE in the directory where KernSmooth is
installed such that linbin2D is exported too.
2) Add something like
linbin2D <- get("linbin2D", envir=environment(bkde2D))
to the code.
We don't like 1) since it messes around with R installation. And 2)
is not nice in case that some students what to run the code under R
1.6.x .
We wonder whether there is another way of accessing non-exported
objects from a package?
Cheers,
Berwin
More information about the R-help
mailing list