From maechler at stat.math.ethz.ch  Mon Feb 18 18:22:45 2008
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Mon, 18 Feb 2008 18:22:45 +0100
Subject: [Rd] Namespace and function open
In-Reply-To: <47B5A5F4.7080809@ibe.med.uni-muenchen.de>
References: <47B5A5F4.7080809@ibe.med.uni-muenchen.de>
Message-ID: <18361.48869.656651.59207@stat.math.ethz.ch>

>>>>> "MS" == Markus Schmidberger <schmidb at ibe.med.uni-muenchen.de>
>>>>>     on Fri, 15 Feb 2008 15:47:16 +0100 writes:

    MS> Hello, I built a package, everything was working very
    MS> well. Now I included a NAMESPACE to export only some
    MS> variables. (export(f, g, ...) ) Everything is working
    MS> fine, except one function. There I get an error:

    MS> Fehler in UseMethod("open") : keine anwendbare Methode
    MS> f?r "open"

    MS> In this function I use the function "open" to generate
    MS> an output bar.

    MS> * if (verbose) { pbt <- new("ProgressBarText",
    MS> length(ids), barsteps = as.integer(20)) open(pbt) }
   
    MS>     for (i in seq(along=ids)) {
   
    MS>       if (verbose) { update(pbt) }

    MS> How I have to change my NAMESPACE file to fix this
    MS> problem?

You also have to export the *methods* for the open() generic:

exportMethods("open")


    MS> Thanks Markus Schmidberger

you're welcome,
Martin M?chler



[Rd] Namespace and function open
Martin Maechler