similar to: Codetools Query (repost)

Displaying 20 results from an estimated 160 matches similar to: "Codetools Query (repost)"

2008 Feb 28
0
tutorial on codetools
Hi the list Is there any tutorial to learn codetools ? It seems to be a very interesting pacakge, but the help gives not that much detail, and there is not that much examples provided... Christophe
2003 Jul 28
0
codetools
I've put together a package codetools with some tools for examining R source code. It is available at http://www.stat.uiowa.edu/~luke/R/codetools/codetools.tar.gz It requires a reasonably current version of R-devel. The main user functions are: checkUsage, checkUsageEnv, checkUsagePackage: Examine closure, closures in an environment, closures in a package, and report
2009 Mar 06
0
Bug in codetools ?
Hello, Is this a bug in codetools: > codetools::showTree( body( glm) ) ("{" (<- call (match.call)) (if (is.character family) (<- family (get family "function" (parent.frame)))) (if (is.function family) (<- family(family))) (if (is.null ($ family family)) ("{" (print family) (stop "'family' not recognized"))) (if (missing data)
2010 Jun 01
0
codetools: Suggestion to detect potentially unassigned variables
This is just a note/wishlist/for the record: With foo1 <- function() { res; } foo2 <- function() { for (i in c()) res <- 1; res; } foo3 <- function() { while (FALSE) res <- 1; res; } foo4 <- function() { if (FALSE) res <- 1; res; } we get: > foo1() Error in foo1() : object 'res' not found > foo2() Error in foo2() : object 'res' not
2010 Jan 29
1
Question on codetools and parse trees
Dear R Users, Using codetools I obtained the text representation of the parse tree for this snippet z=quote({x[1]<-2}) showTree(z) > ("{" (<- ([ x 1) 2)) (A) If I understand correctly, x[1]<-2 ought to be "[<-"(x,1,2), so shouldn't i see ("{" ( [<- x 1 2 ) ) If indeed the parse tree in (A) is correct, the operation ([ x 1) returns the
2023 Jun 03
3
codetools wrongly complains about lazy evaluation in S4 methods
In a package, I define a method for not-yet-generic function 'qr.X' like so: > setOldClass("qr") > setMethod("qr.X", signature(qr = "qr"), function(qr, complete, ncol) NULL) The formals of the newly generic 'qr.X' are inherited from the non-generic function in the base namespace. Notably, the inherited default value of formal
2007 Jul 25
1
codetools really optional for R CMD check?
After upgrading to R 2.5.1 on Debian, R CMD check gives * checking Rd cross-references ... WARNING Error in .find.package(package, lib.loc) : there is no package called 'codetools' Execution halted * checking for missing documentation entries ... WARNING etc The NEWS file says (for 2.5.0; I was on 2.4 before the recent upgrade) o New recommended package 'codetools' by Luke
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 Feb 03
1
bug in codetools/R CMD check?
Hi Mr Tierney, I have noticed an error message from R 1.12.x's CMD check for a while (apparently prof Ripley completely rewrote CMD check in R 1.12+) e.g.: http://bioconductor.org/checkResults/2.7/bioc-LATEST/snpMatrix/lamb2-checksrc.html ---------------- * checking R code for possible problems ... NOTE Warning: non-unique value when setting 'row.names': ?new? Error in
2020 Oct 01
4
summarize_all Function
r-help Forum I'm using the dplyr:: summarize_all(funs(sum)) function and am receiving a warning message that the `funs()` is deprecated as of dplyr 0.8.0. Ok what should I be using to summarize all columns by sum? Jeff [[alternative HTML version deleted]]
2020 Oct 01
0
summarize_all Function
The warning gives some suggestions. E.g., replace funs(sum,prod) with list(sum=sum,prod=prod). % R CMD Rscript -e 'library(dplyr,warn.conflicts=FALSE); data.frame(X=1:3,Y=c(11,13,17)) %>% summarize_all(funs(sum,prod))' X_sum Y_sum X_prod Y_prod 1 6 41 6 2431 Warning message: `funs()` is deprecated as of dplyr 0.8.0. Please use a list of either functions or lambdas:
2013 Apr 27
1
Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) :
i am getting the following error Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) : contrasts can be applied only to factors with 2 or more levels can any on e suggest how to rectify [[alternative HTML version deleted]]
2011 Jul 02
2
Vector of functions
Hi there, I have a vector of some functions e.g. #-----------------------------# f.1 <- function(a) { return( a ); } f.2 <- function(a) { return( 1 - (tanh(a))^2 ); } f.3 <- function(a) { return( 1 / (1+exp(-a)) * (1 - (1 / (1+exp(-a)))) ); } func.l <- c(f.1, f.2, f.3); #-----------------------------# and would like to calculate the output value of a function in the vector,
2015 Jan 21
2
reducing redundant work in methods package
Doing it like this: genericForPrimitive <- function(f, where = topenv(parent.frame()), mustFind = TRUE) { ans = .BasicFunsList[[f]] ## this element may not exist (yet, during loading), dom't test null if(mustFind && identical(ans, FALSE)) stop(gettextf("methods may not be defined for primitive function %s in this version of R",
1997 Sep 01
1
R-alpha: old Rdoc 2 new Rdoc
--xk+LtGr+JJ Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Attached is a conversion script for converting current R doc files to the proposed new format ... I'm not sure if it handles everything correctly, as I made just some random checks. The main purpose for posting the thing to the list is such that those interested can get a look at the new format. Of
2015 Jan 21
2
reducing redundant work in methods package
Hi all, The function call series genericForPrimitive -> .findBasicFuns -> .findAll happens 4400 times while the GenomicRanges package is loading. Each time .findAll follows a chain of environments to determine that the methods namespace is the only one that holds a variable called .BasicFunsList. This accounts for ~10% of package loading time. I'm sure there is some history to that
2020 Oct 01
0
summarize_all Function
Hello, Any of the two will do, the first is now preferred. library(dplyr) mtcars %>% summarise(across(everything(), sum)) mtcars %>% summarise_all(sum) # no need for `funs()` Hope this helps, Rui Barradas ?s 18:29 de 01/10/20, Jeff Reichman escreveu: > r-help Forum > > > > I'm using the dplyr:: summarize_all(funs(sum)) function and am receiving a >
2004 Mar 25
1
mlocal/mtrace inside a loop
Hello I need some help in figuring Bravington’s debugger out. Ok I have 2 functions, fun1 and fun2 saved in a ASCII file say filename is funs. Fun1 has a loop which calls fun2, fun2 has a loop which fails and I need to find out the value of the variables of the fun2 and fun1 loops at the specific iteration that fails. Both fun1 and fun2 loops will iterate thousands of times so line by line debug
2000 Feb 09
1
error during no-segfault.R
Hello, I am trying to install R0.99 on my PC running Solairis 7. Here is some text from my shell when I ran 'make check': running `primitive-funs.R' comparing `primitive-funs.Rout' to `./primitive-funs.Rout.save' ... OK running `mode-methods.R' comparing `mode-methods.Rout' to `./mode-methods.Rout.save' ... OK running `simple-true.R' comparing
1997 Jun 03
2
R-beta: patch 2
Perhaps I missed something obvious, but when I applied patch 2 and then recompiled R-0.49, I found that the objects such as glm.fit that were supposed to be updated still had their original definitions. After some hair-pulling, I remembered that patch saves a backup copy of the original files it changes. Because of the way the makefile for the system database is structured, both the new files and