Can we have a function that can show a function was where used?

I like R language and the Rstudio IDE is very great, while I have to say when I use python with pycharm, I find it very helpful.

One most convenient function is that when I write a function in pycharm, and use it some where, I can find it.

In Rstudio, only provide one direction search, when you use the function, ctrl+click the function name, you will find where the function was defined. But if you have defined a function, and then you want to know where and how many times it was used, seems a bit hard. Especially when the function are in different .R file while in the same .Rproj.

Even we can provide a simpler function. If we can search across all the .R file in one .Rproj or in current opened .R files, that can also solve the problem.

How can we find where the function was used? How do you manage many functions you write in a big project?

For your first question, I guess you could use grep (in the command line).

(There seems to be grepWin if you are on Windows. But I don't know anything about it).

For your second question, I guess you could write a package.

If you're asking specifically about within the IDE, for this bit you can use Ctrl+Shift+F ( Command for a Mac) for "Find in Files" within the project and restrict by filetype.

There are various other find functions you can see in the Edit dropdown as well

2 Likes