rd

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

点点圈 提交于 2019-12-04 03:49:13
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 discussion . The former has a broken link to a package called 'base64' and the latter only addresses various

documenting dataset with roxygen2

◇◆丶佛笑我妖孽 提交于 2019-12-03 09:59:18
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 CpG.human.GRCh37 #' @format a \code{RangedData} instance, 1 row per CpG island. #' @source UCSC Table

how do I document an R Reference Class?

拈花ヽ惹草 提交于 2019-12-03 07:41:40
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 'ClassName': and does not recognize the methods as code objects I need document. as of now, I am writing Rd

devtools roxygen package creation and rd documentation

筅森魡賤 提交于 2019-11-30 04:02:18
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) } the params are numeric, the return values are numeric. I'm pretty sure this isn't an S3 method, lets

How to access the help/documentation .rd source files in R?

£可爱£侵袭症+ 提交于 2019-11-27 22:12:16
In R, one very neat feature is that the source code of functions is accessible as objects in the workspace. Thus, if I wanted to know the source code of, for example, grep() I can simply type grep into the console and read the code. Similarly, I can read the documentation for grep by typing ?grep into the console. Question: How can I get the source code for the documentation of a function? In other words, where do I find the .rd files? I find studying the source of well-written code an excellent way of learning the idioms. Now I want to study how to write documentation for some very specific

How to access the help/documentation .rd source files in R?

旧街凉风 提交于 2019-11-26 14:21:58
问题 In R, one very neat feature is that the source code of functions is accessible as objects in the workspace. Thus, if I wanted to know the source code of, for example, grep() I can simply type grep into the console and read the code. Similarly, I can read the documentation for grep by typing ?grep into the console. Question: How can I get the source code for the documentation of a function? In other words, where do I find the .rd files? I find studying the source of well-written code an