Re: [R] access to webpage code

From: Henrique Dallazuanna <wwwhsd_at_gmail.com>
Date: Sun, 13 Jan 2008 13:37:40 -0200

Try this:

code <- readLines(site)

On 13/01/2008, John Lande <john.lande77_at_gmail.com> wrote:
> dear R user,
>
> I need a function that download the code of web page as html, to further
> parse it.
>
> something like
>
> >site="http://www.R-project.com"
> >code=function(site)
> >code
>
> !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <title>The R Project for Statistical Computing</title>
> <link rel="icon" href="favicon.ico" type="image/x-icon">
> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
> <link rel="stylesheet" type="text/css" href="R.css">
> </head>
>
> <FRAMESET cols="1*, 4*" border=0>
> <FRAMESET rows="120, 1*">
> <FRAME src="logo.html" name="logo" frameborder=0>
> <FRAME src="navbar.html" name="contents" frameborder=0>
> </FRAMESET>
> <FRAME src="main.shtml" name="banner" frameborder=0>
> <noframes>
> <h1>The R Project for Statistical Computing</h1>
>
> Your browser seems not to support frames,
> here is the contents page of the R Project's
> website.
>
> </noframes>
> </FRAMESET>
>
> is there any function that can perform similar task? thank you in advance.
>
> John
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Sun 13 Jan 2008 - 15:40:49 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 13 Jan 2008 - 17:30:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive