Skip to content
Back to formatted view

Raw Message

Message-ID: <CANnL8gpxkr70HimCWwrqDx_3Mg0wK7OYnWS11xUhOLx7r5HZkQ@mail.gmail.com>
Date: 2020-07-20T16:34:00Z
From: Tim Keitt
Subject: [R-pkg-devel] import 'as' from another package
In-Reply-To: <e474baff-217f-daba-1688-accb7461d455@gmail.com>

It works but "check" gives

> checking package dependencies ... ERROR
  Namespace dependency not required: ?methods?

THK

On Mon, Jul 20, 2020 at 11:24 AM Ben Bolker <bbolker at gmail.com> wrote:

>     @importFrom methods as
>
> ?
>
> On 7/20/20 12:06 PM, Tim Keitt wrote:
> > I have
> >
> >    if (!inherits(x, "RasterLayer")) x <- as(x, "RasterLayer")
> >
> > in a package and its not finding the coerce definition from the raster
> > package. I know I need to add an @import roxygen2 directive of some kind,
> > but I'm not sure the correct syntax. My first try generated a warning
> that
> > it was not needed.
> >
> > What is the correct way to do this? Or does raster need to export this
> > definition?
> >
> > THK
> >
> >       [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-package-devel at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
> ______________________________________________
> R-package-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

	[[alternative HTML version deleted]]