zairza-cetb / hacktoberfest-2018

MIT License
20 stars 102 forks source link

This is general approach in R you can easily understand if you code … #36

Closed debasish2256 closed 6 years ago

debasish2256 commented 6 years ago

…in C

I indeed used is.na() to check length, as I was not sure weather lenght() was a simple query or would go through the whole vector to count the elements.

So to sum up, function calls are expensive, therefore recursion should be avoided, and growing the size of a vector (which is probably reassigning and copying?) is also expensive.

The Pull Request resolves Issue #

Description: A brief description about the addition or edits made.

Notes: Delete all the text including this!