This week is the first week of Python Open Lab in fall 2018. We talked about fundamental concepts about Python and basic types and operations in Python. We first looked at the basic concept of programming languages and introduced python and its usage. The installation of Python for windows users were included so students can […]

# Category: Workshops & Training

## R Open Lab Fall 2018 – Functions, environment, and apply

The topic of this week is functions, environment, and apply family in R. We first cover the method of defining your own function in R, then we bring in the concept of environment since they are relevant. At last, we go over the apply family. Recall that we learned loops as one of the basic […]

## Introduction to R package ‘survey’ (1)

If you are using R for survey data analysis, you might find the ‘survey’ package is useful for you. I assume that you have already known how to read/import data in R, so this blog will skip the steps of data cleaning and loading. After importing survey data in R, here are some functions you […]

## R Open Lab Fall 2018 – More Fundamentals

We reviewed a little bit about what is R and R Studio, how they work together and then continued the starter kit of R. First we talked about how to do calculation, commenting and assignment value to variables in R, then we also gave some tricky example to clarify those coding standards such as case […]

## R Open Lab Fall 2018 – Getting Started

This is the first R open lab of this semester. We focus on introducing basic concepts to the new users of R language. The file we used is called Starter Kit. Here is the link of the GitHub repository with all the scripts: https://github.com/wbh0912/R-Open-Lab-Fall-2018 If you have further question regarding topics covered in the material, please […]

## Python Open Labs: April 23, 2018

Today was the last Python Open Lab of the semester – congrats to all of the students who have made it this far and picked up skills in a new programming language! Over the course of the semester, we’ve been learning the basics of Python: how to initialize lists, create dictionaries, iterate through items, and define […]

## Spring 2018 R Open Lab: Advanced Visualization

Apr 18 Today we will explore the advanced data visualization in R. First, we will review the basic graphic functions in R and learn how to use additional parameters to achieve different goals. Then, we will introduce the powerful package ggplot2. Here are the codes: # Quick review of basic visualization library(ggplot2) plot(diamonds$carat, diamonds$price, main […]

## Spring 2018 R Open Lab: Apply Family

Apr 11 The topic of this week is the apply family in R. Recall that we learned loops as one of the basic concepts at the very beginning; you can review it from the Starter Kit and the Lab featuring More Fundamentals. Although loop is conceptually simple and intuitive, it is inefficient. The apply family […]

## Python Open Labs: April 9, 2018

We spent class today reviewing functions and how they work in Python. Students were given problem statements and were asked to write functions to return the correct output. We went over multiple problems, and I’ll step through one in this blog post today. Imagine that you are given two inputs in the form strings: Jewels […]

## Python Open Lab: Week 7

Due to the complex nature of functions, on April 1, we started with a review of functions with the following problem: We then introduced classes and methods: Classes: Python is an “object-oriented programming language.” This means that almost all the code is implemented using a special construct called classes. Programmers use classes to keep related things […]