I combine Stata and R, and to reduce confusion, I’d like to rename a few functions to be similar across the two programs.
In R this is simple:
Code:
fre = frq
Stata has a handy function, cond(), see https://www.stata-journal.com/sjpdf....iclenum=pr0016. This function is similar both to R language and to the function ifelse() in R. I’d like to have an easy way of renaming Stata’s cond() to ifelse(). Does this mean I should develop an ado file, or can a simple command at the beginning of a do-file do the trick?
0 Response to Rename a function?
Post a Comment