Error by using coocur package

Hello everyone,

I'm an ecologist and during using package coocur in RSudio I receive this error message:
r in rep(x = 0, times = psite) : ungültiges 'times' Argument
Zusätzlich: Es gab 50 oder mehr Warnungen (Anzeige der ersten 50 mit warnings())
I have a present absent matrix and want to have a coourr matrix with R.


To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:

In your case psite is not what you think it is, but without more information it's impossible to say what exactly is the problem.

so you mean my Dara is too big and need to be smaller?

This is not helping too much. Reproducible example would allow me to run your code on my machine and see output.

Based on your screenshot it's not clear to me what can be the error in this case.

In general, this error will be thrown when psite argument is not an a number, but NULL, for example:

> rep(1, times = NULL)
Error in rep(1, times = NULL) : invalid 'times' argument

Why it's happening in your case is not clear, though.

I never do that, so I try to make it

If you read the link I gave you above carefully, it should be clear how to make a reproducible example for your problem. Let me know if something is unclear.

I tried every thing! I don't really know what the problem is!

I got this error this time! :woman_facepalming:

yes i load it! :frowning:

You are getting that error message because you are including the dpasta command in the reprex code without including the library call to datapasta, but including that code is not necessary since we only need the sample data, not the code to generate it. I recommend you to read the reprex guide a little more carefully.

Do you know how can I bold my first column in my csv file in R?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.