Googling with R

This snippet is taken from Romain Francois blog.  It shows how to do a  Google site search using R.

As I mention before, this snippet does a site search using, For better or worse, I’m not sure how yet to make search using only Google. I only spent about 15 minutes playing around with this and didn’t really research how to do this. Anyway, I know you can make a super basic Google query URL by doing something like this:

Pretty much all you have to do is type q for query and separate each word with a plus sign. If you’re interested in Google’s search protocol I’ve added a link to their documentation to get you going. <- function( topic, engine = c("Google", "RGG") ){

engine <- match.arg( engine )
url <- URLencode( sprintf( "",
topic, engine ) )
browseURL( url )
} "Andrews plot" )

Additional Resources:

Google’s Search Protocol Reference


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s