[R] Name spaces in R 1.7.0

Spencer Graves spencer.graves at pdf.com
Mon May 12 16:18:46 CEST 2003

	  If you get no better suggestions, modifying the code to include 
something like the following:

	  if(version$minor<7) {do the 1.6.2 code} else{your patch}

hope this helps.  spencer graves

Berwin Turlach wrote:
> 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
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help

More information about the R-help mailing list