Dear Joris,
Thank for your comments. Changing importFrom("zoo", rollmax) to
importFrom("zoo", rollmax, rollmax.default) solved the problem.
Best regards,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium
+ 32 2 525 02 51
+ 32 54 43 61 85
Thierry.Onkelinx@inbo.be<mailto:Thierry.Onkelinx@inbo.be>
www.inbo.be<http://www.inbo.be/>
To call in the statistician after the experiment is done may be no more than
asking him to perform a post-mortem examination: he may be able to say what the
experiment died of.
~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data.
~ Roger Brinner
The combination of some data and an aching desire for an answer does not ensure
that a reasonable answer can be extracted from a given body of data.
~ John Tukey
Van: Joris Meys [mailto:jorismeys@gmail.com]
Verzonden: maandag 28 januari 2013 11:27
Aan: ONKELINX, Thierry
Onderwerp: Re: [Rd] incorrect import?
'rollmax' is a generic S3 method, and the point of that is to be visible
to the user. If you only import the generic, it can't find the methods as
they still reside in the namespace of 'zoo', which you neither imported
nor attached to the search path. So either you import also the relevant methods,
or you just load the zoo package using Depends instead of Imports and import.
Cheers
Joris
On Mon, Jan 28, 2013 at 11:10 AM, ONKELINX, Thierry
<Thierry.ONKELINX@inbo.be<mailto:Thierry.ONKELINX@inbo.be>> wrote:
Dear all,
I'm not getting what I'm doing wrong. The line below from my
read.fsa.bin function throws an error when just loading my AFLP package and
disappears when I load the zoo package as well.
#the line that throws the error
Index <- which(Peak == rollmax(Peak, k = 1 + 2 *
floor((min(diff(SizeStandard)) * Fs - 1) / 2), fill = -Inf))
#the error
Error in UseMethod("rollmax") : no applicable method for
'rollmax' applied to an object of class "c('double',
'numeric')"
DESCRIPTION of the AFLP package contains
Imports: ggplot2, mvtnorm, seqinr, zoo, signal, xtable, vegan
The NAMESPACE contains
importFrom("zoo", rollmax)
What am I missing?
The source files are available on
https://r-forge.r-project.org/scm/?group_id=1027
Best regards,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium
+ 32 2 525 02 51<tel:%2B%2032%202%20525%2002%2051>
+ 32 54 43 61 85<tel:%2B%2032%2054%2043%2061%2085>
Thierry.Onkelinx@inbo.be<mailto:Thierry.Onkelinx@inbo.be>
www.inbo.be<http://www.inbo.be>
To call in the statistician after the experiment is done may be no more than
asking him to perform a post-mortem examination: he may be able to say what the
experiment died of.
~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data.
~ Roger Brinner
The combination of some data and an aching desire for an answer does not ensure
that a reasonable answer can be extracted from a given body of data.
~ John Tukey
* * * * * * * * * * * * * D I S C L A I M E R * * * * * * * * * * * * *
Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer en
binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is
door een geldig ondertekend document.
The views expressed in this message and any annex are purely those of the writer
and may not be regarded as stating an official position of INBO, as long as the
message is not confirmed by a duly signed document.
______________________________________________
R-devel@r-project.org<mailto:R-devel@r-project.org> mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
--
Joris Meys
Statistical consultant
Ghent University
Faculty of Bioscience Engineering
Department of Mathematical Modelling, Statistics and Bio-Informatics
tel : +32 9 264 59 87
Joris.Meys@Ugent.be<mailto:Joris.Meys@Ugent.be>
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php
* * * * * * * * * * * * * D I S C L A I M E R * * * * * * * * * * * * *
Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer en
binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is
door een geldig ondertekend document.
The views expressed in this message and any annex are purely those of the writer
and may not be regarded as stating an official position of INBO, as long as the
message is not confirmed by a duly signed document.
[[alternative HTML version deleted]]