rd

Show an Rd file in viewer from Rstudio

喜欢而已 提交于 2020-02-16 03:38:44
问题 I have documentation for functions and datasets in a project folder. In a documentation folder, I have .Rd files for all the datasets. I'd like the user to be able to call a custom help function and launch the .Rd file in the viewer as is done automatically when the file is compiled from the file editor. Is it possible to do this? 回答1: I don't quite understand why you want to do this, but it's possible. What you should do is just put your datasets into a package, document them there, and then

Show an Rd file in viewer from Rstudio

元气小坏坏 提交于 2020-02-16 03:37:04
问题 I have documentation for functions and datasets in a project folder. In a documentation folder, I have .Rd files for all the datasets. I'd like the user to be able to call a custom help function and launch the .Rd file in the viewer as is done automatically when the file is compiled from the file editor. Is it possible to do this? 回答1: I don't quite understand why you want to do this, but it's possible. What you should do is just put your datasets into a package, document them there, and then

Exporting data in Roxygen2 so that they are available without requiring data()

我的梦境 提交于 2019-12-21 11:35:22
问题 After reading questions such as this SO question on documenting a data set with Roxygen I have managed to document a dataset (which I will refer to as cells ) and it now appears in the list generated by data(package="mypackage") and is loaded if I run the command data(cells) . After this, cells will appear when ls() is run. However, in many packages the data is immediately available without requiring a data() call. Also, the data names do not appear when ls() is run. An example is the

Exporting data in Roxygen2 so that they are available without requiring data()

﹥>﹥吖頭↗ 提交于 2019-12-21 11:35:11
问题 After reading questions such as this SO question on documenting a data set with Roxygen I have managed to document a dataset (which I will refer to as cells ) and it now appears in the list generated by data(package="mypackage") and is loaded if I run the command data(cells) . After this, cells will appear when ls() is run. However, in many packages the data is immediately available without requiring a data() call. Also, the data names do not appear when ls() is run. An example is the

documenting dataset with roxygen2

穿精又带淫゛_ 提交于 2019-12-21 03:19:26
问题 I'm trying to document some datasets in an R package using roxygen2. Considering just one of these: I have mypkg/data/CpG.human.GRCh37.RDa which contains an object called CpG.human.GRCh37 and a file called: mypkg/R/cpg-data.R , which contains: #' @name CpG.human.GRCh37 #' @title CpG islands - human - genome build: GRCh37/hg19 #' @description This data set list the genomic locations of human CpG islands, #' with coordinates based on the GRCh37 / hg19 genome build. #' @docType data #' @usage

devtools roxygen package creation and rd documentation

≯℡__Kan透↙ 提交于 2019-12-18 11:34:34
问题 I am new to roxygen and am struggling to see how to be able to use it to quickly create a new/custom package. I.e. I would like to know the minimum requirements are to make a package called package1 using devtools , roxygen2/3 so that I can run the commands require(package1) fun1(20) fun2(20) to generate 2000 and 4000 random normals respectively So lets take the simplest example. If I have two functions fun1 and fun2 fun1 <- function(x){ rnorm(100*x) } and fun2 <- function(y){ rnorm(200*y) }

devtools roxygen package creation and rd documentation

眉间皱痕 提交于 2019-12-18 11:34:33
问题 I am new to roxygen and am struggling to see how to be able to use it to quickly create a new/custom package. I.e. I would like to know the minimum requirements are to make a package called package1 using devtools , roxygen2/3 so that I can run the commands require(package1) fun1(20) fun2(20) to generate 2000 and 4000 random normals respectively So lets take the simplest example. If I have two functions fun1 and fun2 fun1 <- function(x){ rnorm(100*x) } and fun2 <- function(y){ rnorm(200*y) }

Including images in R-package documentation (.Rd) files

三世轮回 提交于 2019-12-09 15:50:15
问题 I am working to document a visualization function in a package of mine. For this purpose I would like to have an image embedded through the Rd-file 'funcname.Rd' that could explain various parameters utilized in the function, and which would pop up if user goes to read the package manual PDF or writes '?funcname' in R. Something in the lines of: 'Writing R extensions'-document doesn't seem to address this issue, and the only references I could find were this blog post and this R-devel

how do I document an R Reference Class?

橙三吉。 提交于 2019-12-04 12:17:33
问题 how do I document the use of member functions of a reference class? if I write a Rd file with a \usage block, how do I avoid the WARNING Functions/methods with usage in documentation object 'XmlDoc' but not in code: $ new I'd expect the \usage block to allow me write things like: obj <- ClassName$new(par1, par2, ...) obj$method1(oth1, ...) and then I'd document the parameters in the \arguments block. If I do this, R CMD check complains with Assignments in \usage in documentation object