similar to: Function dependency function

Displaying 20 results from an estimated 7000 matches similar to: "Function dependency function"

2017 Nov 15
2
Is there a tool to find unused functions?
I've inherited a large R codebase which has grown over a few years and a few different developers. It contains many things I'd like to delete: - Unused functions - Variable definitions that are never called - Unreachable code I'd write that myself, it would even be fun, but I don't want to reinvent the wheel. Is there an R package that can find these things? I've heard of
2011 Oct 09
2
"What Calls What" diagram. Flow Chart?
I don't know the right computer science words for this question, I'm afraid. Apology in advance. How do you find your way around in somebody else's code? If the user runs a specific command, and wants to know how the data is managed until the result is returned, what to do ? I've tried this manually with tools like mtrace and browser. This is a bit frustrating because the
2017 Nov 15
0
Is there a tool to find unused functions?
mvbutils::foodweb produces a graphical display of the hierarchy (or network or ...) of function calls. Isolated functions are not called. This might help you. -- Mike On Wed, Nov 15, 2017 at 12:44 AM, Alexander Engelhardt <alex at chaotic-neutral.de> wrote: > I've inherited a large R codebase which has grown over a few years and a few > different developers. > > It
2011 Sep 29
3
Finding inter-function dependencies within a package
Hi, I'd like to know which functions in a package call one specific function. I think I've seen a tool for identifying such dependencies, but now I can't find it :-( Searches of help and R site search for keywords like function, call, tree, depend haven't helped :-( Can anyone point me in the right direction? Thanks in advance, Keith Jewell
2007 Nov 09
2
wrapper for coxph with a subset argument
Dear R-help - Thanks to those who replied yesterday (Christos H. and Thomas L.) regarding my question on coxph and model formula, the answers worked perfectly. My new question involves the following. I want to run several coxph models (package survival) with the same dataset, but different subsets of that dataset. I have found a way to do this, described below in functions subwrap1 and
2006 Mar 02
5
Deparsing '...'
Hi, The following function works, but is there a neater way to write it? f = function(x,...) { # return a character vector of the arguments passed in after 'x' gsub(" ","",unlist(strsplit(deparse(substitute(list(...))),"[(,)]")))[-1] } > f(x,a,b,c*d) [1] "a" "b" "c*d" > Thanks. [[alternative HTML
2007 Nov 08
2
mapply, coxph, and model formula
Hello - I am wanting to create some Cox PH models with coxph (in package survival) using different datasets. The code below illustrates my current approach and problem with completing this. ### BEGIN R SAMPLE CODE ############################## library(survival) #Define a function to make test data makeTestDF <- function(n) { times <- sample(1:200, n, replace = TRUE) event
2005 Mar 11
3
delay() has been deprecated for 2.1.0
After a bunch of discussion in the core group, we have decided to deprecate the delay() function (which was introduced as "experimental" in R 0.50). This is the function that duplicates in R code the delayed evaluation mechanism (the promise) that's used in evaluating function arguments. The problem with delay() was that it was handled inconsistently (e.g. sometimes you would see
2005 Dec 09
3
[R] data.frame() size
Hi, Please see below for post on r-help regarding data.frame() and the possibility of dropping rownames, for space and time reasons. I've made some changes, attached, and it seems to be working well. I see the expected space (90% saved) and time (10 times faster) savings. There are no doubt some bugs, and needs more work and testing, but I thought I would post first at this stage. Could some
2010 Jan 06
1
Code flowchart generator for R ?
Hello dear R help group, I wish to create a flowchart of my R code (specifically for profiling the connection of different functions). Maybe something similar to this: http://www.fatesoft.com/s2f/ But for R, and that it will be free (open source would be best). After some searching, I found this package: http://cran.r-project.org/web/packages/diagram/ But couldn't find a way to this
2004 Nov 26
2
Tcl error - brace in argument?
Hi all, Does anyone know a solution for this error ? > tkwidget(dlg, "iwidgets::spinint", range="{0 23}") Error in structure(.External("dotTclObjv", objv, PACKAGE = "tcltk"), class = "tclObj") : [tcl] wrong # args: should be ".31.1.19 configure -range {begin end}". Thanks, Matthew [[alternative HTML version
2006 May 23
4
Avoiding a memory copy by [[
Hi, n = 10000000 L = list(a=integer(n), b=integer(n)) L[[2]][1:10] gives me the first 10 items of the 2nd vector in the list L. It works fine. However it appears to copy the entire L[[2]] vector in memory first, before subsetting it. It seems reasonable that "[[" can't know that all that is to be done is to do [1:10] on the result and therefore a copy in memory of the entire
2005 Dec 08
2
data.frame() size
Hi, In the example below why is d 10 times bigger than m, according to object.size ? It also takes around 10 times as long to create, which fits with object.size() being truthful. gcinfo(TRUE) also indicates a great deal more garbage collector activity caused by data.frame() than matrix(). $ R --vanilla .... > nr = 1000000 > system.time(m<<-matrix(integer(1), nrow=nr, ncol=2)) [1]
2004 May 26
1
FW: is.weekend() odd behaviour
Kurt, Uwe suggested I write to you as maintainer of chron ... at the start of is.weekend, in the check on the argument type, maybe just change chron() to as.chron()? This would ensure as.chron.POSIXt gets called on POSIXt arguments, and (I think) fixes the problem. I tested and it seems ok. No warning/error required. > is.weekend function(x) { if(!inherits(x, "dates"))
2008 Oct 07
3
Automatic code diagramming for R?
Greetings - Is anyone aware of an automatic code diagrammer/flow chart creator that works for the R language (either a contributed package, or external software)? I need to explain some code structure of a package I'm working on to non-R users, and would find it extremely helpful to have such a program similar to, for example, Visustin ( http://www.aivosto.com/visustin.html ). I can do it
2007 Jan 26
2
Using functions within functions (environment problems)
Hi everyone, I've been having difficulty writing wrapper functions for some functions where those same functions include other functions with eval() calls where the environment is specified. A very simple example using function lmer from lme4: lmerWrapper <- function(formula, data, family = gaussian, method = c("REML", "ML", "PQL", "Laplace",
2006 May 02
4
"a"+"b"
Hi, Is there a way to define "+" so that "a"+"b" returns "ab" ? > setMethod("+",c("character","character"),paste) Error in setMethod("+", c("character", "character"), paste) : the method for function '+' and signature e1="character", e2="character" is sealed
2001 Oct 23
2
Possible bug, Rprof() and scan(pipe()) (PR#1140)
This looks like a bug? Unable to use scan(pipe()) while profiling. I have no idea whether this version of R violates the "do not use `Rprof' in an executable built for profiling" warning in ?Rprof. Thanks -Don > version _ platform powerpc-apple-darwin1.4 arch powerpc os darwin1.4 system powerpc, darwin1.4 status Patched major 1 minor 3.1 year
2002 Jun 11
2
Puzzled by what Rprof is telling me
I am using Rprof() to help find ways to improve performance. I found a function whose total seconds and self seconds were large. I replaced it with something else. The something else had a small number of total seconds and self seconds. But the total time did not decrease. I don't understand how that could be, and would appreciate any suggestions. Thanks -Don Details, unfortunately
2007 Mar 31
1
Probem with argument "append" in "Rprof"
Hello, Appending information to the profiler's output seems to generate problems. Here is a small example of code : <code r> require(boot) Rprof( memory.profiling = TRUE) Rprof(NULL) for(i in 1:2){ Rprof( memory.profiling = TRUE, append = TRUE) example(boot) Rprof(NULL) } </code> The problem is that the file Rprof.out contains more than once the header information: $ grep