On Wed, 20 Apr 2011, Tobias Abenius wrote:

Hi,

Has something changed regarding the useDynLib in the NAMESPACE file in packages?

No. As the FAQ asked re bug reports, please don't post speculation rather than problem description.

I've written a package that works in e.g. 2.12/2.13 but simply cannot find the dynamic library under windows. The version on CRAN is older than the one I'm talking about and depends on a newer version of R but I want to make the package available to people with older versions.

Do you mean 'make a binary version of the package ....'?
Binary packages are (on all platforms, but specifically on Windows and Mac OS X) intended for use only on the same 2.x.[012] versions of R.
That warning was not meant to be ignored!

If you had bothered to read the CHANGES file you would known that the location of files on Windows binary installations changed in R 2.12.0: of course there is no way that R 2.10.0 (as the posting guide points out there is no '2.10') could know that was going to be changed a year later.

The solution is for you to prepare a binary package for each version of R you want it available with and make it available on your own repository.

utils:::menuInstallLocal()
package 'lassoshooting' successfully unpacked and MD5 sums checked
require(lassoshooting)
Loading required package: lassoshooting
Error in library.dynam(lib, package, package.lib) :
 shared library 'lassoshooting' not found
In addition: Warning message:
package 'lassoshooting' was built under R version 2.13.0

I'm usually under linux and don't know about the gory details of .dll files.

NAMESPACE file
--------------
useDynLib(lassoshooting)
export(lassoshooting)

happy easter!

regards, Tobias
--
Tobias Abenius
Ph.D. Student, M.Sc. in Computer Science

Mathematical Statistics
Mathematical Sciences
University of Gothenburg


--
Brian D. Ripley,                  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to