Skip to content

Instantly share code, notes, and snippets.

View byzheng's full-sized avatar

Bangyou Zheng byzheng

View GitHub Profile
@byzheng
byzheng / xlsxToR.r
Last active March 20, 2019 06:54 — forked from schaunwheeler/xlsxToR.r
Thanks @schaunwheeler codes to read xlsx files. I had remove all dependence and parse the xml files with text regular expression. It will be much faster to read large xlsx files.
#' Read xlsx files
#'
#' @param file The path to xlsx file
#' @param keep_sheets A vector of sheet name
#' @param header Whether include the head in the sheet
#' @param empty_row Whether to remove the empty rows
#' @export
xlsxToR <- function(file, keep_sheets = NULL, header = TRUE, empty_row = TRUE)
{
suppressWarnings(file.remove(tempdir()))
@byzheng
byzheng / leafletBug.R
Last active March 8, 2016 22:47 — forked from tiernanmartin/leafletBug.R
An example illustrating a possible bug in the Leaflet package
library(shiny)
library(shinydashboard)
library(leaflet)
header <- dashboardHeader(
title = "Example",
titleWidth = "600px"
)
sidebar <- dashboardSidebar(width = "600px")