Sup­pose you want a func­tion to fit a neural net­work. What’s the best way to find it? Here are three steps that help to find the elu­sive func­tion rel­a­tively quickly.

First, use help.search("neural") or the short­hand ??neural. This will search the help files of installed pack­ages for the word “neural”. Actu­ally, fuzzy match­ing is used so it returns pages that have words sim­i­lar to “neural” such as “nat­ural”. For a stricter search, use help.search("neural",agrep=FALSE). The fol­low­ing results were returned for me (using the stricter search).

nnet::nnetHess           Evaluates Hessian for a Neural Network
nnet::nnet               Fit Neural Networks
nnet::predict.nnet       Predict New Examples by a Trained Neural Net
tseries::terasvirta.test
                         Teraesvirta Neural Network Test for Nonlinearity
tseries::white.test      White Neural Network Test for Nonlinearity

If you want to look through pack­ages that you have not nec­es­sar­ily installed, you could try using the findFn func­tion in the sos pack­age. This func­tion searches the help pages of pack­ages cov­ered by the RSite­Search archives (which includes all pack­ages on CRAN). For example

require("sos")
findFn("neural")

returns 206 matches (on 13 Sep­tem­ber 2009) from over 60 pack­ages. These are ordered based on a rel­e­vance score, so the top few pack­ages on the list are prob­a­bly the most use­ful. (There’s a good dis­cus­sion of findFn here.)

To look even fur­ther afield, use RSiteSearch("neural") which will send your search to R site search. As well as CRAN pack­ages, this cov­ers the R-help mail­ing list archives, help pages, vignettes and task views.

Still no luck? Try Rseek.org. It’s a restricted Google search cov­er­ing on R-related sites.

Finally, if all else fails, try ask­ing a ques­tion on Stack­Over­flow (make sure your ques­tion is tagged with “r”), or send your ques­tion to the R-help mail­ing list. Both usu­ally solicit replies in under an hour. How­ever, don’t do this with­out first try­ing to find the func­tion using one of the other methods.

  • Share/Bookmark