Displaying 20 results from an estimated 3000 matches similar to: "Some more help on S4 mechanism"
2024 Mar 06
1
Never exporting .__global__ and .__suppressForeign__?
Hello,
(Dear Richard, I hope you don't mind being Cc:'d on this thread in
R-devel. This is one of the ways we can prevent similar problems from
happening in the future.)
Sometimes, package authors who use both exportPattern('.') and
utils::globalVariables(...) get confusing WARNINGs about undocumented
exports:
https://stat.ethz.ch/pipermail/r-package-devel/2024q1/010531.html
I
2004 Sep 09
1
Confused about loading other packages from a package
In my package, I create a new method for plot with the following signature:
setMethod("plot", signature(x="marrayNorm", y="formula"), plot.ma)
where marrayNorm is a class defined in the marray package. After
building and installing my package, I get the following warnings when
I load my package (with library(maVis)):
Warning messages:
1: In the method signature
2009 Dec 01
4
Package is loaded but functions are not exported
Hello,
I wrote a package, which in the NAMESPACE file exports functions like this:
exportPattern("^\\rh")
On R-2.8 (Linux, 64), upon loading the package I have the rh functions present.
On R-2.10, Mac OS X, (32 bit), it builds, loads, but the functions are not
loaded, i.e the only function is rhyper (which is not from my package).
Is there something wrong with my package setup?
2008 Nov 06
1
problem packaging S4 class that contains a slot of jobjRef class
Hello,
I'm trying to package some source files that link R to a broker using
a Java API and the rJava package. I am successful doing the connection
and operate on it using my R code. I would like to package the files and
release the package.
I created some S4 classes to hold several Java objects. I use WinXP and R
2.7.1. I've searched RSeek and the Wiki for help, but could not find a
2009 Jan 13
2
particulars of importing/loading libraries
Dear List:
Sorry for posting maybe a trivial question, but I have a basic
understanding problem. If I have say pack1 and pack2, two R packages,
and pack2 depends on and imports pack1 fully (as in the code below), is
there a way to make all the functionality of pack1 available for the
global and other environments (not only for the functions called from
withing pack2) by loading pack2 only? I
2020 Jun 06
3
Change in package.skeleton behavior from R 3.6.3 to R 4.0.0 ?
The Rcpp package and some related packages such as RcppArmadillo make use of
(local) wrappers around the utils::package.skeleton() function for creating
(basic yet functional) packages using Rcpp or RcppArmadillo. RStudio also
exposes this under the graphical menu as a nice way to construct a package.
But it seems that something changed quite recently in R. I looked into this a
little yesterday
2015 Mar 03
2
[R] Why does R replace all row values with NAs
Diverted from R-help :
.... as it gets into musing about new R language "primitives"
>>>>> William Dunlap <wdunlap at tibco.com>
>>>>> on Fri, 27 Feb 2015 08:04:36 -0800 writes:
> You could define functions like
> is.true <- function(x) !is.na(x) & x
> is.false <- function(x) !is.na(x) & !x
> and use
2008 Nov 22
2
wish: exportClassPattern
It would be nice to have a more convenient means of exporting multiple
classes from a package namespace. Why not have something like
exportClassPattern() that worked like exportPattern() except for classes?
Thanks,
Michael
[[alternative HTML version deleted]]
2015 Mar 24
4
Aleatoriedad
Hola de nuevo, ya empiezo a ser pesado ¿no? bueno, no importa porque
aprendemos todos. Eso, al menos, me parece.
Hoy estuve estudiando en R el tema de la aleatoriedad. Veo que hay
múltiples posibilidades pero me están chocando mucho. Encuentro que el
generador de números pseudo aleatorios es más pseudo de lo que debería.
Me explico, quiero generar 0 y 1 aleatorios. Estoy trabajando con una
2010 Mar 16
1
Problem with S3 to S4 transition
Hello to everybody
I am developing a package using R and have the following problem:
I used to work in a mixture of S3 and S4 mechanism environment: as a
matter of fact, I used to define my classes (say "DB" for illustration)
using the setClass function (with representation field), and
I was using the S3 implicit mechanism writing the functions: print.DB
and plot.DB.
Recently, I
2006 Sep 25
1
Problem with tcltk package: tclfile.dir missing?
Hi,
In R version 2.4.0 beta (2006-09-24 r39502) I'm seeing the following
behavior with the tcltk package:
> library("tcltk")
Loading Tcl/Tk interface ... done
> tkfile.dir()
Error: 'tkfile.dir' is defunct.
Use 'tclfile.dir' instead.
See help("Defunct")
> tclfile.dir
Error: object "tclfile.dir" not found
## But the function is in the
2006 May 05
2
Including a single function from a package
Hello all.
I'm building a package where I want to include a function from two
different packages. In particular, I want to include mvrnorm and
hyperg_2F1 from MASS and gsl, respectively (but the specific functions
do not matter). With what I've tried after reading the "Specifying
imports and exports" section from the "Writing R Extensions" manual, I
get an error:
2011 Nov 08
2
NAMESPACES for data only packages
the NEWS file for R-devel says
*
Even data-only packages without *R* code need a namespace and so may
need to be installed under *R* 2.14.0 or later.
but what should this contain? Can it simply be an empty NAMESPACE
file? I assume that data does not have to
be exported.
-Michael
--
Michael Friendly Email: friendly AT yorku DOT ca
Professor, Psychology Dept.
York University
2015 Mar 03
2
[R] Why does R replace all row values with NAs
On 3/3/15 1:26 PM, Herv? Pag?s wrote:
>
>
> On 03/03/2015 02:28 AM, Martin Maechler wrote:
>> Diverted from R-help :
>> .... as it gets into musing about new R language "primitives"
>>
>>>>>>> William Dunlap <wdunlap at tibco.com>
>>>>>>> on Fri, 27 Feb 2015 08:04:36 -0800 writes:
>>
>> >
2006 Jun 16
11
Detecting Body Onload
I have a piece of code that "waits" for body onload. Every 30ms, it tests
$(''body'').
Seems that isn''t always good enough. I''ve hit situations where the DOM is
"partially" loaded somehow.
I fixed matters by setting a global flag...
<body onload="bodyLoaded=true;">
which provides a better test... of course I could
2019 Jun 28
2
tools::package_native_routine_registration_skeleton?
> ... reports that the fortran names of all the registered fortran functions are ?undocumented objects?...
Those symbols should not be exported. In quantreg v5.33, NAMESPACE has 'exportPattern(".")'. Maybe it is a good time to remove that and export explicitly the symbols that are meant for export.
Georgi Boshnakov
------------------------------
Message: 6
Date: Fri, 28
2011 Jun 23
1
Class not found when search in .onLoad
Hi,
I am facing with a strange behaviour of isClass and extends when these
are called in .onLoad in both R 2.12.1 and R 2.13.0. This is preventing
my package from doing some object initializations at a proper place
(i.e. in .onLoad).
Suppose one defines two S4 classes in a package, and that one needs to
check the inheritance between these two when loading the package (e.g.
to validate slots
2006 May 02
5
How to call a javascript function from rails view?
Is there a way to call a javascript function from within a rails view?
I can''t use the onLoad javascript method inside the <body> tag because I
don''t have control over the body tag, it''s in my header.
There are several rss feed reading functions that are in the page and I
would like to call those functions while the page is being loaded or
once it''s
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
2013 Jul 04
1
Dudas sobre la creación de librerías en R
Buenos días,
Me han surgido unas cuantas dudas sobre la creación de librerías, las cuales las enumero a continuación:
- NAMESPACE: ¿si deseo cargar un paquete o librería como he de hacerlo? ¿he de poner ( exportPattern("^[[:alpha:]]+") ) y entre las comillas la ubicación del paquete?
-Queremos grabar una función habla de hacerlo con dump, y la duda es que como entradas solo tiene el