7

It is my first experience in writing an R-package. I used roxygen2 by following the instructions given in this link http://kbroman.org/pkg_primer/

Everythig is working fine except few things.. there could be a simpler solution to solve the issues, but I am not finding clues what I am doing wrong. I hope someone here in this blog can give a solution to solve my issues.

First issue is about {\code\link{function-name}} in roxygen2: In .R script I inlcuded this line:

#' @seealso \code{\link{s2a}} 

After documenting (generating .Rd files) there is no hyperlink to s2a , in documentation s2a shows like a normal text not like hyperlink.. export(s2a) is listed out in NAMESPACE. Is there any other place i need to modify ?

Second issue is about data(): I saved the dataset in .Rdata format and placed in the data/ in package directory. I also created the .R script in R/ as like following steps here http://kbroman.org/pkg_primer/pages/data.html

In DESCRIPTION file LazyData: true .

but when I type data(shh) in R console gives a warning message

data(shh) Warning message: In data(shh) : data set ‘shh’ not found

Any ideas is of great help:)

Hong Ooi
  • 56,353
  • 13
  • 134
  • 187
ngs06
  • 71
  • 1
  • 2

1 Answers1

16

It's been a while since you asked this, but I was having the exact same problem with hyperlinks in documentation not appearing correctly, so for anyone who might be having a similar problem: Are you possibly viewing the development documentation? The links don't seem to work there. (You'll know this is the case if you see Using development documentation for your_function_name in your console output when you run ?your_function_name.)

The links should appear in the non-development documentation. To generate this you can try building and reloading your package, for instance by following the steps here: http://r-pkgs.had.co.nz/man.html#man-workflow-2

hangler
  • 390
  • 3
  • 10