I am trying to make a shinyapp that uses location and character data from a Google Sheet to generate a map.
library(shiny)
library(leaflet)
library(tidyverse)
library(googlesheets4)
library(shinyjs)
ORGANIZATION_SHEET_ID <- "###googlesheetsID###"
organization_data <- googlesheets4::read_sheet(ORGANIZATION_SHEET_ID,
col_types = c(
Name = "character",
Needs_Met = "character",
Address = "character",
Org_Structure = "character",
Contact = "character",
Submission_Date = "character",
Lon = "numerical",
Lat = "numerical",
Type = "character",
Hours = "character"
)
But it gives me this error:
Error in `googlesheets4::read_sheet()`:
! `col_types` must have length 1, not length 10.
Run `rlang::last_trace()` to see where the error occurred.
Even though the headers in the Google Sheet match the column names.