88[ ![ lifecycle] ( https://img.shields.io/badge/lifecycle-experimental-orange.svg )] ( https://www.tidyverse.org/lifecycle/#experimental )
99[ ![ CRAN
1010status] ( https://www.r-pkg.org/badges/version/googlesheets4 )] ( https://CRAN.R-project.org/package=googlesheets4 )
11- [ ![ Travis build
12- status] ( https://travis-ci.org/tidyverse/googlesheets4.svg?branch=master )] ( https://travis-ci.org/tidyverse/googlesheets4 )
13- [ ![ AppVeyor build
14- status] ( https://ci.appveyor.com/api/projects/status/github/tidyverse/googlesheets4?branch=master&svg=true )] ( https://ci.appveyor.com/project/tidyverse/googlesheets4 )
15- [ ![ Coverage
16- status] ( https://codecov.io/gh/tidyverse/googlesheets4/branch/master/graph/badge.svg )] ( https://codecov.io/github/tidyverse/googlesheets4?branch=master )
1711<!-- badges: end -->
1812
1913googlesheets4 provides an R interface to [ Google
@@ -79,13 +73,13 @@ sheets_example("chicken-sheet") %>%
7973# > Reading from 'chicken-sheet'
8074# >
8175# > # A tibble: 5 x 4
82- # > chicken breed sex motto
83- # > <chr> <chr> <chr> <chr>
84- # > 1 Foghorn Leghorn Leghorn roost… That's a joke, ah say, that's a jo …
85- # > 2 Chicken Little unknown hen The sky is falling!
86- # > 3 Ginger Rhode Islan … hen Listen. We'll either die free chic …
87- # > 4 Camilla the Chic … Chantecler hen Bawk, buck, ba-gawk.
88- # > 5 Ernie The Giant … Brahma roost… Put Captain Solo in the cargo hold.
76+ # > chicken breed sex motto
77+ # > <chr> <chr> <chr> <chr>
78+ # > 1 Foghorn Leghorn Leghorn roost… That's a joke, ah say, that's a joke, …
79+ # > 2 Chicken Little unknown hen The sky is falling!
80+ # > 3 Ginger Rhode Island … hen Listen. We'll either die free chicken …
81+ # > 4 Camilla the Chick … Chantecler hen Bawk, buck, ba-gawk.
82+ # > 5 Ernie The Giant C … Brahma roost… Put Captain Solo in the cargo hold.
8983```
9084
9185Read specific cells, from a specific sheet, using an A1-style notation:
@@ -96,19 +90,18 @@ sheets_example("deaths") %>%
9690# > Reading from 'deaths'
9791# > Range "'arts'!A5:F15"
9892# > # A tibble: 10 x 6
99- # > Name Profession Age `Has kids` `Date of birth`
100- # > <chr> <chr> <dbl> <lgl> <dttm>
101- # > 1 Davi… musician 69 TRUE 1947-01-08 00:00:00
102- # > 2 Carr… actor 60 TRUE 1956-10-21 00:00:00
103- # > 3 Chuc… musician 90 TRUE 1926-10-18 00:00:00
104- # > 4 Bill… actor 61 TRUE 1955-05-17 00:00:00
105- # > 5 Prin… musician 57 TRUE 1958-06-07 00:00:00
106- # > 6 Alan… actor 69 FALSE 1946-02-21 00:00:00
107- # > 7 Flor… actor 82 TRUE 1934-02-14 00:00:00
108- # > 8 Harp… author 89 FALSE 1926-04-28 00:00:00
109- # > 9 Zsa … actor 99 TRUE 1917-02-06 00:00:00
110- # > 10 Geor… musician 53 FALSE 1963-06-25 00:00:00
111- # > # … with 1 more variable: `Date of death` <dttm>
93+ # > Name Profession Age `Has kids` `Date of birth` `Date of death`
94+ # > <chr> <chr> <dbl> <lgl> <dttm> <dttm>
95+ # > 1 David Bo… musician 69 TRUE 1947-01-08 00:00:00 2016-01-10 00:00:00
96+ # > 2 Carrie F… actor 60 TRUE 1956-10-21 00:00:00 2016-12-27 00:00:00
97+ # > 3 Chuck Be… musician 90 TRUE 1926-10-18 00:00:00 2017-03-18 00:00:00
98+ # > 4 Bill Pax… actor 61 TRUE 1955-05-17 00:00:00 2017-02-25 00:00:00
99+ # > 5 Prince musician 57 TRUE 1958-06-07 00:00:00 2016-04-21 00:00:00
100+ # > 6 Alan Ric… actor 69 FALSE 1946-02-21 00:00:00 2016-01-14 00:00:00
101+ # > 7 Florence… actor 82 TRUE 1934-02-14 00:00:00 2016-11-24 00:00:00
102+ # > 8 Harper L… author 89 FALSE 1926-04-28 00:00:00 2016-02-19 00:00:00
103+ # > 9 Zsa Zsa … actor 99 TRUE 1917-02-06 00:00:00 2016-12-18 00:00:00
104+ # > 10 George M… musician 53 FALSE 1963-06-25 00:00:00 2016-12-25 00:00:00
112105```
113106
114107Read from a named range or region and specify (some of the ) column
@@ -120,18 +113,18 @@ sheets_example("deaths") %>%
120113# > Reading from 'deaths'
121114# > Range "arts_data"
122115# > # A tibble: 10 x 6
123- # > Name Profession Age `Has kids` `Date of birth` `Date of death`
124- # > <chr> <chr> <int> <lgl> <date> <date>
125- # > 1 David Bowie musician 69 TRUE 1947-01-08 2016-01-10
126- # > 2 Carrie Fish… actor 60 TRUE 1956-10-21 2016-12-27
127- # > 3 Chuck Berry musician 90 TRUE 1926-10-18 2017-03-18
128- # > 4 Bill Paxton actor 61 TRUE 1955-05-17 2017-02-25
129- # > 5 Prince musician 57 TRUE 1958-06-07 2016-04-21
130- # > 6 Alan Rickman actor 69 FALSE 1946-02-21 2016-01-14
131- # > 7 Florence He … actor 82 TRUE 1934-02-14 2016-11-24
132- # > 8 Harper Lee author 89 FALSE 1926-04-28 2016-02-19
133- # > 9 Zsa Zsa Gáb… actor 99 TRUE 1917-02-06 2016-12-18
134- # > 10 George Mich… musician 53 FALSE 1963-06-25 2016-12-25
116+ # > Name Profession Age `Has kids` `Date of birth` `Date of death`
117+ # > <chr> <chr> <int> <lgl> <date> <date>
118+ # > 1 David Bowie musician 69 TRUE 1947-01-08 2016-01-10
119+ # > 2 Carrie Fisher actor 60 TRUE 1956-10-21 2016-12-27
120+ # > 3 Chuck Berry musician 90 TRUE 1926-10-18 2017-03-18
121+ # > 4 Bill Paxton actor 61 TRUE 1955-05-17 2017-02-25
122+ # > 5 Prince musician 57 TRUE 1958-06-07 2016-04-21
123+ # > 6 Alan Rickman actor 69 FALSE 1946-02-21 2016-01-14
124+ # > 7 Florence Henders … actor 82 TRUE 1934-02-14 2016-11-24
125+ # > 8 Harper Lee author 89 FALSE 1926-04-28 2016-02-19
126+ # > 9 Zsa Zsa Gábor actor 99 TRUE 1917-02-06 2016-12-18
127+ # > 10 George Michael musician 53 FALSE 1963-06-25 2016-12-25
135128```
136129
137130There are various ways to specify the target Sheet. The simplest, but
@@ -144,13 +137,13 @@ read_sheet(url)
144137# > Reading from 'chicken-sheet'
145138# >
146139# > # A tibble: 5 x 4
147- # > chicken breed sex motto
148- # > <chr> <chr> <chr> <chr>
149- # > 1 Foghorn Leghorn Leghorn roost… That's a joke, ah say, that's a jo …
150- # > 2 Chicken Little unknown hen The sky is falling!
151- # > 3 Ginger Rhode Islan … hen Listen. We'll either die free chic …
152- # > 4 Camilla the Chic … Chantecler hen Bawk, buck, ba-gawk.
153- # > 5 Ernie The Giant … Brahma roost… Put Captain Solo in the cargo hold.
140+ # > chicken breed sex motto
141+ # > <chr> <chr> <chr> <chr>
142+ # > 1 Foghorn Leghorn Leghorn roost… That's a joke, ah say, that's a joke, …
143+ # > 2 Chicken Little unknown hen The sky is falling!
144+ # > 3 Ginger Rhode Island … hen Listen. We'll either die free chicken …
145+ # > 4 Camilla the Chick … Chantecler hen Bawk, buck, ba-gawk.
146+ # > 5 Ernie The Giant C … Brahma roost… Put Captain Solo in the cargo hold.
154147```
155148
156149For more information, see the package website:
0 commit comments