Wednesday, December 20, 2006

Prepare a Rd files from a R object

Writing a Rd file for a package can be easy if you export it from a R object.

Suppose you want to export the following function:

test <- function(...) NULL

You export it as a Rd file by typing:

prompt(test, filename="test.Rd")

The "test.Rd" file should be created under your current working directory. Move it to the ..\man\ subdirectory. And begin to edit it.

No comments: