R/get_form_id.R

#' Extract Form Id From Form URL
#'
#' Extract Form Id From Form URL
#'
#' @param url Google Form URL
#' @export
#' @examples
#' \dontrun{
#' url %>% get_form_id() -> id
#' }
get_form_id <- function (url) {
    strsplit(gsub("https://docs.google.com/forms/d/", "", url),  "/")[[1]][1]
}

Try the googleformr package in your browser

Any scripts or data that you put into this service are public.

googleformr documentation built on May 2, 2019, 11:10 a.m.