How to find out which .c file contains the .c functions of R internals, on Windows?

后端 未结 4 421
南方客
南方客 2020-12-10 03:06

I want to view the source code of R\'s match.call function. As it is an internal function, I downloaded the R source code, went to ./src/main/names.c and looked

4条回答
  •  余生分开走
    2020-12-10 03:45

    Don't download a utility for a one time file content search. You can use findstr. It isn't suitable for a full file system search, but I think it's perfect for what you are trying to do.

    1. run the command shell

    cmd

    1. go to the directory (if you are not sure what the path is, find it in explorer than view the full path by clicking in the address bar) You can copy/paste that directory.
      If the path is C:\Users\jsmith\documents\projects\happy\src\main

    cd C:\Users\jsmith\documents\projects\happy\src\main

    1. use findstr

    findstr do_matchcall

    if you want to search sub directories

    findstr /s do_matchcall

    if only want to know the filename

    findstr /m do_matchcall

    if you want to send the results to another file

    findstr /s /m do__matchcall >searchresult.txt

    if you want the line numbers

    findstr /n do_matchcall

    Findstr also supports regular expressions. To see all the options

    findstr /?

提交回复
热议问题