Tag Archives: R Open Lab

Spring 2018 R Open Lab: Exploratory Data Analysis

Mar 28

This week ‘s topic is Exploratory Data Analysis in R. The goal of the lab is to give attendants some ideas about what they can learn when they first have a data set in their hands and the corresponding approaches. The lab started with introduction of data frame’s concept and how to create one in R. Then, we talked about different ways to import data into R. After that, we learned ways to explore features of a data frame using the data set “diamonds.csv”. With the information we learned, we started to manipulate the data frame into our desired form by reordering and subsetting. We ended this lab with 2 simple practices of what we learned so far.

Here is the link to the script for this open lab:

https://drive.google.com/file/d/12ejSGZspc5_rBjDfvbu61H3lGdmYjAyf/view?usp=sharing

Here is the data set we used for this lab:

https://drive.google.com/file/d/19crfzpYAS3T0ZXaVxkWQVgk8dFbboFdf/view?usp=sharing

Thank you all for showing up. If you have further questions regarding topics covered in the material, please feel free to drop by during next week’s lab or email me or leave a comment.

See you all next week!

Spring 2018 R Open Lab: Character Strings

Feb 28

For this week, the topic we discussed is character strings in R. This lab’s content is a steppingstone for text  analysis.  We started with introducing the concept of characters, character strings, and character string vectors in R. Then, we talked about operations on strings such as getting substring and combining different character strings.  Finally, we learned about extracting and replacing certain patterns within a text-form data set.

Here is the link to the script for this open lab:

https://drive.google.com/file/d/12Etf6qQtpJPymIYrGRqLiaxt8LchNBUB/view?usp=sharing

Here is a reference for regular expressions in R:

https://www.rstudio.com/wp-content/uploads/2016/09/RegExCheatsheet.pdf

Thank you all for showing up. If you have further question regarding topics covered in the material, please feel free to drop by during next week’s lab or email me or leave a comment.

See you all next week!

Spring 2018 R Open Lab: More Fundamentals

Last week, we walked through the R starter kit which introduced most of the useful basic concepts in R such as vectors, matrices, and loops. This week, we continued to talk about more basics in R and demonstrated examples. The goal of this lab is to get attendants a better understanding of how R language works so that they can transform their specific real-life problem into R algorithms smoothly.

Here is the link to the script for this open lab:

https://drive.google.com/file/d/1SePSSVF980EJfCxv4eZ4AQlCP7vlTbe7/view?usp=sharing

The script also has comments and explanations. You can open it with R studio and run it step by step.

Thank you all for showing up. If you have further question regarding topics covered in the material, please feel free to drop by during next week’s lab or email me or leave a comment. See you all next week!

R Open Lab – Merge and Filter Data

During the first 20-30 minutes of yesterday’s open lab, we talked about how to merge datasets and filter data using base R and dplyr package. The rest of the open lab were free discussions between participants and instructors.

Thank you to all who showed up!

Welcome to explore the materials I used for the open lab:

https://drive.google.com/open?id=0B4uO8w_uGtsCWjRId0p6QllKZlE

Enjoy the spring!

R Open Lab – ggplot

Data visualization is an integral part of data exploration and presentation. Yesterday, we talked about ggplot2, a package which provides a mature and consistent system for plotting in R.

We explored the advantage and disadvantages of ggplot2, the syntax and usage of the package.

As always, thank you to everyone who showed up.

Materials I used for the open lab can be found here.

https://drive.google.com/open?id=0B4uO8w_uGtsCMUVoLXl1Z0JsSlU

Enjoy spring! ❤️

R Open Labs – Apply Family

This Wednesday we talked about apply function family in base R. We covered apply(), tapply(), lapply(), sapply() and vapply(). We also briefly introduced the concept of factors in R.

As always, thank you to all who showed up! Next two weeks’ R Open Lab will be cancelled due to midterm week and spring break.

Good luck on your midterms and have a wonderful spring break! 😄

R Open Labs – readr Package

Today we introduced readr package. It is a package used for reading csv/xls/txt etc. data. It is designed to flexibly parse many types of data found in the wild, while still cleanly failing when data unexpectedly changes. 

We covered the functionality of the package and the difference between this package and base R.

Next week we will talk about apply family.

See you next Wednesday from 10 am – 12 pm at DSSC (Lehman Social Science Library Room 215)!

R Open Labs – Linear Regression

Thank you to all who showed up last week!

Last Wednesday we went over doing linear regression in R, including: how to fit and interpret linear models, evaluate model validity and select among competing models.

See you this Wednesday from 10 am – 12 pm at DSSC (Lehman Social Science Library Room 215)!

Materials I used for this open lab is posted here. https://drive.google.com/open?id=0B4uO8w_uGtsCQTJ6aUNFMUJpZVE

R Open Labs – Shiny

Hope you guys enjoyed the snow. ❄️

This Wednesday we talked about Shiny. We discussed why we use R Shiny and how to create a Shiny application. Thank you to all who showed up! Hoping to see you next Wednesday 02/15/2017 10:00-11:00 at DSSC. The R Open Lab for next week will be shorter than usual because we will be hosting an R workshop about Data Wrangling right after the open lab 12:00 pm -1:00 pm at the Science & Engineering Library!

Looking forward to seeing you guys! 😊