search for: envtest

Displaying 3 results from an estimated 3 matches for "envtest".

2012 Sep 02
1
Environment when NextMethod is used
...n the error doesn't happen because R finds the method in the standard search path.) - An operator like == is used. (If the %in% operator is used, the error doesn't happen.) This may sound very abstract. I've created a sample package that illustrates the behavior. The package is called envtest, and it has a function called envtest(), which uses an S3 method from the nlme package. nlme is listed as an import. You can either clone the repository here: https://github.com/wch/envtest Or you can install it with devtools, using: library(devtools) dev_mode() install_github('envtest...
2009 Jan 23
0
Appending objects created using filehash package
...ically requires rewriting the entire object. Sample code: ================================================= # Setting up the database library(filehash) A <- data.frame(a=c("abcde", "fghij", "klmno"), stringsAsFactors=FALSE) dumpDF( A, dbName="myTestDB") envTest <- db2env(db="myTestDB") ls(envTest) with(envTest, a) # Appending to object a, but basically rewriting it... envTest$a <- c(envTest$a, "HELLO", "GOODBYE") with(envTest, a) If anyone has a suggestion on how to append to an object without completely rewriting it...
2009 Aug 20
2
Problem using findVar( ) in combination with R's lazy evaluation
...various reasons (can elaborate if needed, but it's not really relevant..) Below is a small example of an R function and the C code in which the problem shows: (skip to bold 'question' part if this is allready known) ----------# R function #-------- f <- function(x) { .Call("envtest", environment()) } ----------# C function #-------- SEXP envtest(SEXP rho) { SEXP data; PROTECT(data = allocVector(REALSXP, 1)); data = findVar(install("x"), rho); UNPROTECT(1); return(data); } ----------# END #----------- The result of this function is that it should p...