[R-pkg-devel] Searching examples in source code

Iñaki Ucar |uc@r @end|ng |rom |edor@project@org
Sun May 8 21:14:13 CEST 2022


El dom., 8 may. 2022 21:03, Ben Engbers <ben.engbers using gmail.com> escribió:

>
>
> Op 08-05-2022 om 17:55 schreef Iñaki Ucar:
> > On Sat, 7 May 2022 at 23:25, Ben Engbers <Ben.Engbers using be-logical.nl>
> wrote:
> >>
> >> Hi,
>
> >> My first question is if there is a useful linux command to search all
> >> the source code of installed packages on my system.
> >
> > Not sure what you mean here. The source code is not copied along with
> > your installed packages.
>
> Uh? I didn't know that. How does the compile process work? Does this
> mean that the (C or C++) sources only live in the repository and that
> the compile command accesses those files?
>

The installer downloads the source code, compiles it, and installs the
resulting binary. The source code is not needed anymore.


> >> The second question is if there is a command to search all packages at
> >> https://cran.r-project.org/web/packages/available_packages_by_name.html
> ?
> >>
> >> This question is not only relevant to C++ examples. It would also be
> >> nice if you could search for occurrences of commands in R code.
> >
> > There's a read-only mirror of CRAN on GitHub
> > (https://github.com/cran). Going there and using the search form
> > (i.e., specifying "org:cran <your_search_here>") is probably the best
> > bet to find what you're looking for.
>
> If I go to that site and enter "org:cran asio" in  the search field, I
> am directed to https://github.com/cran/AsioHeaders. That's not what I am
> looking for; I am looking for C sources which make use of org:cran asio.
>
> A R-example would be that I was looking for packages which make use of
> the "socketConnection" function. Entering socketConnection in the search
> form results in "We couldn’t find any repositories matching 'org:cran
> socketConnection'". This doesn't help me...
>

Left menu, after you search for something. You have "code" there.

Iñaki



> Ben
> >
> > Iñaki
>

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list