Error in histline ... formal argument "xlab" matched by multiple actual arguments

2,552 views
Skip to first unread message

Steve Ahlswede

unread,
Sep 26, 2016, 9:36:49 AM9/26/16
to distance-sampling
Hey,

I am trying to change the xlab for the plotting of my detection function so that it shows the units of the distance measured.

plot(hn,xlab="Distance (m)")

That is the code I am using. and the error returns as such

Error in histline(hist.obj$density, breaks = breaks, lineonly = FALSE,  : 
  formal argument "xlab" matched by multiple actual arguments

Seems like the histline function's argument for xlab is clashing with my custom argument for xlab in the plot() function

If anyone knows how I can rectify this I would be grateful.

Thanks,
Steve

David Lawrence Miller

unread,
Sep 26, 2016, 4:09:57 PM9/26/16
to Steve Ahlswede, distance-sampling
Hi Steve, hi listfolk,

There wasn't a way to do this before (the x labels are hard coded) but
I've changed this in the version of mrds on github (and hence the change
should work in Distance too).

You'll need to install the development version of mrds using the
instructions at: https://github.com/distancedevelopment/mrds#getting-mrds

This will appear in the new version of mrds once it is on CRAN.

cheers,
--dave
> --
> You received this message because you are subscribed to the Google
> Groups "distance-sampling" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to distance-sampl...@googlegroups.com
> <mailto:distance-sampl...@googlegroups.com>.
> To post to this group, send email to distance...@googlegroups.com
> <mailto:distance...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/distance-sampling/644b677a-216f-4800-bfcb-56c07895e177%40googlegroups.com
> <https://groups.google.com/d/msgid/distance-sampling/644b677a-216f-4800-bfcb-56c07895e177%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages