Skip to content

Instantly share code, notes, and snippets.

@elinw
elinw / YRBS
Last active November 5, 2022 01:35 — forked from naomispence/YRBS
library(aws.s3)
Sys.setenv("AWS_ACCESS_KEY_ID" = "XXXX",
"AWS_SECRET_ACCESS_KEY" = "XXXX",
"AWS_DEFAULT_REGION" = "us-west-2")
s3load('nycyrbs.RData', bucket = 'XXXX')
nycyrbs <- subset(nycyrbs, select = c(q33, q34, q35, grade))
nycyrbs[nycyrbs==""]<-NA
skimr::skim(nycyrbs)
load("nycyrbs.RData")
nycyrbs1<-subset(nycyrbs, select = c(q33, q34, q35, grade))
#rm(nycyrbs)
nycyrbs[nycyrbs==""]<-NA
library(Hmisc)
library(descr)
label(nycyrbs$q34) <-"Vape Usage"
label(nycyrbs$q35) <-"Recent Vape Usage"
freq(nycyrbs$q34)
@calpolystat
calpolystat / #Sampling_Distribution.txt
Last active January 6, 2023 14:38
Sampling Distribution of Various Statistics: Shiny app at http://www.statistics.calpoly.edu/shiny
Sampling Distributions of Various Statistics Shiny App
Base R code created by Gail Potter
Shiny app files created by Gail Potter
Cal Poly Statistics Dept Shiny Series
http://statistics.calpoly.edu/shiny
<?php
/**
* @package Gris-Gris.Skeleton
* @subpackage Builder
*
* @copyright Copyright (C) 2014 Respective authors. All rights reserved.
* @license Licensed under the MIT License; see LICENSE.md
*/
namespace Grisgris\Builder;
<?php
// Load the builder class for the core.php file.
jimport('grisgris.builder.registry');
jimport('grisgris.builder.builder');
jimport('grisgris.builder.aggregate');
jimport('grisgris.builder.generic');
jimport('grisgris.builder.cache');
jimport('grisgris.builder.table');
jimport('grisgris.provider.provider');
@gauden
gauden / gapmind-r.R
Created March 18, 2012 19:15
Use data from Gapminder in R
# ------------------------------------------------------------------------------
# PREPARATION
# First download two files from Gapminder, where an extremely rich set of
# data sources are curated in the form of Excel spreadsheets:
# http://www.gapminder.org/data/
#
# I am here using the WHO alcohol consumption data from:
# http://spreadsheets.google.com/pub?key=0AgogXXPMARyldGJqTDRfNHBWODJMRWlZaVhNclhNZXc&output=xls
# And the World Bank GDP data from:
# http://spreadsheets.google.com/pub?key=0ArfEDsV3bBwCdHh3d1FPOVg1WXM3V2huRWc2cjM3TkE&output=xls