Skip to content

答复: [R] fail in adding library in new version.

3 messages · Ivy_Li, Gabor Grothendieck, Duncan Murdoch

#
Dear all,
I really appreciate your help. I think I have a little advancement. ^_^
Now I use the package.skeleton() function to create a template. I type:
	f <- function(x,y) x+y
	g <- function(x,y) x-y
	d <- data.frame(a=1, b=2)
	e <- rnorm(1000)
	package.skeleton(list=c("f","g","d","e"), name="example")

in R. I know it will create a folder named "example" in the path of "\R\rw2011\" I opened this folder, its format is similar as other library. Then I modify it "DESCRIPTION" file:
	Package: example
	Version: 1.0-1
	Date: 2005-07-09
	Title: My first function
	Author: Ivy <Ivy_Li at smics.com>
	Maintainer: Ivy <Ivy_Li at smics.com>
	Description: simple sum and subtract
	License: GPL version 2 or later
	Depends: R (>= 1.9), stats, graphics, utils

I don't whether I should modify other "README" file.
When I enter the Dos environment, at first, into the D:\>, I type the following code:
	cd Program Files\R\rw2011\
	bin\R CMD install /example

Well, there appeared error:
	---------- Making package example ------------
	  adding build stamp to DESCRIPTION
	  installing R files
	  installing data files
	  installing man source files
	  installing indices
	  not zipping data
	  installing help
	 >>> Building/Updating help pages for package 'example'
	     Formats: text html latex example chm
	  d                                 text    html    latex   example chm
	  e                                 text    html    latex   example chm
	  f                                 text    html    latex   example chm
	     missing link(s):  ~~fun~~
	  g                                 text    html    latex   example chm
	     missing link(s):  ~~fun~~
	hhc: not found
	cp: cannot stat `D:/PROGRA~1/R/rw2011/example/chm/example.chm': No such file or
	directory
	make[1]: *** [chm-example] Error 1
	make: *** [pkg-example] Error 2
	*** Installation of example failed ***
	
	Removing 'D:/PROGRA~1/R/rw2011/library/example'

That's it. I have to consult every R expert. Please help to solve this issue. Thank you very much!




-----åŽŸå§‹é‚®ä»¶-----
å‘ä»¶äºº: Duncan Murdoch [mailto:murdoch at stats.uwo.ca]
å‘é€æ—¶é—´: 2005å¹´7æœˆ8æ—¥ 19:34
æ”¶ä»¶äºº: Ivy_Li
æŠ„é€: r-help at stat.math.ethz.ch
ä¸»é¢˜: Re: [R] fail in adding library in new version.
Ivy_Li wrote:
Read the R Extensions manual for a detailed description.  You can use 
the package.skeleton() function to create a template, but you need to 
edit it to make it acceptable.
That's complaining about your bad DESCRIPTION file.

Duncan Murdoch
#
hhc.exe is the Microsoft help compiler.  You have to download it and put
it somewhere in your path.
On 7/12/05, Ivy_Li <Ivy_Li at smics.com> wrote:
#
Ivy_Li wrote:
See the appendix "The Windows Toolset" in the R Installation and 
Administration manual.  You need to install those tools.

If you've done that, but decided not to use the Help Compiler (hhc), 
then you need to modify the MkRules file in RHOME/src/gnuwin32 to tell 
it not to try to build that kind of help.

Duncan Murdoch