10.2 Parsing HTML tables
html_table
gives a list of data frames, one for every HTML table in the page.
[[1]]
# A tibble: 25 × 13
`` Symbol Name `1D Chart` `Price (Intraday)` Change `Change %` Volume
<int> <chr> <chr> <lgl> <dbl> <dbl> <chr> <chr>
1 1 ATUS Altice … NA 3.11 0.2 +6.87% 4.387M
2 2 S SID Companh… NA 1.47 0.1 +7.30% 2.273M
3 3 K KOS Kosmos … NA 3.43 -0.02 -0.58% 15.44…
4 4 M MPLN MultiPl… NA 16.0 0.19 +1.20% 94,625
5 5 D DOLE Dole plc NA 13.5 -0.12 -0.88% 659,9…
6 6 A AVIR Atea Ph… NA 3.16 0.06 +1.94% 308,4…
7 7 L LAC Lithium… NA 3.15 -0.03 -0.94% 6.572M
8 8 SONO Sonos, … NA 13.9 -0.17 -1.21% 1.063M
9 9 VMEO Vimeo, … NA 6.52 0.15 +2.35% 884,8…
10 10 GPRO GoPro, … NA 1.04 -0.02 -1.89% 1.765M
# ℹ 15 more rows
# ℹ 5 more variables: `Avg Vol (3M)` <chr>, `Market Cap` <chr>,
# `P/E Ratio (TTM)` <dbl>, `52 Week Range` <lgl>, Follow <lgl>
The readHTMLTable
function is similar.
$`NULL`
Symbol Name 1D Chart
1 1 ATUS Altice USA, Inc.
2 2 S SID Companhia Siderúrgica Nacional
3 3 K KOS Kosmos Energy Ltd.
4 4 M MPLN MultiPlan Corporation
5 5 D DOLE Dole plc
6 6 A AVIR Atea Pharmaceuticals, Inc.
7 7 L LAC Lithium Americas Corp.
8 8 SONO Sonos, Inc.
9 9 VMEO Vimeo, Inc.
10 10 GPRO GoPro, Inc.
11 11 I INFN Infinera Corporation
12 12 P PBI Pitney Bowes Inc.
13 13 B BFLY Butterfly Network, Inc.
14 14 PLYA Playa Hotels & Resorts N.V.
15 15 A ABCL AbCellera Biologics Inc.
16 16 CHGG Chegg, Inc.
17 17 P PGRE Paramount Group, Inc.
18 18 B BMBL Bumble Inc.
19 19 N NOVA Sunnova Energy International Inc.
20 20 B BDN Brandywine Realty Trust
21 21 W WW WW International, Inc.
22 22 Y YQ 17 Education & Technology Group Inc.
23 23 S STEM Stem, Inc.
24 24 S SAND Sandstorm Gold Ltd.
25 25 BKD Brookdale Senior Living Inc.
Price (Intraday) Change Change % Volume Avg Vol (3M)
1 3.11 +0.20 +6.87% 4.387M 3.547M
2 1.47 +0.10 +7.30% 2.273M 2.523M
3 3.43 -0.02 -0.58% 15.449M 9.605M
4 16.01 +0.19 +1.20% 94,625 159,781
5 13.52 -0.12 -0.88% 659,931 516,725
6 3.16 +0.06 +1.94% 308,470 374,073
7 3.15 -0.03 -0.94% 6.572M 7.35M
8 13.93 -0.17 -1.21% 1.063M 1.924M
9 6.52 +0.15 +2.35% 884,806 1.678M
10 1.04 -0.02 -1.89% 1.765M 1.753M
11 6.61 -0.01 -0.15% 618,427 760,016
12 8.48 +0.24 +2.91% 2.156M 1.954M
13 3.90 -0.24 -5.80% 3.235M 3.693M
14 12.25 -0.11 -0.89% 603,212 1.256M
15 3.48 -0.04 -1.14% 4.429M 2.987M
16 1.47 0.00 0.00% 1.445M 3.744M
17 4.60 0.00 0.00% 754,982 1.006M
18 7.50 0.00 0.00% 1.478M 2.31M
19 3.24 +0.03 +0.93% 10.054M 11.287M
20 5.35 +0.04 +0.75% 2.281M 2.051M
21 1.15 +0.04 +3.60% 2.106M 4.021M
22 1.92 +0.12 +6.67% 10,047 23,141
23 0.78 +0.09 +13.07% 15.678M 13.012M
24 5.76 +0.01 +0.17% 6.659M 3.83M
25 4.92 0.00 0.00% 3.307M 1.888M
Market Cap P/E Ratio (TTM) 52 Week Range Follow
1 1.434B -7.24
2 1.949B -10.23
3 1.619B +8.65
4 258.901M -0.09
5 1.285B +9.60
6 266.903M -1.62
7 687.891M -23.81
8 1.696B -45.42
9 1.081B +33.64
10 160.951M -0.52
11 1.565B -13.91
12 1.541B -5.50
13 830.942M -5.80
14 1.489B +19.85
15 1.028B -4.79
16 153.331M -0.20
17 1.093B -5.20
18 1.173B -1.75
19 404.848M -1.02
20 926.524M -2.90
21 91.843M -0.16
22 14.92M -0.40
23 127.241M -0.07
24 1.71B +45.31
25 980.128M -5.89