[Rd] about integration of a library into package creation

Duncan Murdoch murdoch at stats.uwo.ca
Mon Jun 12 18:28:20 CEST 2006


On 6/12/2006 11:48 AM, Nicolas Turenne wrote:
>  >
>  >
>  >You didn't show the results of installing your package.  Did that work?
>  >
>  >Generally we advise to do a successful install before you try to run 
> checks.
>  >
>  >Duncan Murdoch
> 
> D:\RBuild\svcR> rcmd build D://RBuild//svcR --force --docs='all' --binary
> hence i obtain the file svcR_1.0.zip
> and following messages :
> 
> D:\RBuild\svcR>rcmd build D://RBuild//svcR --force --docs='all' --binary
> * checking for file 'D://RBuild//svcR/DESCRIPTION' ... OK
> * preparing 'D://RBuild//svcR':
> * checking DESCRIPTION meta-information ... OK
> * cleaning src
> * removing junk files
> tar: svcR/svcR_1.0.tar: file is the archive; not dumped
> * excluding invalid files from 'svcR'
> Subdirectory 'R' contains invalid file names:
>   ade4.dll quadprog.dll spdep.dll

You shouldn't have .dll files in the R directory.  Normally you have
just one, built in the src directory, and then R will install it into
the libs directory.  If you want multiple .dlls, I believe you can
build them in inst/libs, and they'll be copied to libs on installation.

However, the names of your dlls match the names of R packages, which
makes me think you are trying to incorporate routines from other
packages in your code.  If that's what you are doing, this is not the
right way to do it.  You should call other packages through their R
interfaces.  There are plans to allow direct calls into the dlls, but so
far I don't think they exist.

Duncan Murdoch

> * checking for LF line-endings in source files
> * checking for empty or unneeded directories
> * building binary distribution
>  WARNING
> * some HTML links may not be found
> installing R.css in C:/DOCUME~1/Nicolas/LOCALS~1/Temp/Rinst249298526
> 
> Using auto-selected zip options ''
> 
> ---------- Making package svcR ------------
>   adding build stamp to DESCRIPTION
>   installing NAMESPACE file and metadata
>   installing R files
>   installing data files
>   installing man source files
>   installing indices
>   not zipping data
>   installing help
>  >>> Building/Updating help pages for package 'svcR'
>      Formats: text html latex example chm
>   iris_att                          text    html    latex           chm
>   iris_mat                          text    html    latex           chm
>   iris_var                          text    html    latex           chm
>   svcR                              text    html    latex   example chm
> Microsoft HTML Help Compiler 4.74.8702
> 
> Compiling 
> c:\DOCUME~1\Nicolas\LOCALS~1\Temp\Rbuild249291931\svcR\chm\svcR.chm
> 
> 
> Compile time: 0 minutes, 1 second
> 5       Topics
> 8       Local links
> 1       Internet link
> 1       Graphic
> 
> 
> Created 
> c:\DOCUME~1\Nicolas\LOCALS~1\Temp\Rbuild249291931\svcR\chm\svcR.chm, 18,
> 283 bytes
> Compression increased file by 6,096 bytes.
>   preparing package svcR for lazy loading
>   adding MD5 sums
> 
> packaged installation of package 'svcR' as svcR_1.0.zip
> * DONE (svcR)
> 
> 
> 
> in R environment (Rgui front-end)
> i write:
>  > install.packages("D:/RBuild/svcR/svcR_1.0.zip", repos=NULL)
> package 'svcR' successfully unpacked and MD5 sums checked
> updating HTML package descriptions
>  > library(svcR)
> 
> Attachement du package : 'svcR'
> 
> 
>         The following object(s) are masked _by_ .GlobalEnv :
> 
>          findModelCluster
> 
>  >
> 
> 
> and finally when i typewrite my function
> i obtain :
> impossible de trouver la fonction "dudi.coa"
> it can not find the function called in the library that i call in the R 
> source code
> by library(ade4)
> 
> if i call my function by source(),  it works well
> 
> thank you for help
> 
> ---------
> 
> Nicolas



More information about the R-devel mailing list