An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090504/8a153931/attachment-0001.pl>
can install.packages() copy utility files to the public_html directory ?
3 messages · Markus Loecher, Uwe Ligges, Gabor Grothendieck
Markus Loecher wrote:
Dear fellow R-users, I am about to publish an HTML utility package to CRAN that expands on the R2HTML package and includes a few goodies such as sorted tables, easy automation of framed HTML reporting, etc. However, some of the resulting dynamic HTML pages need to access JavaScript code that should sit in a specific subdirectory of public_html. My more general question is hence, (i) how do I include the directory containing the JavaScript code in my R package and
Yes, in directory ./inst/JavaScript for example that is copied to ./JavaScript during installation of the package.
(ii) is it possible to copy this directory to the user's public_html path during installation ?
Yes, if it is a source package (not for a binary package), BUT you should not write such code that copyies files to a directory different than the package's directory in the library that it is installed to. Things that install files to suprising locations are sometimes considered to be some kind of malware. Uwe Ligges
Thanks! Markus [[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
2009/5/4 Uwe Ligges <ligges at statistik.tu-dortmund.de>:
Markus Loecher wrote:
Dear fellow R-users, I am about to publish an HTML utility package to CRAN that expands on the R2HTML package and includes a few goodies such as sorted tables, easy automation of framed HTML reporting, etc. However, some of the resulting dynamic HTML pages need to access JavaScript code that should sit in a specific subdirectory of public_html. My more general question is hence, (i) how do I include the directory containing the JavaScript code in my R package and
Yes, in directory ./inst/JavaScript for example that is copied to ./JavaScript during installation of the package.
(ii) is it possible to copy this directory to the user's public_html path during installation ?
Yes, if it is a source package (not for a binary package), BUT you should not write such code that copyies files to a directory different than the package's directory in the library that it is installed to. Things that install files to suprising locations are sometimes considered to be some kind of malware.
Also not all uses of R2HTML would be for use with a web server at all. Also you can't assume the directory is public_html even if it is on a server.