On Sat, 23 Jul 2016, ProfJCNash writes:
> 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.
You could use R functionality to rewrite the shell
commands. Perhaps along those lin
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
Not during build, but before, you could run in a bash from the package source
root:
$ awk '/function/{print $1}' R/* | uniq -d
To find the files, use:
$ grep R/*
Best wishes,
Sven
> On 23 Jul 2016, at 05:01, ProfJCNash wrote:
>
> In trying to rationalize some files in a package I'm workin
In trying to rationalize some files in a package I'm working on, I
copied a function from one file to another, but forgot to change the
name of one of them. It turns out the name of the file containing the
"old" function was later in collation sequence than the one I was
planning to be the "new" on