Learn R Programming

googlesheets (version 0.3.0)

gs_ws_rename: Rename a worksheet within a spreadsheet

Description

Give a worksheet a new title that does not duplicate the title of any existing worksheet within the spreadsheet.

Usage

gs_ws_rename(ss, from = 1, to, verbose = TRUE)

Arguments

ss

a registered Google spreadsheet, i.e. a googlesheet object

from

positive integer or character string specifying index or title, respectively, of the worksheet

to

character string for new title of worksheet

verbose

logical; do you want informative messages?

Value

a googlesheet object

Examples

Run this code
# NOT RUN {
gap_ss <- gs_copy(gs_gap(), to = "gap_copy")
gs_ws_ls(gap_ss)
gap_ss <- gs_ws_rename(gap_ss, from = "Oceania", to = "ANZ")
gs_ws_ls(gap_ss)
gap_ss <- gs_ws_rename(gap_ss, from = 1, to = "I am the first sheet!")
gs_ws_ls(gap_ss)
gs_delete(gap_ss)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab