Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
A couple of things...
In R it is almost never to return
NULL
. If you want the coder to reutrn "nothing", far better ischaracter(0)
so the return type is consistent for all cases. But, R has something very few other languages have, the ability to represent "unknown" values withNA
. Either of these would be more appropriate for the language thanNULL
. In this, specific, context, I thinkNA
would be most appropriate for any date after April 30, 1789 since there is a US President for all of those dates (presumably into the future as well) even if we don't know who it is, andcharacter(0)
for any dates before that since there was no US President before that date.As far as the problem goes,
should be,
Since US Presidents are elected for 4 year terms.
No random tests.