[Rd] convoluted namespace problem

From: Paul Gilbert <pgilbert_at_bank-banque-canada.ca>
Date: Tue 19 Oct 2004 - 00:37:38 EST


I have a work around for this, but either I don't understand something (again) or it is a bug ...
I have an S3 generic function "periods" defined in package tframe and exported from its namespace, and a method "periods.TSdata" defined in package dse1 and set as an S3method in its namespace. It uses another generic function "periodsOutput" defined in dse1 and exported from the dse1 namespace. From package dse2, which does not yet have a namespace, I call periods with a TSdata object and this fails "couldn't find periods.TSdata". Is this user error or a bug? (Details below.)

Thanks,
Paul Gilbert


R : Copyright 2004, The R Foundation for Statistical Computing Version 2.0.0 (2004-10-04), ISBN 3-900051-07-0  ...  

>> require("dse1")
>
>

Loading required package: dse1
Loading required package: tframe
Loading required package: setRNG

[1] TRUE
>> periods(TSdata(output=matrix(1:20,10,2)))
>
>

Error in periods.TSdata(TSdata(output = matrix(1:20, 10, 2))) :

        couldn't find function "periods.TSdata"

>> traceback()
>
>

2: periods.TSdata(TSdata(output = matrix(1:20, 10, 2))) 1: periods(TSdata(output = matrix(1:20, 10, 2)))

>> periods
>
>

function (x)
UseMethod("periods")
<environment: namespace:tframe>

>> dse1:::periods.TSdata
>
>

function (x, ...)
UseMethod("periodsOutput")
<environment: namespace:dse1>

>> dse1:::periodsOutput
>
>

function (x)
UseMethod("periodsOutput")
<environment: namespace:dse1>

>>
>
>



R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue Oct 19 01:09:57 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:45:22 EST