? vs browsevegnettes

what is the difference between ?package-name and browseVignettes("package-name"). Also why browseVignettes does not work on built in functions? Is it only for user lirary?

A vignette supplements the formal documentation of a package. Not all packages use them. Sometimes a package will highlight effective usage of one of its functions but there is no general practice of doing so. The first place to go for functions is

help(“some_function”)

The important things to keep in mind is f(x) = y where f is the function name, x is the formal name(s) of the argument. And y is the return of the function, which is described under “value.” When you see in the function signature a NULL, such as f(x, y = NULL), it means that y is optional, but x is required. The \dots signifies that unspecified other optional arguments are available but ordinarily there’s no need to worry about it.

Details will have more information either about the theory behind the function or practical suggestions on how to use it. The less “textbook” a function is, usually, the longer the section. References may have a citation for the paper that introduced the related package or advanced texts.

It’s tempting to jump directly to examples to substitute one’s own data. This is likely to be disappointing if the Arguments section isn’t read carefully. For example if x is supposed to be a vector, a list probably won’t work.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.