It's not a problem with your data or use of the functions -- rather I
think there's just a little bug in the package (and I've cc'd the
maintainer):
draw.wd leads to a call of draw.default(type = "l") which in turn
leads to plot(type = "l"). However, since draw.default doesn't
have a
type argument, it gets taken as part of the special ... operator which
leads to a conflict when it runs into the other type = "l" in
plot.default that comes from plot(type = "l") in draw.default (I hope
that's clear -- the problem is that at the end of the stack,
plot.default gets handed type = "l" twice).
For now, you can add this code to your script before you use draw and
it should be fine.
draw.wd <- function (wd, ...)
{
if (IsEarly(wd)) {
ConvertMessage()
stop()
}
filter <- wd$filter
draw.default(filter.number = filter$filter.number, family filter$family,
...)
}
Hopefully the maintainer can let us know if I've missed something or
can make a change in the package (it shouldn't be too hard).
Michael
On Wed, Nov 9, 2011 at 9:53 PM, Gyanendra Pokharel
<gyanendra.pokharel at gmail.com> wrote:> I am sorry Michael, the data "lidar" is in the pacakge
"SemiPar".
>
> On Wed, Nov 9, 2011 at 9:46 PM, Gyanendra Pokharel
> <gyanendra.pokharel at gmail.com> wrote:
>>
>> lidar data is in the package "faraway"
>>
>> On Wed, Nov 9, 2011 at 8:50 PM, R. Michael Weylandt
>> <michael.weylandt at gmail.com> wrote:
>>>
>>> Your code is not reproducible. Where is the lidar data coming from?
>>>
>>> Michael
>>>
>>> On Wed, Nov 9, 2011 at 2:29 PM, Gyanendra Pokharel
>>> <gyanendra.pokharel at gmail.com> wrote:
>>> > ?I have got following error in drawing wavelet fitting. can
some one
>>> > help?
>>> >
>>> >> library(faraway)
>>> >> data(lidar)
>>> >> newlidar<-lidar[c(1:128),]
>>> >> library(wavethresh)
>>> >> wds <- wd(newlidar$logratio)
>>> >> draw(wds)
>>> > Error in plot.default(x = x, y = zwr, main = main, sub = sub,
xlab >>> > xlab,
>>> > :
>>> > ?formal argument "type" matched by multiple actual
arguments
>>> >
>>> > ? ? ? ?[[alternative HTML version deleted]]
>>> >
>>> > ______________________________________________
>>> > R-help at r-project.org mailing list
>>> > https://stat.ethz.ch/mailman/listinfo/r-help
>>> > PLEASE do read the posting guide
>>> > http://www.R-project.org/posting-guide.html
>>> > and provide commented, minimal, self-contained, reproducible
code.
>>> >
>>
>
>