We first define the function as a variable, myFirstFun, using the keyword function, which also receives n as argument (no type specification). The latter will exist within the function. We used an integer, but 'n' could also be a vector or a matrix or a string: R handles all this nicely for us.
America in the 20th Century. The 20th century heralded the beginning of a new era in fitness. President Theodore Roosevelt, perhaps the most physically fit president ever to occupy the Oval Office, used his power and own example to encourage U.S. citizens to be physically active.
Some wars were veritable incubators of future presidents: fully one-third of our presidents served in either the Civil War or Second World War. The four men who served in two wars before becoming president are Andrew Jackson, Zachary Taylor, U.S. Grant, and Dwight D. Eisenhower. It will be interesting to see if any future American presidents are veterans of the Persian Gulf War (1991) or the Iraq War (2003-2004). No doubt the president with the most colorful military career was Andrew Jackson. Already as a 13-year-old boy, he was serving in the Continental Army as a messenger.