`sapply()` implies that you expect the result to be _s_implified, which implies 
that all your elements are the same length. Sounds like you want to use 
`lapply()` instead, to signal that it will *not* be simplified, even if by 
chance the elements are the same length.

Martin

On 2/11/20, 3:51 PM, "Bioc-devel on behalf of Mohsen Nabian" 
<bioc-devel-boun...@r-project.org on behalf of mnab...@broadinstitute.org> 
wrote:

    " Avoid sapply(); use vapply()"
    
    Hi, This is a Note I received from BiocCheck()
    
    I tried to change my sapply functions to vapply; however, vapply requires
    knowing the exact length of the vector(list), however, my vector length are
    not static and variable. Therefore, vapply may not be of use for me in
    those cases. Is there any solution for it? Or shall I ignore the Note?
    
    Many thanks,
    Mohsen
    
        [[alternative HTML version deleted]]
    
    _______________________________________________
    Bioc-devel@r-project.org mailing list
    https://stat.ethz.ch/mailman/listinfo/bioc-devel
    
_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

Reply via email to