I don't know if ctags works with R files, but ctags does a similar thing as
you are asking for other languages, and can be integrated into git using
hooks, as in:
https://robots.thoughtbot.com/use-git-hooks-to-automate-annoying-tasks
Don't know if this helps, but thought I would pass it alon
Thanks Sven. That indeed works. And if anyone has ideas how it could be
put into R so Windows users could benefit, I'm sure it would be useful
in checks of packages.
In other investigations of this, I realized that install.R has to
prepare the .rdb and .rdx files and at that stage duplication migh
Hadley
My initial reflex reaction was svn/git too, but then I could not see how
to use either to identify the problem John had. If you have a good
svn/git command for identifying duplicate functions could you please
post it, I am curious. (BTW, John does use svn, and possibly git too.)
Thank
Despite it might help, learning/using git is not tackling this specific
problem, I suggest code that does:
sed -e 's/^[\ \t]*//' -e 's/#.*//' R/* | awk '/function/{print $1}' | sort |
uniq -d
or
https://gist.github.com/setempler/7fcf2a3a737ce1293e0623d2bb8e08ed
(any comments welcome)
If one k
I think this sort of meta problem is best solved with svn/git because you
can easily see if the changes you think you made align with the changes you
actually made. Learning svn or git is a lot of work, but the payoff is
worth it.
Hadley
On Friday, July 22, 2016, ProfJCNash wrote:
> In trying t