BiologicalRecordsCentre / sparta

Species Presence/Absence R Trends Analyses
http://biologicalrecordscentre.github.io/sparta/index.html
MIT License
21 stars 24 forks source link

Incorrect error due to spelling mistake in errorChecks #88

Closed AGAuffret closed 5 years ago

AGAuffret commented 5 years ago

Hello, Thanks for an excellent package. I was just thrown the following error by createWeights:

Error in errorChecks(dist = distances, sim = attributes, dist_sub = dist_sub,  : 
  the values in sim must be integers or numeric 

I was pretty sure that everything was in order, so I looked into the errorChecks file and saw that in a few places, 'integer' is misspelled as 'interger' when checking the class of data frame columns, meaning that data.frames with class integer result in the error, even though they shouldn't. Previously my data frame columns have been numeric, so I didn't get the error.

Cheers, Ali

AugustT commented 5 years ago

Great spot. Are you happy to do a pull request to fix this issue so you get credit? Else I will get to it in a few days.

AGAuffret commented 5 years ago

Okay, I've tried to make the pull request. It was the first time I've done that but it seems like it's there.

AugustT commented 5 years ago

As noted on the pull request there is a spelling error in the tests that needs to be fixed in order for the pull request to get through the automated checks

AGAuffret commented 5 years ago

I tried, but it's looking like it didn't work. I'm feeling increasingly out of my depth here so I will let you get on with it when you have time. I'm not worried about credit, just glad I could help by spotting the problem. Let me know if I need to do anything.

AugustT commented 5 years ago

No problem, I'll get to it. If it is any reassurance you were 80% of the way there!