Tyler Rinker's original function included a parameter to add NAs. I propose to add this as a separate function so that sorandf (or any other object) can be wrapped in it and have NAs added. The proposed syntax is:
soaddnas(object, columns="all", narate=0.1)
Where columns is an integer representing which columns should have NAs added and narate is a percentage of elements which should be turned into NA.
Tyler Rinker's original function included a parameter to add NAs. I propose to add this as a separate function so that
sorandf
(or any other object) can be wrapped in it and have NAs added. The proposed syntax is:soaddnas(object, columns="all", narate=0.1)
Where
columns
is an integer representing which columns should have NAs added andnarate
is a percentage of elements which should be turned into NA.