File restructure #1
This commit is contained in:
@ -1,23 +0,0 @@
|
||||
program define dropmissing
|
||||
syntax varlist [, missing(string) delete]
|
||||
|
||||
tokenize `varlist'
|
||||
local nbitems:word count `varlist'
|
||||
if "`missing'"=="" {
|
||||
local missing="."
|
||||
}
|
||||
|
||||
local nbmissing:word count `missing'
|
||||
|
||||
forvalues i=1/`nbitems' {
|
||||
forvalues j=1/`nbmissing' {
|
||||
local miss:word `j' of `missing'
|
||||
if "`delete'"!="" {
|
||||
drop if ``i''==`miss'
|
||||
}
|
||||
else {
|
||||
replace ``i'=. if ``i''==`miss'
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
Reference in New Issue
Block a user