Displaying 20 results from an estimated 30 matches for "pkgb".
Did you mean:
pkg
2014 Sep 28
1
Using requireNamespace() instead of require()
Suppose I have a function funcA() in package pkgA that requires function funcB() from another package pkgB under certain circumstances. Those circumstances are rare though, so I put package pkgB under 'Suggests', and use this in funcA() when those circumstances do arise:
if (require("pkgB", quietly=TRUE)) {
pkgB::funcB(...)
} else {
stop("Please install package 'pkgB...
2015 Jul 03
1
Are downstream dependencies rebuilt when a package is updated on CRAN?
I was wondering: are the downstream dependencies of a package rebuilt
when a package is updated on CRAN? (I'm referring to the binary
packages, of course.)
The reason I ask is because there are cases where this can cause
problems. Suppose that when pkgB is built, it calls
pkgA::makeClosure(), which returns a closure that refers to a function
in pkgA. Suppose this code is in pkgA 1.0:
makeClosure <- function() {
function() {
funA()
}
}
funA <- function() "funA was called!"
And this is the code in pkgB:
foo <- pkgA::make...
2016 Feb 10
0
Method from package dependency is not updated due to lazy load?
Hi,
not sure this is a bug or just an unavoidable undesirable side-effect -- or
just me that does not do the right thing.
Consider the code and output below. It creates 2 packages:
* pkgA
* pkgB that creates a method for a generic defined in pkgA
Changes in a method for the generic in pkgA (after re-installing pkgA) are
not reflected in pkgB, unless pkgB is re-installed against the new version
of pkgA.
I understand this may be linked to lazy-loading, which somehow keeps the
old method ver...
2013 Aug 30
2
"False" warning on "replacing previous import" when re-exporting identical object
Hi,
SETUP:
Consider three packages PkgA, PkgB and PkgC.
PkgA defines a generic function foo() and exports it;
export(foo)
PkgB imports PkgA::foo() and re-exports it;
importFrom(PkgA, foo)
export(foo)
PkgC imports everything from PkgA and PkgB:
imports(PkgA, PkgB)
PROBLEM:
Loading or attaching the namespace of PkgC will generate a warni...
2011 Dec 15
1
S4 NAMESPACE method imports and exports do not include (promoted?) generics
...Note that importMethodsFrom will also import any generics defined in
the namespace on those methods
However, if PkgA promotes 'unique' to a generic and exports that
DESCRIPTION:
Imports: methods
R/f.R:
setGeneric("unique")
NAMESPACE:
export(unique)
and PkgB creates and exports a method on unique
DESCRIPTION
Imports: methods, PkgA
R/f.R:
setClass("B", representation(b="numeric"))
setMethod(unique, "B",
function(x, incomparables=FALSE, ...) unique(x at b))
NAMESPACE:
importFrom(PkgA, uni...
2011 Oct 15
2
.onLoad failing because could not find function "loadMethod"
Hi,
This strange warning happen sometimes when running 'R CMD check':
* checking whether the package can be loaded with stated dependencies
... WARNING
Error : .onLoad failed in loadNamespace() for ?pkgB?, details:
call: length(new("A"))
error: could not find function "loadMethod"
Error: package/namespace load failed for ?pkgB?
Execution halted
It looks like this package (or one of its dependent packages) has an
unstated dependence on a standard package....
2014 Nov 15
1
Code tools for identifying which package A functions package B use?
Hi,
I'd like to list all package PkgA functions that another package PkgB
use via Depends or Imports (ignoring Suggests for simplicity). As
long as PkgB uses importFrom("PkgA", ...) it's just a matter of
parsing the NAMESPACE file or inspecting
asNamespace("PkgB")$.__NAMESPACE__.$imports. However, what can be
done in case PkgB uses import("...
2009 Aug 17
2
S4 Generics and NAMESPACE : justified warning ?
Dear list,
It seems that a package (pkgB) using another package (pkgA) with S4
generics formed by taking existing functions (for example 'plot') must
not import the existing functions ('plot') in its namespace to avoid
the warning "replacing previous import: plot".
Suppose we use the simple 'import' dire...
2012 Dec 08
1
namespace S3 and S4 generic imports cannot both be satisfied:
...d
setGeneric("unique")
setClass("A")
unique.A <- function(x, incomparables=FALSE, ...) {}
setMethod(unique, "A", unique.A)
Both S3 and S4 methods need to be exported in the NAMESPACE
import(methods)
S3method(unique, A)
exportMethods(unique)
PkgB introduces a new class and method
setClass("B")
unique.B <- function(x, incomparables=FALSE, ...) {}
setMethod(unique, "B", unique.B)
and in the NAMESPACE has
import(methods)
importFrom(PkgA, unique)
S3method(unique, B)
exportMethods(unique)
Unfortuan...
2013 May 08
1
Namespace/inheritance problem in S4 methods for a union class
...Gaujoux <renaud at mancala.cbio.uct.ac.za>
Cc: bioc-devel at r-project.org, dupan.mail at gmail.com
I can replicate this with a simpler example, where PkgA has
setClass("A", representation(x="numeric"))
with NAMESPACE
import(methods)
exportClasses("A")
PkgB has
setClass("B", contains="A")
NAMESPACE
import(methods)
importClassesFrom("PkgA", "A")
exportClasses("B")
and then
library(PkgA); library(PkgB)
setClassUnion("C", c("matrix", "A"))
setGeneric("...
2012 Feb 26
1
improved error message when existing implicit S4 generic is not imported?
...ring package for lazy loading
Creating a generic function for 'plot' from package 'graphics' in
package 'pkgA'
** help
No man pages found in package ?pkgA?
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (pkgA)
pkgB has in its DESCRIPTION
Depends; pkgA
with NAMESPACE
importFrom(graphics, plot)
exportClasses("B")
exportMethods("plot")
R/bar.R has
setClass("B")
setMethod("plot", "B", function(x, y, ...) {})
During R CMD INSTALL pkgB_1.0.ta...
2014 Aug 07
2
How to (appropropriately) use require in a package?
Dear All,
What is the preferred way for Package A, to initialize a cluster, and load
Package B on all nodes?
I am writing a package that parallelizes some functions through the use of
a cluster if useRs are on a Windows machine (using parLapply and family).
I also make use of another package in some of my code, so it is necessary
to load the required packages on each slave once the cluster is
2011 May 19
1
r-2.13 fails make check
...est("-d", pkgSrcPath)) {
+ ## could use file.copy(recursive = TRUE)
+ system(paste('cp -r', shQuote(pkgSrcPath), shQuote(tempdir())))
+ pkgPath <- file.path(tempdir(), "Pkgs")
+ op <- options(warn=2) # There should be *NO* warnings here!
+ ## pkgB tests an empty R directory
+ dir.create(file.path(pkgPath, "pkgB", "R"), recursive = TRUE,
+ showWarnings = FALSE)
+ p.lis <- c("pkgA", "pkgB", "exS4noNS", "exNSS4")
+ for(p. in p.lis) {
+ cat("bu...
2011 Apr 11
1
Conditional "Suggests"
...tion is that if I am writing
Pkg A, I want to detect if Pkg B exists - if so use some functionality
from there, otherwise do something else.
To me this reads as being in the wheelhouse of what 'Suggests' is supposed
to imply, as per the R Extensions manual. The problem here is that if
PkgB is put down as 'Suggests', it is required for R CMD check to pass
which seems to defeat the purpose of this exercise a bit.
If one puts it as 'Enhances' one gets a NOTE earlier in check but then the
WARNING described in this post due to the require() call.
Is there a good way ar...
2018 Aug 23
0
Re: [PATCH] Fix error with --uninstall option on SUSE
...-agree-with-licenses` and not available on the `zypper rm` command.
>
No problem with the patch, just one question: can it happen that zypper
may decide to install packages when removing others, e.g. to keep some
other dependency/relationship satisfied?
For example:
1) package PkgA depends on PkgB | PkgC
2) when installing PkgA, PkgB is installed
3) you try to remove PkgB, and zypper decides to install PkgC to keep
PkgA installed
Of course the example above is overly simplified -- though,
can the above happen?
Thanks,
--
Pino Toscano
2018 Aug 23
3
[PATCH] Fix error with --uninstall option on SUSE
The `-l` option for some `zypper` subcommands is short for
`--auto-agree-with-licenses` and not available on the `zypper rm` command.
---
customize/customize_run.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/customize/customize_run.ml b/customize/customize_run.ml
index f92e9a199..3eacdaca0 100644
--- a/customize/customize_run.ml
+++ b/customize/customize_run.ml
@@ -181,7
2012 Nov 30
1
Workarounds to Rd file name conflict when extending a S4 method of some other package
...scenario that some package (say
'pkga') contains the *generic* method/function 'foo()' as well as *some*
custom methods (for different data types of the available signature
arguments).
Now, let's suppose that someone using 'pkga' and building a new package
(say 'pkgb') would like to build upon the generic method 'pkga::foo()'
and provide some more custom methods for it. When he sticks to the
suggested workflow (especially with respect to the way the roxygen2 code
is written), then R CMD check will rightly(!) complain that an Rd file
with the res...
2016 Apr 20
3
Fresh build from source of R-3.2.5 failing "make check" under 64-bit Ubuntu
...9;
make[1]: *** [test-all-basics] Error 1
make[1]: Leaving directory `/opt/apps/x86_64/R/src/R-3.2.5/tests'
make: *** [check] Error 2
> cd tests
> tail -30 reg-packages.Rout.fail
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (pkgB)
Loading required package: pkgB
building package exNSS4 ...
installing package exNSS4 using file exNSS4_1.1.tar.gz ...
* installing *source* package 'exNSS4' ...
** R
** preparing package for lazy loading
Creating a generic function for 'plot' from package 'graphics' in
pac...
2020 Feb 14
3
R-3.6.2 make check fails
...;, shQuote(pkgSrcPath), shQuote(tempdir())))
+ }
> pkgPath <- file.path(tempdir(), "Pkgs")
> if(!dir.exists(pkgPath)) {
+ message("No valid 'pkgPath' (from 'pkgSrcPath') - exit this test")
+ if(!interactive()) q("no")
+ }
>
> ## pkgB tests an empty R directory
> dir.create(file.path(pkgPath, "pkgB", "R"), recursive = TRUE,
+ showWarnings = FALSE)
> p.lis <- c(if("Matrix" %in% row.names(installed.packages(.Library)))
+ c("pkgA", "pkgB", "pkgC"...
2015 Sep 16
2
R-devel_2015-09-14 throws an error in reg-packages test
...s] Error 1
make: *** [check] Error 2
Looking at reg-packages.Rout.fail shows:
>
> ## else w/o clause:
> ## could use file.copy(recursive = TRUE)
> system(paste('cp -R', shQuote(pkgSrcPath), shQuote(tempdir())))
> pkgPath <- file.path(tempdir(), "Pkgs")
> ## pkgB tests an empty R directory
> dir.create(file.path(pkgPath, "pkgB", "R"), recursive = TRUE,
+ showWarnings = FALSE)
> p.lis <- if("Matrix" %in% row.names(installed.packages(.Library)))
+ c("pkgA", "pkgB", "exNSS4")...