miscellaneousR A collection of little helper functions in R mySample.r: Replaces the genric sample function and returns ONE value, if the vector handed over has length=1, and an NA if the vector has length=0 (instead of returning an error).