Many thanks for helping.
As your suggestion, i added "importMethodsFrom(AnnotationDbi, as.list)" in NAMESPACE and added "Depends: AnnotationDbi" in DESCRIPTION.
Finally, it worked correctly.
From: Michael Lawrence
Date: 2014-01-12 22:12
Subject: Re: [Bioc-devel] no method for coercing this S4 class to a vector
This is because your package NAMESPACE does not import the S4 generic for as.list. Since you're relying on S4 methods for as.list from AnnotationDbi, add importMethodsFrom(AnnotationDbi, as.list).
On Sat, Jan 11, 2014 at 11:50 PM, turinglife wrote:
I want to convert S4 object into list.
When I perform the following on RStudio, the expected result can be obtained.
x <- as.list(hgu133aENTREZID)
#hgu133aENTREZID is a S4 object, after the above command, x can be converted into list.
When I try to build above command into an R package and check it, there is an error during the checking phase.
Error in as.list.default((hgu133aENTREZID)) :
no method for coercing this S4 class to a vector
Calls: -> as.list -> as.list.default
Why I can not convert S4 into list during the checking package.
Any help would be appreciated.
[[alternative HTML version deleted]]