similar to: functions as arguments to ther functions with inlinedocs

Displaying 20 results from an estimated 2000 matches similar to: "functions as arguments to ther functions with inlinedocs"

2011 Sep 08
1
invalid strings while parsing code with inlinedocs package.skeleton.dx()
Dear list members, I use the package inlinedocs to create documentation for a package that I am building. The function package.skeleton.dx() is used to convert the source *.R file into the *.Rd documentation file. Usually this works like a charm, but on several occasions I got messages like this one: extra.code.docs prefixed.lines extract.xxx.chunks title.from.firstline
2011 Jul 06
1
including figures in html documentation/help
Dear list members, is it somehow possible to include figures to the html help pages of individueal functions (containing for example a plot produced by that function?) I thought about adding these figures into a 'graphs' subfolder of the package folder and then to somehow insert some sort of html link into the documentation code. I use inlinedocs for creating the documentation. Any
2014 Jan 07
1
Why do methods of "initialize" have no "srcref" attribute as other S4 mehtods?
For documentation we use a system that generates Rd files from special comments in the code. (inlinedocs). It is crucial to be able to get the defining source code for objects like methods to extract the comments from it. Here is an R session that shows how this works for several kinds of methods and (at the end of the session) how if fails for methods of "initialize" >
2011 Sep 28
3
dump.frames, debugger and the "..." argument
Dear List, i run R non interactively and use option(error = dump.frames) to reconstruct the cause of errors for debugging. One of the functions in the call stack however uses the "..." (dot dot dot) argument. When I run debugger() and try to browse to this functions' environment I get the following error message: Error in get(.obj, envir = dump[[.selection]]) : argument
2010 Aug 17
1
prompt () and backticks for default arguments
Dear all, I just noticed, that prompt () looses backticks that protect default arguments: f <- function (FUN = `*`) {} cat (prompt (f, NA)$usage) yields: \usage{ f(FUN = *) } %- maybe also 'usage' for other objects documented here. without the backticks, which is of course found by R CMD check as syntax error. While this is easily fixed if the .Rd is further edited manually, I
2010 Dec 16
5
test whether all elements of a vector are identical
Dear list, this might be an easy one, but I could figure out a solution (or how to google the right term). Is there any way to test whether all elements of a vector are identical? For numeric vectors I would use sum(diff(vector)==0)==0 but I have character vectors. Any Ideas? Cheers Jannis
2018 Jan 30
0
Best practices in developing package: From a single file
> >> I am wondering what are the best practices for developing an R > >> package. I am aware of Hadley Wickham's best practice > >> documentation/book (http://r-pkgs.had.co.nz/).??I recall a couple of > >> years ago there were some tools for generating a package out of a > >> single file, such as using package.skeleton, but no auto-generated
2011 Apr 27
3
setting options only inside functions
Dear list members, is it possible to set some options only inside a function so that the original options are restored once the function is finished or aborted due to an error? Until now I do something like: dummy=function() { old.options=options(error=dummy1()) .... options(old.options) } This works for most cases but when the function terminates because of an error and its last
2013 Apr 08
4
checkUsage from codetools shows errors when function uses functions from loaded packages
Dear list members, I frequently program small scripts and wrap them into functions to be able to check them with checkUsage. In case these functions (loaded via source or copy pasted to the R console) use functions from other packages, I get this error: no visible global function definition for ?xxxxxxx? For example: test = function() { require(plotrix) color.legend() }
2011 Jan 12
2
RNetCDF: retrieving variable names and units
Dear List, does anybody has experience with the RNetCDF package? I manage to open a connection and copy data from a ncdf file but would need a way to automatically retrieve variable names (ideally all of them from one file) and units from the file. Any ideas? Jannis
2010 May 18
4
scaling with relative units in plots or retrieving axes limits in plots
Dears, a way to define x and y positions in plots in relative numbers (e.g in fractions between 0 and 1 referring to relative positions inside the plot region) would really help me. One example I would need this to would be to add text via text() to a plot always at a defined spot, e.g the upper left corner. Until now I always determined maximum x and y values and used those, but defining
2011 Oct 05
3
help with regexp
Dear list memebers, I am stuck with using regular expressions. Imagine I have a vector of character strings like: test <- c('filename_1_def.pdf', 'filename_2_abc.pdf') How could I use regexpressions to extract only the 'def'/'abc' parts of these strings? Some try from my side yielded no results: testresults <-
2009 Dec 01
4
median for time data
Hi everybody How do I do to calculate the median and average of a colum of time data like this: "8:50:10". I also need to plot the time difference between two colums Thanks a lot -- View this message in context: http://n4.nabble.com/median-for-time-data-tp932287p932287.html Sent from the R help mailing list archive at Nabble.com.
2011 Aug 01
3
General indexing in multidimensional arrays
Dear R community, I have a general question regarding indexing in multidiemensional arrays. Imagine I have a three dimensional array and I only want to extract on vector along a single dimension from it: data <- array(rnorm(64),dim=c(4,4,4)) result <- data[1,1,] If I want to extract more than one of these vectors, it would now really help me to supply a logical matrix of the
2011 Jan 20
2
Procuct of a sequence or vector
Dear list, is there a function in R that returns the product of a vector? E.g. if the vector is c(1,2,3,4) it should return 1*2*3*4=24 Cheers Jannis
2012 Nov 18
2
list.files, recursively
Dear R developers, as far as I understand the manual of list.files(), there is only a way to exclude directories from the returned vector if you use list.files recursively. In non recursive mode, there seems to be no way of excluding directories (the include dirs argument does not seem to have any effect). Would it not be more intuitive and practical to allow the switching off of directory
2017 Sep 09
2
Register Allocators Documentation
Hi all, I am interested in the spill code which is produced by the register allocators. Therefore I wanted to ask if there  is some Documentation in which these allocators are described, or  that explains  how the register spilling works in detail. Regards Jannis
2011 Aug 03
2
syntax with do.call and `[`
Dear List, i would like to mimic the behaviour or the following indexing with a do.call construct to be able to supply the arguments to `[` as a list: test = matrix[1:4,2] result = test[2,] My try, however, did not work: result = do.call(`[`,list(test,2,NULL)) result = do.call(`[`,list(test,2,)) result = do.call(`[`,list(test,2,'')) How can I use the do.call in that way with
2010 Jun 23
2
possibility to determine whether a script is "sourced"?
Dear R community, I am running some rather large scripts either by executing single blocks of them separately or by executing them at once via source('script.R') Now there is a lot of code in those scripts that I only want to run when I run them manually, so I wonder whether there is any way to automatically find out whether the script is run manually stepwise or whether it is run via
2010 Dec 17
2
installing package from source with Linux
Dear list, this may not be related to R but rather to my OS, but I do not understand the issue of compiling R packages deeply enough to figure out the exact cause of the problem. I am trying to install a R package from source as it is not yet available under Cran (Rssa, downloaded here: https://github.com/asl/rssa). Running sudo R CMD INSTALL asl-rssa-6f458e4.tar.gz from the console