search for: testpkg

Displaying 16 results from an estimated 16 matches for "testpkg".

2003 Sep 28
1
infinite recursion during package installation with methods, setAs
I ran into a problem recently trying to update a package which uses S4 methods using a recent beta of R. I think I can reproduce it with a simple example. I have package called `testpkg' in directory testpkg/. In the R/ subdirectory of testpkg/ I have a file called testpkg.R which contains the following two lines: setClass("testpkg", representation(pts = "list")) setAs("testpkg", "numeric", function(from, to) as.numeric(unlist(from)))...
2020 Jan 24
3
R package builder silently continues after unclosed brace
If you start a function in one file but don't close it, the package will still build if you manage to close it in a later file. Like so: a.R b.R c.R a.R: function_a <- function(){ print("this is function_a") } b.R: function_b <- function(){ print("unclosed function_b") # no closing } c.R: function_c <- function(){ print("function_c will be part of
2007 Jul 18
1
possible bug R CMD check: No space(s) allowed after \VignetteDepends{}
...\\Vignette", tag,"\\{([^}]*)\\}[[:space:]]*", sep = "") Details: The test package I'm using has only one vignette: \documentclass[oneside,letterpaper,12pt]{book} %\VignetteIndexEntry{some entry} %\VignetteDepends{stats} %\VignetteKeyWords{mymodel} %\VignettePackage{testpkg} \begin{document} <<test>>= print("test") @ \end{document} R CMD build, R CMD check and R CMD INSTALL run successfully. If I add an extra space after %\VignetteDepends{stats} then "R CMD check" fails w5:falimadh [~/work/mypkg]> R CMD check testpkg * checking fo...
2019 Jan 24
0
Possible setClassUnion Unloading Issue
...is loaded initially, it registers itself as a super class of the component classes in the S4 cache. When the package the class union lives in is unloaded, it does not undo that registration. Here is an MRE of the problems it causes: ## the character and NULL basic types, and install it testpkg <- tempfile() dir.create(file.path(testpkg, 'R'), recursive=TRUE) writeLines('', file.path(testpkg, 'NAMESPACE')) description <- 'Package: testpkg\nTitle: Textpkg\nVersion: 0.1\n' writeLines(description, file.path(testpkg, 'DESCRIPTION...
2012 Nov 27
0
Puzzling behavior while testing
I'm testing a new release of survival, executing the following piece of code: .... for (testpkg in survdep) { z <- testInstalledPackage(testpkg, outDir="tests") cat(testpkg, c("Ok", "Failed")[z+1], "\n", file="progress", append=T) } The vector survdep contains the names of all 156 packages listed as reverse depends on the CRAN p...
2020 Sep 11
4
Garbage collection of seemingly PROTECTed pairlist
...f_PairToVectorList(prlst)); UNPROTECT(3); return out;} As you can see, I have some diagnostic print statements in there. The offending line is line 40, which I have marked with a comment of // This is where the error occurs. I have a minimal reproducible package at https://github.com/rorynolan/testpkg and I have run R CMD CHECK with valgrind using GitHub actions, the results of which are at https://github.com/rorynolan/testpkg/runs/1076595757?check_suite_focus=true. That's where I found out which line is causing the error. This function works as expected sometimes, and then sometimes this is...
2007 Sep 23
3
html help fails for named vector objects (PR#9927)
...rsion: platform = i386-apple-darwin8.10.1 arch = i386 os = darwin8.10.1 system = i386, darwin8.10.1 status = beta major = 2 minor = 6.0 year = 2007 month = 09 day = 22 svn rev = 42941 language = R version.string = R version 2.6.0 beta (2007-09-22 r42941) Locale: C Search Path: .GlobalEnv, package:testpkg, package:stats, package:graphics, package:grDevices, package:utils, package:datasets, package:methods, Autoloads, package:base John Maindonald email: john.maindonald at anu.edu.au phone : +61 2 (6125)3473 fax : +61 2(6125)5549 Centre for Mathematics & Its Applications, Room...
2007 Apr 11
1
R CMD build fails with try(stop()) in vignette
A vignette in <pkg>/inst/doc with \documentclass[]{article} \begin{document} <<test>>= try(stop('err')) @ \end{document} produces an error with R CMD build <pkg>: ... ** building package indices ... * DONE (testPkg) * creating vignettes ... ERROR Error in try(stop("err")) : err This is not seen with Sweave alone. > sessionInfo() R version 2.5.0 beta (2007-04-11 r41127) x86_64-unknown-linux-gnu locale: LC_CTYPE=en_US;LC_NUMERIC=C;LC_TIME=en_US;LC_COLLATE=en_US;LC_MONETARY=en_US;LC_MESSAGES=en...
2017 Nov 17
0
Risks of using "function <- package::function" ?
...one will overwrite the first one. The normal way to handle this is in the NAMESPACE file, where you should have importFrom(stats, filter) If you then have importFrom(dplyr, filter) you should get an warning: Warning: replacing previous import ?stats::filter? by ?dplyr::filter? when loading ?testpkg?. Duncan Murdoch
2017 Nov 16
2
Risks of using "function <- package::function" ?
Large packages sometimes mask each other's functions and that creates a headache, especially for teaching code, since function signatures may depend on which order packages were loaded in. One of my students proposed using the idiom <function> <- <package>::<function> ... in a preamble, when we use just a small subset of functions from a larger package. I like that
2020 Sep 12
0
Garbage collection of seemingly PROTECTed pairlist
...UNPROTECT(3); > return out;} > > As you can see, I have some diagnostic print statements in there. The > offending line is line 40, which I have marked with a comment of // This is > where the error occurs. I have a minimal reproducible package at > https://github.com/rorynolan/testpkg and I have run R CMD CHECK with > valgrind using GitHub actions, the results of which are at > https://github.com/rorynolan/testpkg/runs/1076595757?check_suite_focus=true > . > That's where I found out which line is causing the error. This function > works as expected sometimes,...
2020 Oct 08
1
Coercion function does not work for the ALTREP object
Hi Gabriel, here is a simple package for reproducing the problem. https://github.com/Jiefei-Wang/testPkg Best, Jiefei On Thu, Oct 8, 2020 at 5:04 AM Gabriel Becker <gabembecker at gmail.com> wrote: > Jiefei, > > Where does the code for your altrep class live? > > Thanks, > ~G > > On Wed, Oct 7, 2020 at 4:25 AM Jiefei Wang <szwjf08 at gmail.com> wrote: > >&g...
2017 Nov 17
2
Risks of using "function <- package::function" ?
...handle this is in the NAMESPACE file, where you >should >have > >importFrom(stats, filter) > >If you then have > >importFrom(dplyr, filter) > >you should get an warning: > >Warning: replacing previous import ?stats::filter? by ?dplyr::filter? >when loading ?testpkg?. > >Duncan Murdoch > >______________________________________________ >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide >http://www.R-project.org/posting-guide.html >and pr...
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
2020 Oct 07
2
Coercion function does not work for the ALTREP object
Hi all, The coercion function defined for the ALTREP object will not be called by R when an assignment operation implicitly introduces coercion for a large ALTREP object. For example, If I create a vector of length 10, the ALTREP coercion function seems to work fine. ``` > x <- 1:10 > y <- wrap_altrep(x) > .Internal(inspect(y)) @0x000000001f9271c0 13 INTSXP g0c0 [REF(2)] I am
2018 May 30
2
CentOS 7 issues with pdf manual / tex conversion
Tom, On 30 May 2018 at 11:34, Tom Callaway wrote: | On 05/29/2018 04:53 PM, Dirk Eddelbuettel wrote: | > I noticed it with a local, not-public package -- but it appears to apply with | > any source package. I replicated with pkgKitten straight off CRAN and after | > checking that it has a six page manual there. | | I'm having trouble reproducing this one. In my fresh CentOS 7 VM, I