Skip to content

Instantly share code, notes, and snippets.

View SCgeeker's full-sized avatar

Sau-chin Chen SCgeeker

  • Tzu-Chi University
  • Hualien, Taiwan
  • 13:26 (UTC +08:00)
View GitHub Profile
@debruine
debruine / global_args.R
Last active February 24, 2021 04:10
Set the default values from a function to the global environment
#' Global Arguments
#'
#' Set the default values from a function to the global environment
#'
#' @param func the function to get arguments from
#' @param env the environment to out the arguments in
#'
#' @return NULL
#' @export
#'
@SCgeeker
SCgeeker / LAB_SEED_CR.R
Created June 27, 2019 01:40
Handy code for PSA 002 labratories. Generate Lab seed number and order sequence.
##install.packages("googlesheets")
# Load googlesheets package
library(tidyverse)
library(googlesheets)
library(randomizeR)
# Connect R and my google drive
gs_auth(new_user = TRUE)
# Export the sheet.
@RobertMyles
RobertMyles / Load-Multiple-R-Packages.R
Created July 8, 2016 19:19
Load multiple packages at the same time in R
# library() or require() only load one package at a time
# but...
Packages <- c("dplyr", "ggplot2", "rstan", "readr")
lapply(Packages, library, character.only = TRUE)
# this loads as many as you put in 'Packages'. They need to be installed first, of course.