Romain Francois, Professional R Enthusiast - SnippetIndependant statistical/R consultant2013-03-24T15:53:22+01:00Romain Francoisurn:md5:2cdb21a695f56bfe2b31ee2133c51b42Dotclearsearch the graph gallery from Rurn:md5:0d29803dee8f93b98e1b4dee5b18fab92009-09-08T08:57:00+02:00romain francoisSnippetgraphgalleryR <style>
pre{
font-size:xx-small !important ;
border: 1px black solid;
}
</style>
<p>This is a short code snippet that is motivated by this <a href="http://www.nabble.com/Andrews-plot-td25330696.html">thread</a> on r-help yesterday. The gallery contains a search engine textbox (top-right) that can be used to search for content in the website using either its internal crude search engine or perform a google search restricted to the gallery. </p>
<p>Here we write a small R function that can be used to take advantage of the search engine, from R</p>
<pre>
rgg.search <- function( topic, engine = c("Google", "RGG") ){
engine <- match.arg( engine )
url <- URLencode( sprintf( "http://addictedtor.free.fr/graphiques/search.php?q=%s&engine=%s", topic, engine ) )
browseURL( url )
}
rgg.search( "Andrews plot" )
</pre>Code Snippet : List of CRAN packagesurn:md5:63949cccabe1c5acc3064b9a01d3f96f2009-08-05T15:15:00+02:00romain francoisSnippetRsnippet <p>This is a really simple code snippet that shows how to get the list of CRAN packages and their titles from the <a href="http://cran.r-project.org/web/packages/index.html">html page</a> html page (toulouse mirror in this example).</p>
<iframe src="http://romainfrancois.blog.free.fr/public/snippets/packages.html" width="500" height="200" frameborder="1"></iframe>
<p>...</p>
<iframe src="http://romainfrancois.blog.free.fr/public/snippets/packages-output.html" width="500" height="400" frameborder="1"></iframe>
<p>Note that R has the <a href="http://finzi.psych.upenn.edu/R/library/utils/html/update.packages.html">available.packages</a> function, but it does not give the titles of the packages</p>