search for: exportpattern

Displaying 20 results from an estimated 45 matches for "exportpattern".

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? R...
2009 Jan 13
2
particulars of importing/loading libraries
...to test S3/S4 methods compatibility Author: Oleg Sklyar Depends: R (>= 2.7.1), methods Maintainer: Oleg Sklyar <osklyar at maninvestments.com> Description: pack1 LazyLoad: yes License: Proprietary URL: http://www.maninvestments.com LazyLoad: no --- pack1: NAMESPACE ------ import(methods) exportPattern("^[^\\.]") exportClasses(posixTime) exportMethods(as.POSIXct) --- pack1: posix.R ------ setClass("posixTime", "numeric") setGeneric("as.POSIXct") setMethod("as.POSIXct", signature(x="posixTime"), function(x, tz) { z = x at .D...
2020 Jun 06
3
Change in package.skeleton behavior from R 3.6.3 to R 4.0.0 ?
...age.skeleton(name=\"p363\")'; cat p363/NAMESPACE" Creating directories ... Creating DESCRIPTION ... Creating NAMESPACE ... Creating Read-and-delete-me ... Saving functions and data ... Making help files ... Done. Further steps are described in './p363/Read-and-delete-me'. exportPattern("^[[:alpha:]]+") edd at rob:/tmp/skeleton$ docker run --rm -ti -u1000:1000 -v ${PWD}:/mnt -w /mnt r-base:4.0.0 bash -c "Rscript -e 'x <-1L; package.skeleton(name=\"p400\")'; cat p400/NAMESPACE" Creating directories ... Creating DESCRIPTION ... Creating NAMES...
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]]
2010 Mar 22
1
Some more help on S4 mechanism
...document to help me. So my first question would beL Is there a convenient document which tells a standard user, who laready developped a package with S3, on how to migrate to the S4 mechanism. Secondly, this is my problem: According to Martin, now I use a NAMESPACE (as follows): import (methods) exportPattern("^[^0]*$") exportMethods( "[","[<-","$","$<-", "plot","print" ) exportClasses( "anam","db","model","rule","vardir","vario","tokens&quo...
2006 May 05
2
Including a single function from a package
...'ve tried after reading the "Specifying imports and exports" section from the "Writing R Extensions" manual, I get an error: "Namespace dependencies not required." My NAMESPACE file consists of the following: importFrom(MASS, mvrnorm) importFrom(gsl, hyperg_2F1) exportPattern("^[^\\.]") A completely separate issue is that when running check, I get a warning at the "checking S3 generic/method consistency" line that states: "Warning: use of NULL environment is depreciated." I've looked at the "Generic functions and methods"...
2015 May 04
1
Define replacement functions
...now contains: S3method("[[<-", mylist) S3method("$<-", mylist) It still does not work. I also created a print method (print.mylist) which did work out of the box, regardless of being in the NAMESPACE file or not. Could it be somehow in here (also in my NAMESPACE file): exportPattern("^[[:alpha:]]+") Or could it be that the type of quoting causes the problems? Like in the NAMESPACE I used double quotes for function definition. Do I need single quotes or back-ticks? Or is there a package where I can look how others implemented this kind of functionality? S?ren >...
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
2011 Mar 23
1
import question
...www.math.mcmaster.ca/~bolker/misc/raneftest_0.001.tar.gz>) that contains a single function, ranef.x(), which is supposed to be an S3 method for class x ... its (trivial) definition is ranef.x <- function(object, ...) { print("x") } the package has a NAMESPACE file: ----------- exportPattern("^[^\\.]") ##importFrom(nlme,ranef) import(nlme) ---------- (I've tried both import() and importFrom() -- I would prefer to use importFrom() if I can ... I also tried importMethodsFrom(nlme,ranef) , but it fails -- it seems to be intended for S4 and not S3 methods?) The package a...
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 nombre y donde queremos grabarla, no debemos indicar su ubicación?. Agradezco de antemano las molestias, Un saludo...
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 Jun 2019 09:06:52 +0000 From: "Koenker, Roger W" <rkoenker at illinois.edu> To: &quot...
2010 Nov 27
1
Bug in parseNamespaceFile or switch( , ... ) ?
...l )\nexport( outDS )\n",file="NAMESPACE") > readLines("NAMESPACE") [1] "blah( nada )" "blee( nil )" "export( outDS )" > parseNamespaceFile("",".") # now parse it $imports list() $exports [1] "outDS" $exportPatterns character(0) $importClasses list() $importMethods list() $exportClasses character(0) $exportMethods character(0) $exportClassPatterns character(0) $dynlibs character(0) $nativeRoutines list() $S3methods [,1] [,2] [,3] > So, it picked up 'export' and ignored the other two...
2020 Jun 06
0
Change in package.skeleton behavior from R 3.6.3 to R 4.0.0 ?
...at p363/NAMESPACE" > Creating directories ... > Creating DESCRIPTION ... > Creating NAMESPACE ... > Creating Read-and-delete-me ... > Saving functions and data ... > Making help files ... > Done. > Further steps are described in './p363/Read-and-delete-me'. > exportPattern("^[[:alpha:]]+") > edd at rob:/tmp/skeleton$ docker run --rm -ti -u1000:1000 -v ${PWD}:/mnt -w /mnt r-base:4.0.0 bash -c "Rscript -e 'x <-1L; package.skeleton(name=\"p400\")'; cat p400/NAMESPACE" > Creating directories ... > Creating DESCRIPTION ......
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 would like to suggest adding the variables used by utils::globalVariables and utils::suppressForeignCheck to the list of things that s...
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
2012 Apr 25
1
Strange bug in my package
...function(object, ...){ object at Residual } ) setMethod("resid", signature(object = "AFLP.outlier"), function(object, ...){ object at Residual } And the NAMESPACE is importFrom(stats, hclust, princomp, residuals, resid) exportPattern(".") Any suggestions are welcome. Best regards, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Kliniekstraat 25 1070 Anderlecht Belgium + 32 2...
2013 Jun 05
1
conflicting imports despite using importFrom in NAMESPACE
...ckage: foo Version: 0.0-0 Date: 2013/06/04 Title: foo Author: John Doe Maintainer: John Doe <jdoe at nowhere.org> Imports: igraph, ape Description: just a test. License: GPL (>=2) LazyLoad: yes ---------------------- And the following NAMESPACE: ---------------------- ## Export all names exportPattern(".") ## Export all classes exportClassPattern(".") ## Import all packages listed as Imports or Depends importFrom(igraph, as.igraph) importFrom(ape, nj) ---------------------- The check (R 3.0.1) passes without warnings, but then when loading the package: > library(foo) Wa...
2011 Mar 10
1
Problem with defining new method for residuals()
...utliers(data)) at normalise.R#30 3: residuals(outliers(data)) at normalise.R#30 2: nrow(residuals(outliers(data))) at normalise.R#30 1: normalise(dummy) #This works fine > data <- dummy > nrow(residuals(outliers(data))) [1] 0 NAMESPACE importFrom(stats, residuals, resid, hclust, princomp) exportPattern(".") METHODS setMethod("residuals", signature(object = "AFLP.outlier"), function(object, ...){ object at Residual } ) setMethod("resid", signature(object = "AFLP.outlier"), function(object, ...){ object at Residual } ) -----------------...
2009 May 22
2
Step by step: Making an R package with Fortran 95
...uppose I'm using Windows XP and place the Folder for the package "Testme" in C:\Program Files\R\R-2.8.1\src\library\Testme Files and folders: DESCRIPTION file -- I understand this file NAMESPACE file: This one has the contents useDynLib("Testme") exportPattern("^[^\\.]") man directory: I put my *.Rd files here. I understand this part. R directory: I put my *.R files here. One of these files calls upon a Fortran 95 subroutine with .Fortran("MySubroutine", var1=as.double(x), var2=as.double(y), etc....
2009 Apr 20
1
Sharing variables in seperate workspace
...last steps gave no warnings or errors. My problem is that I cannot change the mentioned variable (from now on called .FOO) that belongs to the namespace of the package. I think it is because .FOO variable in some locked state, maybe by default created as read-only. It is called .FOO because I use exportPattern("^[[:alpha:]]+") as NAMESPACE file. I don't import anything. I have a function (bar) that, like par does with .Pars from the graphics namespace, modifies the contents of a list. This function has in the bottom (when the function name is called without () from the R command line) a li...