Self-Starting functions in R