2

I am trying to plot my mean-variance plot using the mvabund package in R. The line of script that doesn't work is:

meanvar.plot(dat_mvabund, legend = TRUE)

I never had any problems with it but now I get an error message like this:

Error in (function () : unused arguments (height = 8, width = 8).

I have tried some online suggestions but nothing seems to work. I also re-installed R and R studio. I tried to run the command on an older database where I am sure it worked before but it is not working now.

My dat_mvabund looks like this:

Zotu17  Zotu22

8322    12  
20539   29  
6105    26  

This table was generated using the command: dat_mvabund <- mvabund(myData) where myData has: Zotus in columns and Sample names in rows.

I hope someone can help! Thank you!

  • please make your question reproducible by including a sample of your data (using the `dput` command and putting it into your question). Also include any other lines of code you think may be relevant – morgan121 Mar 23 '20 at 03:45
  • You might be calling the "meanvar.plot" function from another package - try specifying the mvabund version e.g. `mvabund::meanvar.plot(dat_mvabund, legend = TRUE))` – jared_mamrot Mar 23 '20 at 04:06
  • Thank you jpmam1, I have tried this but it didn't work – Jadranka Nappi Mar 23 '20 at 04:09
  • I've solved the problem! I had to restart my computer and change the code in this way: pdf("outputs/figures/meanvar_plot_AbsAbund.pdf", width = 5, height = 5) meanvar.plot(dat_mvabund, legend=TRUE) – Jadranka Nappi Mar 23 '20 at 05:02

0 Answers0