Programming in R

A brief introduction

Alex Pacheco
Research Computing

History

  • R is a dialect of the S language
    • S was initiated at the Bell Labs as an internal statistical analysis environment.
    • Most well known implementation is S‐plus (most recent stable release was in 2010)
  • R was first announced in 1993.
  • The R core group was formed in 1997, who controls the source code of R (written in C)
  • R 1.0.0 was released in 2000
  • The current version is 3.5.0 (released on April 23, 2018)
    • Previous version 3.4.4 was released on March 15, 2018

Features

  • R is a dialect of the S language
    • Language designed for statistical analysis
    • Similar syntax
  • Available on most platform/OS
  • Rich data analysis functionalities and sophisticated graphical capabilities
  • Active development and very active community
    • CRAN: The Comprehensive R Archive Network
  • Source code and binaries, user contributed packages and documentation
    • More than 10,000 packages available on CRAN
  • Free to use

Alternatives to R

  • S-PLUS: commercial verison of S
  • Gretl: open-source statistical package, mainly for econometrics
  • SPSS: widely used program for statistical analysis in social science
  • PSPP: free alternative to SPSS
  • SAS: proprietary software that can be used with very large datasets such as census data
  • STATA: proprietary software that is often used in economics and epidemiology
  • MATLAB: proprietary software used widely in the mathematical sciences and engineering
  • GNU Octave: free alternative to MATLAB
  • Python: general programming language

Installing R

Running R

  • From Command Line on *NIX
    • Enter R on the command line (if you have modified your PATH correctly)
  • Batch Mode on *NIX
    • Use the Rscript filename.R command to execute commands from a file, filename.R
cat hello.R
## print("Hello World!")
Rscript hello.R
## [1] "Hello World!"

RStudio

  • RStudio is the most popular (de facto) environment for running R on all platforms.
  • free and open source IDE for R. Can be installed on Windows, Mac OSX and Linux.
  • user interface comparable to other IDEs or software such as MATLAB.
  • more suited for development
  • Version 1.1.383 available on LUApps at https://luapps.lehigh.edu

RStudio

Anaconda Python Distribution

  • Anaconda Python distribution is the most popular platform for Python
  • It provides
    • a convenient install procedure for over 1400 Data Science libraries for Python and R
    • conda to manage your packages, dependencies, and environments
    • anaconda navigator: a desktop portal to install and launch applications and editors including Jupyter, RStudio, Visual Studio Code, and Spyder
      • install r-essentials from anaconda navigator or conda install r-essentials from the command line
  • Jupyter Notebooks is an alternative to RStudio for writing scripts and workflows that you can share with others.
    • It is ideal for reproducible research or data reporting
  • Visit https://go.lehigh.edu/linux to use R, Anaconda and other Linux software installed and maintained by the Research Computing group on your local Linux laptop or workstation
  • Click here for instructions to run Jupyter Notebooks on Sol

Get Started with R

  • Use the console to use R as a simple calculator
1 + 2
## [1] 3
  • The assignment symbol is "<-". The classical "=" symbol can also be used
a=2+3
b<-10/a
a
## [1] 5
b
## [1] 2

Get Started with R

  • install packages from CRAN, for e.g. knitr
install.packages('knitr')
  • load a library, for e.g. knitr
library(knitr)
  • Help from command line
?<command name>
??<part of command name/topic>
  • or search in the help page in RStudio

  • getwd(): display current working directory

  • setwd('dir'): change current working director to dir

Data Classes

  • R has five atomic classes
  • Numeric
    • Double is equivalent to numeric.
    • Numbers in R are treated as numeric unless specified otherwise.
  • Integer
  • Complex
  • Character
  • Logical
    • TRUE or FALSE
  • You can convert data from one type to the other using the as.<Type> functions
  • To check the class of an object, use the is.<Type> function.

Example

a <- 3
b <- sqrt(a)
b
## [1] 1.732051
c <- 2i
d <- TRUE
d
## [1] TRUE
as.numeric(d); as.character(b); is.complex(c)
## [1] 1
## [1] "1.73205080756888"
## [1] TRUE

Data Objects‐ Vectors

  • Vectors can only contain elements of the same class
  • Vectors can be constructed by
    • Using the c() function (concatenate)
  • Coercion will occur when mixed objects are passed to the c() function, as if the as.<Type>() function is explicitly called
    • Using the vector() function
  • One can use [index] to access individual element
    • Indices start from 1

Examples

# "#" indicates comment
# "<-" performs assignment operation (you can use "=" as well, but "<-" is preferred)
# numeric (double is the same as numeric)
d <- c(1,2,3)
# character
d <- c("1","2","3")
# you can covert at object with as.TYPE
# as. numeric changes the character vector created above to numeric
as.numeric(d)
## [1] 1 2 3
# The conversion doesn't always work though
as.numeric("a")
## Warning: NAs introduced by coercion
## [1] NA

Examples (contd)

x <- c(0.5, 0.6) ## numeric
x <- c(TRUE, FALSE) ## logical
x <- c(T, F) ## logical
x <- c("a", "b", "c") ## character
# The ":" operator can be used to generate integer sequences
x <- 9:29 ## integer
x <- c(1+0i, 2+4i) ## complex
x <- vector("numeric", length = 10)
# Coercion will occur when objects of different classes are mixed
y <- c(1.7, "a") ## character
y <- c(TRUE, 2) ## numeric
y <- c("a", TRUE) ## character
# Can also coerce explicitly
x <- 0:6
class(x)
## [1] "integer"
as.logical(x)
## [1] FALSE  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE

Vectorized Operations

  • Lots of R operations process objects in a vectorized way
    • more efficient, concise, and easier to read.
x <- 1:4; y <- 6:9
x + y
## [1]  7  9 11 13
x > 2
## [1] FALSE FALSE  TRUE  TRUE
x * y
## [1]  6 14 24 36
print( x[x >= 3] )
## [1] 3 4

Data Objects - Matrices

  • Matrices are vectors with a dimension attribute
  • R matrices can be constructed
    • Using the matrix() function
      • Passing an dim attribute to a vector
      • Using the cbind() or rbind() functions
  • R matrices are constructed column‐wise
  • One can use [<index>,<index>] to access individual element

Example

# Create a matrix using the matrix() function
m <- matrix(1:6, nrow = 2, ncol = 3)
m
##      [,1] [,2] [,3]
## [1,]    1    3    5
## [2,]    2    4    6
dim(m)
## [1] 2 3
attributes(m)
## $dim
## [1] 2 3

Example

# Pass a dim attribute to a vector
m <- 1:10
m
##  [1]  1  2  3  4  5  6  7  8  9 10
dim(m) <- c(2, 5)
m
##      [,1] [,2] [,3] [,4] [,5]
## [1,]    1    3    5    7    9
## [2,]    2    4    6    8   10

Example

# Row binding and column binding
x <- 1:3
y <- 10:12
cbind(x, y)
##      x  y
## [1,] 1 10
## [2,] 2 11
## [3,] 3 12
rbind(x, y)
##   [,1] [,2] [,3]
## x    1    2    3
## y   10   11   12

Example

# Slicing
m
##      [,1] [,2] [,3] [,4] [,5]
## [1,]    1    3    5    7    9
## [2,]    2    4    6    8   10
# element at 2nd row, 3rd column
m[2,3]
## [1] 6
# entire i<sup>th</sup> row of m
m[2,]
## [1]  2  4  6  8 10
# entire j<sup>th</sup> column of m
m[,3]
## [1] 5 6

Data Objects - Lists

  • Lists are a special kind of vector that contains objects of different classes
  • Lists can be constructed by using the list() function
  • Lists can be indexed using [[ ]]
# Use the list() function to construct a list
x <- list(1, "a", TRUE, 1 + 4i)
x
## [[1]]
## [1] 1
## 
## [[2]]
## [1] "a"
## 
## [[3]]
## [1] TRUE
## 
## [[4]]
## [1] 1+4i

Data Objects - Data Frames

  • Data frames are used to store tabular data
    • They are a special type of list where every element of the list has to have the same length
    • Each element of the list can be thought of as a column
    • Data frames can store different classes of objects in each column
    • Data frames also have a special attribute called row.names
    • Data frames are usually created by calling read.table() or read.csv()
      • More on this later
    • Can be converted to a matrix by calling data.matrix()

Names

  • R objects can have names
# Each element in a vector can have a name
x <- 1:3
names(x)
## NULL
names(x) <- c("a","b","c")
names(x)
## [1] "a" "b" "c"
x
## a b c 
## 1 2 3

Names (contd)

# Lists
x <- list(a = 1, b = 2, c = 3)
x
## $a
## [1] 1
## 
## $b
## [1] 2
## 
## $c
## [1] 3
# Names can be used to refer to individual element
x$a
## [1] 1

Names (contd)

# Columns and rows of matrices
m <- matrix(1:4, nrow = 2, ncol = 2)
dimnames(m) <- list(c("a", "b"), c("c", "d"))
m
##   c d
## a 1 3
## b 2 4

Querying Object Attributes

  • The class() function
  • The str() function
  • The attributes() function reveals attributes of an object (does not work with vectors)
    • Class
    • Names
    • Dimensions
    • Length
    • User defined attributes
  • They work on all objects (including functions)

Example

m <- matrix(1:10, nrow = 2, ncol = 5)
str(matrix)
## function (data = NA, nrow = 1, ncol = 1, byrow = FALSE, dimnames = NULL)
str(m)
##  int [1:2, 1:5] 1 2 3 4 5 6 7 8 9 10
str(str)
## function (object, ...)

Data Class - Factors

  • Factors are used to represent categorical data.
  • Factors can be unordered or ordered.
  • Factors are treated specially by modelling functions like lm() and glm()
# Use the factor() function to construct a vector of factors
# The order of levels can be set by the levels keyword
x <- factor(c("yes", "yes", "no", "yes", "no"), levels = c("yes", "no"))
x
## [1] yes yes no  yes no 
## Levels: yes no

Date and Time

  • R has a Date class for date data while times are represented by POSIX formats
  • One can convert a text string to date using the as.Date() function
  • The strptime() function can deal with dates and times in different formats.
  • The package "lubridate" provides many additional and convenient features
# Dates are stored internally as the number of days since 1970-01-01
x <- as.Date("1970-01-01")
x
## [1] "1970-01-01"
as.numeric(x)
## [1] 0
x+1
## [1] "1970-01-02"

Data and Time (contd)

# Times are stored internally as the number of seconds since 1970-01-01
x <- Sys.time() ; x
## [1] "2019-06-28 11:51:39 EDT"
as.numeric(x)
## [1] 1561737099
p <- as.POSIXlt(x)
names(unclass(p))
##  [1] "sec"    "min"    "hour"   "mday"   "mon"    "year"   "wday"  
##  [8] "yday"   "isdst"  "zone"   "gmtoff"
p$sec
## [1] 39.241

Missing Values

  • Missing values are denoted by NA or NaN for undefined mathematical operations.
    • is.na() is used to test objects if they are NA
    • is.nan() is used to test for NaN
    • NA values have a class also, so there are integer NA, character NA, etc.
    • A NaN value is also NA but the converse is not true
x <- c(1,2, NA, 10,3)
is.na(x)
## [1] FALSE FALSE  TRUE FALSE FALSE
is.nan(x)
## [1] FALSE FALSE FALSE FALSE FALSE

Missing Values (contd)

x <- c(1,2, NaN, NA,4)
is.na(x)
## [1] FALSE FALSE  TRUE  TRUE FALSE
is.nan(x)
## [1] FALSE FALSE  TRUE FALSE FALSE

Arithmetic Functions

FunctionDescription
exp() Exponentiation
log() Natural Logarithm
log10() Logarithm to base 10
sqrt() square root
abs() absolute value
sin() sine
cos() cosine
floor()
ceiling() rounding of numbers
round()

Simple Statistic Functions

FunctionDescription
min()minimum value
max()maximum value
which.min()location of minimum
which.max()location of maximum
pmin()elementwise minima of several vectors
pmax()elementwise maxima of several vectors
sum()sum of elements of a vector
mean()mean of elements of a vector
prod()products of elements of a vector

Distributions and Random Variables

  • For each distribution R provides four functions: density (d), cumulative density (p), quantile (q), and random generation (r)
    • The function name is of the form [d|p|q|r]<name of distribution>
    • e.g. qbinom() gives the quantile of a binomial distribution
DistributionDistribution name in R
Uniformunif
Binomialbinom
Poissonpois
Geometricgeom
Gammagamma
Normalnorm
Log Normallnorm
Exponentialexp
Student’s tt

Examples: Distributions and Random Variables

# Random generation from a uniform distribution.
runif(10, 2, 4)
##  [1] 3.916864 3.479611 3.478209 2.797747 3.262741 3.780256 2.140962
##  [8] 3.039850 3.525697 3.797439
# You can name the arguments in the function call.
runif(10, min = 2, max = 4)
##  [1] 2.843526 2.361906 2.322919 2.327150 2.545540 3.065703 2.637677
##  [8] 2.113549 3.257024 2.765928
# Given p value and degree of freedom, find the t-value.
qt(p=0.975, df = 8)
## [1] 2.306004
# The inverse of the above function call
pt(2.306, df = 8)
## [1] 0.9749998

User Defined Functions

  • Similar to other languages, functions in R are defined by using the function() directives
  • The return value is the last expression in the function body to be evaluated.
  • Functions can be nested
  • Functions are R objects
    • For example, they can be passed as an argument to other functions
newDef <- function(a,b)
 {
     x = runif(10,a,b)
     mean(x)
 }
newDef(-1,1)
## [1] 0.2491381

Control Structures

  • Control structures allow one to control the flow of execution.
if … elsetesting a condition
forexecuting a loop (with fixed number of iterations)
whileexecuting a loop when a condition is true
repeatexecuting an infinite loop
breakbreaking the execution of a loop
nextskipping to next iteration
returnexit a function

Testing conditions

# Comparisons: <,<=,>,>=,==,!=
# Logical operations: !, &&, ||
if(x > 3 && x < 5) {
  print ("x is between 3 and 5")
} else if(x <= 3) {
  print ("x is less or equal to 3")
} else {
  print ("x is greater or equal to 5")
}

For Loops

x <- c("a", "b", "c", "d")
# These loops have the same effect
# Loop through the indices
for(i in 1:4) {
  print(x[i])
}
## [1] "a"
## [1] "b"
## [1] "c"
## [1] "d"
# Loop using the seq_along() function
for(i in seq_along(x)) {
  print(x[i])
}
## [1] "a"
## [1] "b"
## [1] "c"
## [1] "d"

For Loops (contd)

# Loop through the name
for(letter in x) {
  print(letter)
}
## [1] "a"
## [1] "b"
## [1] "c"
## [1] "d"
for(i in 1:4) print(x[i])
## [1] "a"
## [1] "b"
## [1] "c"
## [1] "d"

while loops

  • The while loop can be used to repeat a set of instructions
  • It is often used when you do not know in advance how often the instructions will be executed.
  • The basic format for a while loop is while(cond) expr
sum <- 1
while ( sum < 11 )
{
  sum <- sum + 2;
  print(sum);
}
## [1] 3
## [1] 5
## [1] 7
## [1] 9
## [1] 11
sum <- 12
while (sum < 11 ) 
{
  sum <- sum + 2;
  print(sum);
}

repeat loops

  • The repeat loop is similar to the while loop.
  • The difference is that it will always begin the loop the first time. The while loop will only start the loop if the condition is true the first time it is evaluated.
  • Another difference is that you have to explicitly specify when to stop the loop using the break command.
sum <- 1
repeat
{
  sum <- sum + 2;
  print(sum);
  if (sum > 11)
    break;
}
## [1] 3
## [1] 5
## [1] 7
## [1] 9
## [1] 11
## [1] 13
sum <- 12
repeat
{
  sum <- sum + 2;
  print(sum);
  if (sum > 11)
    break;
}
## [1] 14

break and next statements

  • The break statement is used to stop the execution of the current loop.
    • It will break out of the current loop.
  • The next statement is used to skip the statements that follow and restart the current loop.
    • If a for loop is used then the next statement will update the loop variable.
x <- rnorm(5)
for(lupe in x)
 {
     if (lupe > 2.0)
         next

     if( (lupe<0.6) && (lupe > 0.5))
        break

    cat("The value of lupe is ",lupe,"\n");
 }
## The value of lupe is  -1.613799 
## The value of lupe is  -0.245662 
## The value of lupe is  -0.756709 
## The value of lupe is  -0.3906685 
## The value of lupe is  0.304653

The apply Function

  • The apply() function evaluate a function over the margins of an array
    • More concise than the for loops (not necessarily faster)
# X: array objects
# MARGIN: a vector giving the subscripts which the function will be applied over
# FUN: a function to be applied
str(apply)
## function (X, MARGIN, FUN, ...)
x <- matrix(rnorm(200), 20, 10)
# Row means
apply(x, 1, mean)
##  [1]  0.105284758 -0.547839904 -0.006042115  0.006990364 -0.052279347
##  [6]  0.762414286 -0.310173357  0.469239193 -0.157112108  0.623160416
## [11] -0.120917410 -0.008236342  0.301077236 -0.099175667  0.350147131
## [16] -0.196845153  0.476606109  0.244559332 -0.298884989  0.396900728

The apply Function (contd)

# Column sums
apply(x, 2, sum)
##  [1]  3.78591243 -1.31776440 -7.70247824  6.61153743 11.62866203
##  [6]  0.07050581 -3.62419206  6.11508356  5.07354178 -1.25207674
# 25th and 75th Quantiles for rows
apply(x, 1, quantile, probs = c(0.25, 0.75))
##           [,1]       [,2]       [,3]       [,4]       [,5]       [,6]
## 25% -0.6807435 -1.8368053 -0.4507926 -0.3938400 -0.7890905 -0.2451055
## 75%  1.2454631  0.9653446  0.7507690  0.4874695  0.9047425  1.3925322
##           [,7]       [,8]       [,9]      [,10]      [,11]      [,12]
## 25% -1.2497502 -0.3328754 -0.7400952 -0.4908325 -0.4404739 -0.7955561
## 75%  0.5810956  1.4608103  0.3797403  1.4744898  0.1085194  0.1486289
##          [,13]      [,14]      [,15]      [,16]      [,17]      [,18]
## 25% -0.4210659 -0.5224930 -0.4249143 -0.3661420 -0.4012379 -0.1791038
## 75%  0.8129981  0.8372162  0.9356285  0.4550468  1.4235447  0.5326436
##          [,19]      [,20]
## 25% -0.7053883 -0.2262357
## 75%  0.1295247  0.7913577

The apply Function (contd)

dim(x)
## [1] 20 10
# Change the dimensions of x
dim(x) <- c(2,2,50)
# Take average over the first two dimensions
apply(x, c(1, 2), mean)
##           [,1]        [,2]
## [1,] 0.1347153 -0.07717415
## [2,] 0.1966237  0.13360976
rowMeans(x, dims = 2)
##           [,1]        [,2]
## [1,] 0.1347153 -0.07717415
## [2,] 0.1966237  0.13360976

Other Apply Functions

  • lapply: Loop over a list and evaluate a function on each element
  • sapply: Same as lapply but try to simplify the result
  • tapply: Apply a function over subsets of a vector
  • mapply: Multivariate version of lapply

R for Data Science

  • The tidyverse is a collection of R packages developed by RStudio’s chief scientist Hadley Wickham.
    • ggplot2 for data visualisation.
    • dplyr for data manipulation.
    • tidyr for data tidying.
    • readr for data import.
    • purrr for functional programming.
    • tibble for tibbles, a modern re-imagining of data frames.
  • These packages work well together as part of larger data analysis pipeline.
  • To learn more about these tools and how they work together, read R for Data Science.

Tidyverse

  • What is Tidy Data?
    • "Tidy data" is a term that describes a standardized approach to structuring datasets to make analyses and visualizations easier.
  • The core tidy data principles
    • Variable make up the columns
    • Observations make up the rows
    • Values go into cells
  • library(tidyverse) will load the core tidyverse packages:
library(tidyverse)
## ── Attaching packages ────────────────────────────────── tidyverse 1.2.1 ──
## ✔ ggplot2 3.1.0       ✔ purrr   0.3.0  
## ✔ tibble  2.0.1       ✔ dplyr   0.8.0.1
## ✔ tidyr   0.8.0       ✔ stringr 1.4.0  
## ✔ readr   1.1.1       ✔ forcats 0.4.0
## ── Conflicts ───────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
library(lubridate)
## Loading required package: methods
## 
## Attaching package: 'lubridate'
## The following object is masked from 'package:base':
## 
##     date

Tidyverse

tidydata

Tidyverse

  • Packages that are part of tidyverse but not loaded automatically
    • lubridate for dates and date-times
    • magrittr provides the pipe, %>% used throughout the tidyverse.
    • readxl for .xls and .xlsx sheets.
    • haven for SPSS, Stata, and SAS data.
  • packages that are not in the tidyverse, but are tidyverse-adjacent. They are very useful for importing data from other sources:
    • jsonlite for JSON.
    • xml2 for XML.
    • httr for web APIs.
    • rvest for web scraping.
    • DBI for relational databases

Readr Package

  • readr is to provide a fast and friendly way to read rectangular data (like csv, tsv, and fwf).
  • readr supports seven file formats with seven read_ functions:
    • read_csv(): comma separated (CSV) files
    • read_csv2(): semicolon separated file and "," for decimal point
    • read_tsv(): tab separated files
    • read_delim(): general delimited files
    • read_fwf(): fixed width files
    • read_table(): tabular files where colums are separated by white-space.
    • read_log(): web log files
  • Usage
    • read_delim(file,delim)
      • file: path to a file, a connection, or literal data

Example

# read daily usage report for Sol in AY 2016-17
# usage is reported in terms of SUs used and jobs submitted for
#  serial (1 cpu), single or smp ( > 1 cpu but max of 1 node) and 
#  parallel or multi node (> 1 node)  jobs 
#daily <- read_delim('http://webapps.lehigh.edu/hpc/training/soldaily1617-public.csv',delim=";", trim_ws = TRUE)
daily <- read_delim('http://webapps.lehigh.edu/hpc/training/soldaily1718-public.csv',delim=";", trim_ws = TRUE)
## Parsed with column specification:
## cols(
##   Type = col_character(),
##   Name = col_character(),
##   Department = col_character(),
##   PI = col_character(),
##   PIDept = col_character(),
##   Status = col_character(),
##   Day = col_date(format = ""),
##   SerialJ = col_integer(),
##   Serial = col_double(),
##   SingleJ = col_integer(),
##   Single = col_double(),
##   MultiJ = col_integer(),
##   Multi = col_double(),
##   TotalJ = col_integer(),
##   Total = col_double()
## )
  • the readr functions will just work: you supply the path to a file and you get a tibble back

Tibble

  • A tibble, or tbl_df, is a modern reimagining of the data.frame,
    • keeping what time has proven to be effective, and
    • throwing out what is not.
  • Tibbles are data.frames that are lazy and surly

  • Create a tibble from an existing object with as_tibble()

  • create a new tibble from column vectors with tibble()

tibble(x = 1:5, y = 1, z = x ^ 2 + y)
## # A tibble: 5 x 3
##       x     y     z
##   <int> <dbl> <dbl>
## 1     1     1     2
## 2     2     1     5
## 3     3     1    10
## 4     4     1    17
## 5     5     1    26

Tibble (contd)

  • define a tibble row-by-row with tribble():
tribble(
  ~x, ~y,  ~z,
  "a", 2,  3.6,
  "b", 1,  8.5
)
## # A tibble: 2 x 3
##   x         y     z
##   <chr> <dbl> <dbl>
## 1 a         2   3.6
## 2 b         1   8.5

Dplyr

  • dplyr is a grammar of data manipulation, providing a consistent set of verbs to solve the most common data manipulation challenges:
  • filter() picks cases based on their values.

    filter

  • select() picks variables based on their names.

    filter

Dplyr

  • mutate() adds new variables that are functions of existing variables

    filter

  • summarise() reduces multiple values down to a single summary.

    filter

Dplyr

  • arrange() changes the ordering of the rows.
  • These all combine naturally with group_by() which allows you to perform any operation "by group"

Example

daily %>% head
## # A tibble: 6 x 15
##   Type  Name  Department PI    PIDept Status Day        SerialJ Serial
##   <chr> <chr> <chr>      <chr> <chr>  <chr>  <date>       <int>  <dbl>
## 1 User  user… EN/Mechan… pi001 Mecha… Gradu… 2017-10-01       0      0
## 2 User  user… Mechanica… pi001 Mecha… Guest  2017-10-01       0      0
## 3 User  user… EN/Mechan… pi001 Mecha… Gradu… 2017-10-01       0      0
## 4 User  user… EN/Mechan… pi001 Mecha… Gradu… 2017-10-01       0      0
## 5 User  user… EN/Mechan… pi001 Mecha… Gradu… 2017-10-01       0      0
## 6 User  user… EN/Mechan… pi001 Mecha… Gradu… 2017-10-01       0      0
## # … with 6 more variables: SingleJ <int>, Single <dbl>, MultiJ <int>,
## #   Multi <dbl>, TotalJ <int>, Total <dbl>
# Number of core hours available per month for AY 2016-17
# Oct 1, 2016: Initial launch with 780 cpu
# Mar 15, 2017: Added 192 cpus
# May 1, 2017: Added 312 cpus
# Total Available at end of AY 2016-17: 1284 cpus
# Nov 15, 2017: Added 16 cpus (himem node)
# Apr 2, 2018: Added 252 cpus
# Aug 31, 2018: Added 72 cpus
# Total Available at end of AY 2017-18: 1624 cpus
# Nov 12, 2018: Added 72 cpus
# Dec 1, 2018: Added 24 cpus
# Jan 2, 2019: Added 432 cpus
# Total Available in AY 2018-19: 2152 cpus
ay1617su <- c(580320.00,561600.00,580320.00,580320.00,524160.00,580320.00,699840.00,955296.00,924480.00,955296.00,955296.00,924480.00)
ay1718su <- c(955296.00,924480.00,967200.00,967200.00,873600.00,967200.00,1117440.00,  1154688.00,1117440.00,1154688.00,1155480.00,1169280.00)

Example

monthly <- daily %>% 
  group_by(Month=floor_date(as.Date(Day), "month"),Name,Department,PI,PIDept,Status) %>% 
  summarize(Serial=sum(as.double(Serial)),
    Single=sum(as.double(Single)),
    Multi=sum(as.double(Multi)),
    Total=sum(as.double(Total)),
    SerialJ=sum(as.double(SerialJ)),
    SingleJ=sum(as.double(SingleJ)),
    MultiJ=sum(as.double(MultiJ)),
    TotalJ=sum(as.double(TotalJ)))
monthly %>% head
## # A tibble: 6 x 14
## # Groups:   Month, Name, Department, PI, PIDept [6]
##   Month      Name  Department PI    PIDept Status Serial Single Multi Total
##   <date>     <chr> <chr>      <chr> <chr>  <chr>   <dbl>  <dbl> <dbl> <dbl>
## 1 2017-10-01 user… EN/Mechan… pi001 Mecha… Gradu…      0     0     0     0 
## 2 2017-10-01 user… Mechanica… pi001 Mecha… Guest       0     0     0     0 
## 3 2017-10-01 user… EN/Mechan… pi001 Mecha… Gradu…      0     0     0     0 
## 4 2017-10-01 user… EN/Mechan… pi001 Mecha… Gradu…      0     0     0     0 
## 5 2017-10-01 user… EN/Mechan… pi001 Mecha… Gradu…      0     0     0     0 
## 6 2017-10-01 user… EN/Mechan… pi001 Mecha… Gradu…      0   248. 5001. 5250.
## # … with 4 more variables: SerialJ <dbl>, SingleJ <dbl>, MultiJ <dbl>,
## #   TotalJ <dbl>

Sol usage per month

monthly %>% 
  group_by(Month) %>%   
  summarize(Total=round(sum(as.double(Total)),2),Jobs=round(sum(as.double(TotalJ)))) %>%
  mutate(Available=ay1718su,Unused=Available-Total,Percent=round(Total/Available*100,2)) -> monthlyusage
monthlyusage
## # A tibble: 12 x 6
##    Month        Total   Jobs Available  Unused Percent
##    <date>       <dbl>  <dbl>     <dbl>   <dbl>   <dbl>
##  1 2017-10-01 508739.  32817    955296 446557.    53.2
##  2 2017-11-01 494221.  50844    924480 430259.    53.5
##  3 2017-12-01 563782.  37092    967200 403418.    58.3
##  4 2018-01-01 495731. 103627    967200 471469.    51.2
##  5 2018-02-01 574644.  96780    873600 298956.    65.8
##  6 2018-03-01 762476.  17533    967200 204724.    78.8
##  7 2018-04-01 729374.  35536   1117440 388066.    65.3
##  8 2018-05-01 719943.  32791   1154688 434745.    62.4
##  9 2018-06-01 629904.   7991   1117440 487536.    56.4
## 10 2018-07-01 808487.  35872   1154688 346201.    70.0
## 11 2018-08-01 911909.  32635   1155480 243571.    78.9
## 12 2018-09-01 818882.  30309   1169280 350398.    70.0

Sol usage per PI's Department

library(knitr)
monthly %>%
  group_by(PIDept) %>%
  summarize(Total=round(sum(as.double(Total)),2),Jobs=round(sum(as.double(TotalJ)))) %>%
  kable
PIDept Total Jobs
Accounting 328.42 38
Bioengineering 21117.17 489
Bioengineering Dept 285.75 85
Biological Sciences 3383245.31 450096
Chemical and Biomolecular Engr 1900392.45 23409
Chemistry 59182.71 1358
Civil and Environmental Engr 7561.14 1099
Computer Sci and Engineering 309439.59 3093
Economics 24409.44 165
Industrial and Syst Engr 5.56 103
International Materials Inst 1192.95 447
LTS 1112.97 118
Mathematics 48739.45 2669
Mechanical Engr and Mechanics 1933272.63 28815
Physics 327804.62 1843

Sol usage by user's department or major

monthly %>%
  group_by(Department) %>%
  summarize(Serial=round(sum(as.double(Serial))),SMP=round(sum(as.double(Single))),DMP=round(sum(as.double(Multi))),Total=round(sum(as.double(Total)),2),
  Jobs=round(sum(as.double(TotalJ)))) %>% arrange(desc(Total)) %>% kable
Department Serial SMP DMP Total Jobs
Biological Sciences 641121 1661321 95819 2398260.36 402386
EN/Chemical Engineering 25518 1170727 247976 1444221.76 17857
EN/Mechanical Engineering 72018 246499 982193 1300709.46 21965
AS/Biochemistry (CAS) 45254 707018 9258 761529.43 38840
Mechanical Engr and Mechanics 559 512775 79357 592690.50 6889
Chemical and Biomolecular Engr 2255 312510 142164 456929.47 2758
AS/Physics (AS) 7416 192294 123810 323519.75 886
EN/Computer Science (EN) 575 293024 498 294097.32 806
IC/Computer Science & Business 0 1107 112508 113614.48 212
EN/ 63218 14 0 63231.84 2905
Chemistry 0 55719 0 55719.32 1210
AS/Molecular Biology 42368 9833 22 52223.76 7397
AS/Applied Mathematics 48764 1070 0 49834.27 2781
AS/Biology 0 26231 0 26231.15 245
Economics 0 24409 0 24409.44 165
Computer Sci and Engineering 1733 3870 9751 15354.66 2329
EN/Bioengineering 0 11213 0 11213.45 81
AS/Integrative Biology 44 9293 4 9341.34 219
AS/Chemistry (AS) 527 7661 0 8187.47 1064
Civil and Environmental Engr 2070 5492 0 7561.14 1099
Physics 5660 1738 0 7398.17 1099
Materials Science and Engr 200 14 978 1192.95 447
Accounting 23 305 0 328.42 38
EN/Electrical Engineering 273 0 0 273.37 43
EN/Computer Engineering 6 0 0 6.10 1
EN/Industrial and Systems Engr 6 0 0 5.56 103
LTS 5 0 0 4.53 1
EN/Structural Engineering 1 0 0 0.69 1

Need code for creating LaTeX documents

library(xtable)
monthly %>%
  group_by(Department) %>%
  summarize(Serial=round(sum(as.double(Serial))),SMP=round(sum(as.double(Single))),DMP=round(sum(as.double(Multi))),Total=round(sum(as.double(Total)),2),
  Jobs=round(sum(as.double(TotalJ)))) %>% arrange(desc(Total)) %>% xtable
## % latex table generated in R 3.4.4 by xtable 1.8-2 package
## % Fri Jun 28 11:51:43 2019
## \begin{table}[ht]
## \centering
## \begin{tabular}{rlrrrrr}
##   \hline
##  & Department & Serial & SMP & DMP & Total & Jobs \\ 
##   \hline
## 1 & Biological Sciences & 641121.00 & 1661321.00 & 95819.00 & 2398260.36 & 402386.00 \\ 
##   2 & EN/Chemical Engineering & 25518.00 & 1170727.00 & 247976.00 & 1444221.76 & 17857.00 \\ 
##   3 & EN/Mechanical Engineering & 72018.00 & 246499.00 & 982193.00 & 1300709.46 & 21965.00 \\ 
##   4 & AS/Biochemistry (CAS) & 45254.00 & 707018.00 & 9258.00 & 761529.43 & 38840.00 \\ 
##   5 & Mechanical Engr and Mechanics & 559.00 & 512775.00 & 79357.00 & 592690.50 & 6889.00 \\ 
##   6 & Chemical and Biomolecular Engr & 2255.00 & 312510.00 & 142164.00 & 456929.47 & 2758.00 \\ 
##   7 & AS/Physics (AS) & 7416.00 & 192294.00 & 123810.00 & 323519.75 & 886.00 \\ 
##   8 & EN/Computer Science (EN) & 575.00 & 293024.00 & 498.00 & 294097.32 & 806.00 \\ 
##   9 & IC/Computer Science \& Business & 0.00 & 1107.00 & 112508.00 & 113614.48 & 212.00 \\ 
##   10 & EN/ & 63218.00 & 14.00 & 0.00 & 63231.84 & 2905.00 \\ 
##   11 & Chemistry & 0.00 & 55719.00 & 0.00 & 55719.32 & 1210.00 \\ 
##   12 & AS/Molecular Biology & 42368.00 & 9833.00 & 22.00 & 52223.76 & 7397.00 \\ 
##   13 & AS/Applied Mathematics & 48764.00 & 1070.00 & 0.00 & 49834.27 & 2781.00 \\ 
##   14 & AS/Biology & 0.00 & 26231.00 & 0.00 & 26231.15 & 245.00 \\ 
##   15 & Economics & 0.00 & 24409.00 & 0.00 & 24409.44 & 165.00 \\ 
##   16 & Computer Sci and Engineering & 1733.00 & 3870.00 & 9751.00 & 15354.66 & 2329.00 \\ 
##   17 & EN/Bioengineering & 0.00 & 11213.00 & 0.00 & 11213.45 & 81.00 \\ 
##   18 & AS/Integrative Biology & 44.00 & 9293.00 & 4.00 & 9341.34 & 219.00 \\ 
##   19 & AS/Chemistry (AS) & 527.00 & 7661.00 & 0.00 & 8187.47 & 1064.00 \\ 
##   20 & Civil and Environmental Engr & 2070.00 & 5492.00 & 0.00 & 7561.14 & 1099.00 \\ 
##   21 & Physics & 5660.00 & 1738.00 & 0.00 & 7398.17 & 1099.00 \\ 
##   22 & Materials Science and Engr & 200.00 & 14.00 & 978.00 & 1192.95 & 447.00 \\ 
##   23 & Accounting & 23.00 & 305.00 & 0.00 & 328.42 & 38.00 \\ 
##   24 & EN/Electrical Engineering & 273.00 & 0.00 & 0.00 & 273.37 & 43.00 \\ 
##   25 & EN/Computer Engineering & 6.00 & 0.00 & 0.00 & 6.10 & 1.00 \\ 
##   26 & EN/Industrial and Systems Engr & 6.00 & 0.00 & 0.00 & 5.56 & 103.00 \\ 
##   27 & LTS & 5.00 & 0.00 & 0.00 & 4.53 & 1.00 \\ 
##   28 & EN/Structural Engineering & 1.00 & 0.00 & 0.00 & 0.69 & 1.00 \\ 
##    \hline
## \end{tabular}
## \end{table}

Sol usage by user affiliation

monthly %>%
  group_by(Status) %>%
  summarize(Total=round(sum(as.double(Total)),2)) -> monthlystatus
monthlystatus
## # A tibble: 5 x 2
##   Status                   Total
##   <chr>                    <dbl>
## 1 Faculty                442642.
## 2 Faculty/Staff         2463835.
## 3 Graduate Student      3952679.
## 4 Guest                  653371.
## 5 Undergraduate Student  505562.

Tidyr

  • The goal of tidyr is to help you create tidy data.
  • Tidy data is data where:
    • Each variable is in a column.
    • Each observation is a row.
    • Each value is a cell.
  • Tidy data describes a standard way of storing data that is used wherever possible throughout the tidyverse.

  • two fundamental verbs of data tidying:

    • gather() takes multiple columns, and gathers them into key-value pairs
    • spread(). takes two columns (key & value) and spreads in to multiple columns
    • separate(): Splitting a single variable into two
    • unite(): Merging two variables into one

Tidyr

tidyr

Example

daily %>% 
  filter(as.Date(Day) >= "2018-02-01" & as.Date(Day) <= "2018-03-01") %>% 
  select(Day,Name,Department,PI,PIDept,Serial,Single,Multi) %>% 
  gather(JobType,Usage,Serial:Multi) %>% 
  filter(as.double(Usage) > 100 ) -> tmp
tmp %>% arrange(Usage) %>% 
  kable
Day Name Department PI PIDept JobType Usage
2018-02-05 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics Single 105.6500
2018-02-12 user091 Civil and Environmental Engr pi027 Civil and Environmental Engr Serial 107.2997
2018-03-01 user100 Biological Sciences pi028 Biological Sciences Serial 111.9161
2018-03-01 user073 EN/Chemical Engineering pi021 Chemical and Biomolecular Engr Serial 112.1753
2018-02-18 user113 AS/Biochemistry (CAS) pi028 Biological Sciences Single 112.8583
2018-02-20 user091 Civil and Environmental Engr pi027 Civil and Environmental Engr Serial 114.9858
2018-02-23 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 115.2444
2018-02-08 user047 Chemistry pi011 Chemistry Single 115.3056
2018-02-13 user074 EN/ pi021 Chemical and Biomolecular Engr Serial 118.5172
2018-02-13 user093 Biological Sciences pi028 Biological Sciences Serial 123.7914
2018-02-16 user091 Civil and Environmental Engr pi027 Civil and Environmental Engr Serial 126.9350
2018-02-16 user112 AS/Biochemistry (CAS) pi028 Biological Sciences Serial 127.4314
2018-02-14 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics Multi 128.2133
2018-02-07 user100 Biological Sciences pi028 Biological Sciences Serial 132.0394
2018-02-05 user100 Biological Sciences pi028 Biological Sciences Serial 134.7639
2018-02-26 user074 EN/ pi021 Chemical and Biomolecular Engr Serial 143.6639
2018-02-10 user100 Biological Sciences pi028 Biological Sciences Serial 150.1050
2018-02-21 user114 Biological Sciences pi028 Biological Sciences Serial 150.3164
2018-02-23 user081 Economics pi025 Economics Single 152.5422
2018-02-06 user100 Biological Sciences pi028 Biological Sciences Serial 152.7208
2018-02-23 user091 Civil and Environmental Engr pi027 Civil and Environmental Engr Serial 154.8761
2018-02-22 user073 EN/Chemical Engineering pi021 Chemical and Biomolecular Engr Serial 155.7150
2018-02-01 user100 Biological Sciences pi028 Biological Sciences Serial 156.8333
2018-02-22 user091 Civil and Environmental Engr pi027 Civil and Environmental Engr Serial 157.5728
2018-02-22 user111 Biological Sciences pi028 Biological Sciences Single 169.7850
2018-02-11 user074 EN/ pi021 Chemical and Biomolecular Engr Serial 175.5864
2018-02-27 user074 EN/ pi021 Chemical and Biomolecular Engr Serial 176.6083
2018-02-24 user091 Civil and Environmental Engr pi027 Civil and Environmental Engr Single 176.6278
2018-02-10 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics Single 180.3111
2018-02-03 user074 EN/ pi021 Chemical and Biomolecular Engr Serial 185.7231
2018-02-22 user081 Economics pi025 Economics Single 189.2544
2018-02-21 user081 Economics pi025 Economics Single 190.2978
2018-02-19 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics Serial 202.8258
2018-02-15 user112 AS/Biochemistry (CAS) pi028 Biological Sciences Serial 203.2289
2018-02-05 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 204.4267
2018-02-15 user113 AS/Biochemistry (CAS) pi028 Biological Sciences Single 215.0778
2018-02-15 user112 AS/Biochemistry (CAS) pi028 Biological Sciences Single 217.2744
2018-02-18 user114 Biological Sciences pi028 Biological Sciences Serial 222.2292
2018-02-01 user073 EN/Chemical Engineering pi021 Chemical and Biomolecular Engr Serial 244.3133
2018-02-18 user047 Chemistry pi011 Chemistry Single 245.3222
2018-02-23 user073 EN/Chemical Engineering pi021 Chemical and Biomolecular Engr Serial 248.4239
2018-02-20 user073 EN/Chemical Engineering pi021 Chemical and Biomolecular Engr Serial 249.9369
2018-02-22 user112 AS/Biochemistry (CAS) pi028 Biological Sciences Single 252.6211
2018-02-20 user081 Economics pi025 Economics Single 252.8489
2018-02-12 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics Single 253.0778
2018-02-13 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 254.5733
2018-02-12 user093 Biological Sciences pi028 Biological Sciences Serial 255.1869
2018-02-15 user074 EN/ pi021 Chemical and Biomolecular Engr Serial 256.6567
2018-02-04 user093 Biological Sciences pi028 Biological Sciences Serial 258.1519
2018-02-17 user074 EN/ pi021 Chemical and Biomolecular Engr Serial 266.3006
2018-02-14 user074 EN/ pi021 Chemical and Biomolecular Engr Serial 267.5903
2018-02-26 user093 Biological Sciences pi028 Biological Sciences Serial 274.1886
2018-02-11 user093 Biological Sciences pi028 Biological Sciences Serial 275.9447
2018-02-13 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics Single 276.6000
2018-02-08 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Multi 278.2267
2018-02-07 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics Single 300.0389
2018-02-25 user074 EN/ pi021 Chemical and Biomolecular Engr Serial 300.4897
2018-02-13 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics Multi 301.5556
2018-02-19 user103 Biological Sciences pi028 Biological Sciences Serial 303.4178
2018-02-07 user124 Chemical and Biomolecular Engr pi029 Mechanical Engr and Mechanics Single 316.4639
2018-02-21 user091 Civil and Environmental Engr pi027 Civil and Environmental Engr Serial 317.0514
2018-02-18 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics Serial 319.6775
2018-02-23 user112 AS/Biochemistry (CAS) pi028 Biological Sciences Single 321.4444
2018-03-01 user100 Biological Sciences pi028 Biological Sciences Single 326.6733
2018-02-02 user073 EN/Chemical Engineering pi021 Chemical and Biomolecular Engr Serial 327.4639
2018-02-18 user103 Biological Sciences pi028 Biological Sciences Serial 329.6586
2018-02-01 user047 Chemistry pi011 Chemistry Single 334.9778
2018-02-18 user124 Chemical and Biomolecular Engr pi029 Mechanical Engr and Mechanics Single 335.3228
2018-02-17 user013 Chemical and Biomolecular Engr pi003 Chemical and Biomolecular Engr Serial 337.4100
2018-02-15 user100 Biological Sciences pi028 Biological Sciences Single 337.4756
2018-02-10 user113 AS/Biochemistry (CAS) pi028 Biological Sciences Single 337.9083
2018-02-14 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics Single 338.4944
2018-02-19 user073 EN/Chemical Engineering pi021 Chemical and Biomolecular Engr Serial 339.1172
2018-02-01 user114 Biological Sciences pi028 Biological Sciences Serial 339.8011
2018-02-15 user023 Computer Sci and Engineering pi006 Computer Sci and Engineering Single 340.8528
2018-02-18 user074 EN/ pi021 Chemical and Biomolecular Engr Serial 343.4633
2018-02-13 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 346.9111
2018-02-26 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics Serial 353.1256
2018-02-07 user049 AS/Physics (AS) pi012 Physics Single 367.0556
2018-02-19 user081 Economics pi025 Economics Single 372.3867
2018-02-02 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 378.5500
2018-02-24 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 381.0533
2018-02-23 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 405.5761
2018-02-16 user073 EN/Chemical Engineering pi021 Chemical and Biomolecular Engr Serial 408.1292
2018-02-09 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Multi 413.7933
2018-02-15 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 419.5333
2018-02-25 user103 Biological Sciences pi028 Biological Sciences Serial 426.7639
2018-02-16 user103 Biological Sciences pi028 Biological Sciences Serial 432.0269
2018-02-27 user103 Biological Sciences pi028 Biological Sciences Serial 432.0292
2018-02-23 user103 Biological Sciences pi028 Biological Sciences Serial 432.0683
2018-02-10 user093 Biological Sciences pi028 Biological Sciences Serial 433.1294
2018-02-07 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 442.7533
2018-02-21 user074 EN/ pi021 Chemical and Biomolecular Engr Serial 451.1503
2018-02-16 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Multi 454.8733
2018-02-27 user081 Economics pi025 Economics Single 454.8911
2018-02-11 user103 Biological Sciences pi028 Biological Sciences Serial 456.9964
2018-02-08 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 462.0000
2018-02-10 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 467.1611
2018-02-11 user124 Chemical and Biomolecular Engr pi029 Mechanical Engr and Mechanics Single 469.1378
2018-02-05 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Multi 500.3600
2018-02-09 user102 AS/Molecular Biology pi028 Biological Sciences Serial 501.1664
2018-02-03 user100 Biological Sciences pi028 Biological Sciences Serial 519.9869
2018-02-12 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 531.7444
2018-02-05 user103 Biological Sciences pi028 Biological Sciences Serial 561.8706
2018-02-11 user049 AS/Physics (AS) pi012 Physics Single 568.0267
2018-02-15 user049 AS/Physics (AS) pi012 Physics Single 568.0689
2018-02-24 user074 EN/ pi021 Chemical and Biomolecular Engr Serial 581.0139
2018-02-02 user093 Biological Sciences pi028 Biological Sciences Serial 584.3325
2018-02-06 user103 Biological Sciences pi028 Biological Sciences Serial 588.0347
2018-02-12 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics Serial 594.1553
2018-02-28 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Multi 596.0600
2018-02-05 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics Multi 622.3333
2018-02-19 user074 EN/ pi021 Chemical and Biomolecular Engr Serial 629.0411
2018-02-13 user103 Biological Sciences pi028 Biological Sciences Serial 631.3822
2018-02-05 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 646.9833
2018-02-19 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 647.6000
2018-02-03 user103 Biological Sciences pi028 Biological Sciences Serial 672.0669
2018-03-01 user103 Biological Sciences pi028 Biological Sciences Serial 682.3461
2018-02-01 user103 Biological Sciences pi028 Biological Sciences Serial 711.8914
2018-02-16 user113 AS/Biochemistry (CAS) pi028 Biological Sciences Single 721.3056
2018-02-03 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 726.1667
2018-02-14 user113 AS/Biochemistry (CAS) pi028 Biological Sciences Single 728.6861
2018-02-01 user093 Biological Sciences pi028 Biological Sciences Serial 730.2447
2018-02-27 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics Multi 733.2800
2018-02-17 user113 AS/Biochemistry (CAS) pi028 Biological Sciences Single 738.1722
2018-02-18 user073 EN/Chemical Engineering pi021 Chemical and Biomolecular Engr Serial 755.4661
2018-02-18 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 764.9444
2018-02-27 user100 Biological Sciences pi028 Biological Sciences Single 768.0711
2018-02-16 user074 EN/ pi021 Chemical and Biomolecular Engr Serial 782.2869
2018-02-04 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 798.6000
2018-02-02 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Multi 830.3867
2018-02-19 user093 Biological Sciences pi028 Biological Sciences Serial 852.7972
2018-02-23 user074 EN/ pi021 Chemical and Biomolecular Engr Serial 854.2564
2018-02-05 user124 Chemical and Biomolecular Engr pi029 Mechanical Engr and Mechanics Single 857.1750
2018-02-06 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 867.4333
2018-02-09 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 882.7422
2018-02-08 user103 Biological Sciences pi028 Biological Sciences Serial 883.8308
2018-02-17 user103 Biological Sciences pi028 Biological Sciences Serial 886.3556
2018-03-01 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 892.5667
2018-02-11 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 901.5111
2018-02-22 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics Multi 907.3600
2018-02-12 user103 Biological Sciences pi028 Biological Sciences Serial 918.1464
2018-02-14 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics Serial 918.3131
2018-02-05 user093 Biological Sciences pi028 Biological Sciences Serial 920.5944
2018-02-18 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Multi 968.0667
2018-02-09 user100 Biological Sciences pi028 Biological Sciences Single 979.9556
2018-02-25 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 991.0767
2018-02-03 user093 Biological Sciences pi028 Biological Sciences Serial 1001.4750
2018-02-24 user100 Biological Sciences pi028 Biological Sciences Single 1036.1956
2018-02-18 user093 Biological Sciences pi028 Biological Sciences Serial 1047.7806
2018-02-06 user114 Biological Sciences pi028 Biological Sciences Serial 1048.8661
2018-02-02 user112 AS/Biochemistry (CAS) pi028 Biological Sciences Single 1051.1906
2018-02-14 user124 Chemical and Biomolecular Engr pi029 Mechanical Engr and Mechanics Single 1056.0000
2018-02-17 user124 Chemical and Biomolecular Engr pi029 Mechanical Engr and Mechanics Single 1056.0306
2018-02-09 user124 Chemical and Biomolecular Engr pi029 Mechanical Engr and Mechanics Single 1056.1344
2018-02-07 user113 AS/Biochemistry (CAS) pi028 Biological Sciences Single 1059.3444
2018-02-01 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 1105.3667
2018-02-17 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics Serial 1137.3522
2018-02-09 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 1151.7400
2018-02-21 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Multi 1152.0467
2018-02-08 user049 AS/Physics (AS) pi012 Physics Single 1217.4006
2018-02-14 user103 Biological Sciences pi028 Biological Sciences Serial 1222.9708
2018-02-04 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Multi 1226.5400
2018-02-07 user100 Biological Sciences pi028 Biological Sciences Single 1270.6889
2018-02-08 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 1271.8533
2018-02-18 user100 Biological Sciences pi028 Biological Sciences Single 1274.2889
2018-02-16 user049 AS/Physics (AS) pi012 Physics Single 1278.0100
2018-02-13 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics Serial 1294.0481
2018-02-10 user049 AS/Physics (AS) pi012 Physics Single 1349.0581
2018-02-04 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 1401.4444
2018-02-14 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 1402.7867
2018-02-01 user049 AS/Physics (AS) pi012 Physics Single 1420.0222
2018-02-07 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 1449.2533
2018-02-17 user093 Biological Sciences pi028 Biological Sciences Serial 1463.6450
2018-02-23 user100 Biological Sciences pi028 Biological Sciences Single 1528.8800
2018-02-12 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics Multi 1536.3378
2018-02-03 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 1552.8883
2018-02-25 user114 Biological Sciences pi028 Biological Sciences Serial 1558.2203
2018-02-18 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 1584.0856
2018-02-01 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Multi 1584.3222
2018-02-25 user112 AS/Biochemistry (CAS) pi028 Biological Sciences Single 1637.4294
2018-02-26 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 1642.4333
2018-02-26 user114 Biological Sciences pi028 Biological Sciences Serial 1659.5142
2018-02-08 user102 AS/Molecular Biology pi028 Biological Sciences Serial 1702.7492
2018-02-22 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 1751.3772
2018-02-17 user049 AS/Physics (AS) pi012 Physics Single 1775.1500
2018-02-19 user114 Biological Sciences pi028 Biological Sciences Serial 1813.6136
2018-02-07 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 1817.5722
2018-02-26 user100 Biological Sciences pi028 Biological Sciences Single 1818.3689
2018-02-09 user078 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics Single 1860.4667
2018-02-11 user113 AS/Biochemistry (CAS) pi028 Biological Sciences Single 1888.3639
2018-02-28 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 1909.3133
2018-02-06 user100 Biological Sciences pi028 Biological Sciences Single 1949.8978
2018-02-17 user100 Biological Sciences pi028 Biological Sciences Single 1982.6444
2018-03-01 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 2026.1033
2018-02-24 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 2035.7867
2018-02-03 user113 AS/Biochemistry (CAS) pi028 Biological Sciences Single 2037.6000
2018-02-28 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 2047.5528
2018-02-19 user125 Mechanical Engr and Mechanics pi029 Mechanical Engr and Mechanics Single 2057.6661
2018-02-24 user125 Mechanical Engr and Mechanics pi029 Mechanical Engr and Mechanics Single 2112.1833
2018-02-28 user125 Mechanical Engr and Mechanics pi029 Mechanical Engr and Mechanics Single 2113.3567
2018-02-07 user093 Biological Sciences pi028 Biological Sciences Serial 2116.2878
2018-02-09 user113 AS/Biochemistry (CAS) pi028 Biological Sciences Single 2205.0861
2018-02-27 user114 Biological Sciences pi028 Biological Sciences Serial 2208.2944
2018-02-19 user100 Biological Sciences pi028 Biological Sciences Single 2212.2133
2018-02-23 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 2215.1000
2018-02-11 user098 AS/Biochemistry (CAS) pi028 Biological Sciences Single 2244.7867
2018-02-05 user113 AS/Biochemistry (CAS) pi028 Biological Sciences Single 2250.5389
2018-03-01 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 2295.3150
2018-02-05 user100 Biological Sciences pi028 Biological Sciences Single 2304.4933
2018-02-20 user093 Biological Sciences pi028 Biological Sciences Serial 2364.0533
2018-02-13 user100 Biological Sciences pi028 Biological Sciences Single 2390.3378
2018-02-01 user113 AS/Biochemistry (CAS) pi028 Biological Sciences Single 2400.2278
2018-02-10 user100 Biological Sciences pi028 Biological Sciences Single 2467.5778
2018-02-15 user114 Biological Sciences pi028 Biological Sciences Serial 2530.1858
2018-02-08 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 2592.4267
2018-02-13 user113 AS/Biochemistry (CAS) pi028 Biological Sciences Single 2597.9556
2018-02-24 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 2625.7922
2018-02-04 user100 Biological Sciences pi028 Biological Sciences Single 2666.5200
2018-02-21 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 2702.2067
2018-02-11 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics Multi 2724.8889
2018-02-22 user100 Biological Sciences pi028 Biological Sciences Single 2735.9556
2018-02-20 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics Multi 2814.1778
2018-02-27 user093 Biological Sciences pi028 Biological Sciences Serial 2961.7306
2018-02-07 user098 AS/Biochemistry (CAS) pi028 Biological Sciences Single 3022.3267
2018-03-01 user098 AS/Biochemistry (CAS) pi028 Biological Sciences Single 3024.2333
2018-02-10 user098 AS/Biochemistry (CAS) pi028 Biological Sciences Single 3024.9533
2018-02-15 user098 AS/Biochemistry (CAS) pi028 Biological Sciences Single 3029.6733
2018-02-03 user098 AS/Biochemistry (CAS) pi028 Biological Sciences Single 3029.8933
2018-02-27 user098 AS/Biochemistry (CAS) pi028 Biological Sciences Single 3036.5000
2018-02-13 user098 AS/Biochemistry (CAS) pi028 Biological Sciences Single 3037.5067
2018-02-18 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics Multi 3072.3200
2018-03-01 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics Multi 3072.3733
2018-02-25 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics Multi 3072.4622
2018-02-02 user100 Biological Sciences pi028 Biological Sciences Single 3094.2311
2018-02-07 user103 Biological Sciences pi028 Biological Sciences Serial 3159.8628
2018-02-03 user124 Chemical and Biomolecular Engr pi029 Mechanical Engr and Mechanics Single 3168.1283
2018-02-22 user125 Mechanical Engr and Mechanics pi029 Mechanical Engr and Mechanics Single 3168.2078
2018-02-01 user124 Chemical and Biomolecular Engr pi029 Mechanical Engr and Mechanics Single 3168.2383
2018-02-18 user098 AS/Biochemistry (CAS) pi028 Biological Sciences Single 3234.3867
2018-02-25 user100 Biological Sciences pi028 Biological Sciences Single 3297.0222
2018-02-20 user114 Biological Sciences pi028 Biological Sciences Serial 3321.5261
2018-02-11 user100 Biological Sciences pi028 Biological Sciences Single 3471.1689
2018-02-25 user098 AS/Biochemistry (CAS) pi028 Biological Sciences Single 3519.5467
2018-02-03 user100 Biological Sciences pi028 Biological Sciences Single 3576.2844
2018-02-05 user098 AS/Biochemistry (CAS) pi028 Biological Sciences Single 3655.2467
2018-02-21 user100 Biological Sciences pi028 Biological Sciences Single 3702.6267
2018-02-04 user049 AS/Physics (AS) pi012 Physics Single 3834.1789
2018-02-18 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 3904.3878
2018-02-25 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics Serial 3936.7806
2018-02-01 user100 Biological Sciences pi028 Biological Sciences Single 3968.3156
2018-02-28 user093 Biological Sciences pi028 Biological Sciences Serial 4081.5022
2018-02-09 user103 Biological Sciences pi028 Biological Sciences Serial 4120.8064
2018-02-10 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics Multi 4205.4489
2018-02-08 user100 Biological Sciences pi028 Biological Sciences Single 4493.6267
2018-02-26 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics Multi 4608.2133
2018-02-06 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 4712.8933
2018-02-07 user114 Biological Sciences pi028 Biological Sciences Serial 4747.3542
2018-02-08 user114 Biological Sciences pi028 Biological Sciences Serial 4771.3419
2018-02-15 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics Multi 4860.0533
2018-02-02 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 5309.4622
2018-02-28 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics Multi 5490.6844
2018-02-16 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics Multi 5640.4444
2018-02-01 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics Multi 5680.7556
2018-02-19 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 5681.7333
2018-02-22 user114 Biological Sciences pi028 Biological Sciences Serial 5686.1175
2018-02-24 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics Multi 5703.8933
2018-02-12 user100 Biological Sciences pi028 Biological Sciences Single 5724.8667
2018-02-23 user114 Biological Sciences pi028 Biological Sciences Serial 5970.8617
2018-02-23 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics Multi 6144.6400
2018-02-22 user125 Mechanical Engr and Mechanics pi029 Mechanical Engr and Mechanics Multi 6336.7700
2018-02-24 user114 Biological Sciences pi028 Biological Sciences Serial 6800.2386
2018-02-03 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics Multi 7681.2889
2018-02-16 user114 Biological Sciences pi028 Biological Sciences Serial 7726.5111
2018-02-16 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 7923.9906
2018-02-21 user093 Biological Sciences pi028 Biological Sciences Serial 8111.0386
2018-02-28 user114 Biological Sciences pi028 Biological Sciences Serial 8832.5167
2018-02-06 user093 Biological Sciences pi028 Biological Sciences Serial 8998.2697
2018-02-01 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 9188.8556
2018-02-08 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics Multi 9245.0667
2018-02-06 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics Multi 9507.1778
2018-02-14 user114 Biological Sciences pi028 Biological Sciences Serial 9812.0792
2018-03-01 user093 Biological Sciences pi028 Biological Sciences Serial 9942.6639
2018-02-04 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics Multi 9949.8889
2018-02-15 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 10681.6489
2018-02-17 user114 Biological Sciences pi028 Biological Sciences Serial 10708.1586
2018-02-17 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr Single 10820.6422
2018-02-11 user114 Biological Sciences pi028 Biological Sciences Serial 12664.6194
2018-02-10 user114 Biological Sciences pi028 Biological Sciences Serial 13001.7522
2018-02-13 user114 Biological Sciences pi028 Biological Sciences Serial 13776.2064
2018-02-12 user114 Biological Sciences pi028 Biological Sciences Serial 14283.5228

Example

tmp %>% arrange(Usage) %>% 
  spread(JobType,Usage,fill = 0.0) %>% 
  kable
Day Name Department PI PIDept Multi Serial Single
2018-02-01 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 1105.3667 0.0000 0.0000
2018-02-01 user047 Chemistry pi011 Chemistry 0.0000 0.0000 334.9778
2018-02-01 user049 AS/Physics (AS) pi012 Physics 0.0000 0.0000 1420.0222
2018-02-01 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics 5680.7556 0.0000 0.0000
2018-02-01 user073 EN/Chemical Engineering pi021 Chemical and Biomolecular Engr 0.0000 244.3133 0.0000
2018-02-01 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 1584.3222 0.0000 9188.8556
2018-02-01 user093 Biological Sciences pi028 Biological Sciences 0.0000 730.2447 0.0000
2018-02-01 user100 Biological Sciences pi028 Biological Sciences 0.0000 156.8333 3968.3156
2018-02-01 user103 Biological Sciences pi028 Biological Sciences 0.0000 711.8914 0.0000
2018-02-01 user113 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 2400.2278
2018-02-01 user114 Biological Sciences pi028 Biological Sciences 0.0000 339.8011 0.0000
2018-02-01 user124 Chemical and Biomolecular Engr pi029 Mechanical Engr and Mechanics 0.0000 0.0000 3168.2383
2018-02-02 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 378.5500 0.0000 0.0000
2018-02-02 user073 EN/Chemical Engineering pi021 Chemical and Biomolecular Engr 0.0000 327.4639 0.0000
2018-02-02 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 830.3867 0.0000 5309.4622
2018-02-02 user093 Biological Sciences pi028 Biological Sciences 0.0000 584.3325 0.0000
2018-02-02 user100 Biological Sciences pi028 Biological Sciences 0.0000 0.0000 3094.2311
2018-02-02 user112 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 1051.1906
2018-02-03 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 726.1667 0.0000 0.0000
2018-02-03 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics 7681.2889 0.0000 0.0000
2018-02-03 user074 EN/ pi021 Chemical and Biomolecular Engr 0.0000 185.7231 0.0000
2018-02-03 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 0.0000 0.0000 1552.8883
2018-02-03 user093 Biological Sciences pi028 Biological Sciences 0.0000 1001.4750 0.0000
2018-02-03 user098 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 3029.8933
2018-02-03 user100 Biological Sciences pi028 Biological Sciences 0.0000 519.9869 3576.2844
2018-02-03 user103 Biological Sciences pi028 Biological Sciences 0.0000 672.0669 0.0000
2018-02-03 user113 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 2037.6000
2018-02-03 user124 Chemical and Biomolecular Engr pi029 Mechanical Engr and Mechanics 0.0000 0.0000 3168.1283
2018-02-04 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 1401.4444 0.0000 0.0000
2018-02-04 user049 AS/Physics (AS) pi012 Physics 0.0000 0.0000 3834.1789
2018-02-04 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics 9949.8889 0.0000 0.0000
2018-02-04 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 1226.5400 0.0000 798.6000
2018-02-04 user093 Biological Sciences pi028 Biological Sciences 0.0000 258.1519 0.0000
2018-02-04 user100 Biological Sciences pi028 Biological Sciences 0.0000 0.0000 2666.5200
2018-02-05 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 646.9833 0.0000 0.0000
2018-02-05 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics 622.3333 0.0000 0.0000
2018-02-05 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics 0.0000 0.0000 105.6500
2018-02-05 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 500.3600 0.0000 204.4267
2018-02-05 user093 Biological Sciences pi028 Biological Sciences 0.0000 920.5944 0.0000
2018-02-05 user098 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 3655.2467
2018-02-05 user100 Biological Sciences pi028 Biological Sciences 0.0000 134.7639 2304.4933
2018-02-05 user103 Biological Sciences pi028 Biological Sciences 0.0000 561.8706 0.0000
2018-02-05 user113 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 2250.5389
2018-02-05 user124 Chemical and Biomolecular Engr pi029 Mechanical Engr and Mechanics 0.0000 0.0000 857.1750
2018-02-06 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 867.4333 0.0000 0.0000
2018-02-06 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics 9507.1778 0.0000 0.0000
2018-02-06 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 0.0000 0.0000 4712.8933
2018-02-06 user093 Biological Sciences pi028 Biological Sciences 0.0000 8998.2697 0.0000
2018-02-06 user100 Biological Sciences pi028 Biological Sciences 0.0000 152.7208 1949.8978
2018-02-06 user103 Biological Sciences pi028 Biological Sciences 0.0000 588.0347 0.0000
2018-02-06 user114 Biological Sciences pi028 Biological Sciences 0.0000 1048.8661 0.0000
2018-02-07 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 1817.5722 0.0000 0.0000
2018-02-07 user049 AS/Physics (AS) pi012 Physics 0.0000 0.0000 367.0556
2018-02-07 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics 0.0000 0.0000 300.0389
2018-02-07 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 0.0000 0.0000 442.7533
2018-02-07 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 0.0000 0.0000 1449.2533
2018-02-07 user093 Biological Sciences pi028 Biological Sciences 0.0000 2116.2878 0.0000
2018-02-07 user098 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 3022.3267
2018-02-07 user100 Biological Sciences pi028 Biological Sciences 0.0000 132.0394 1270.6889
2018-02-07 user103 Biological Sciences pi028 Biological Sciences 0.0000 3159.8628 0.0000
2018-02-07 user113 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 1059.3444
2018-02-07 user114 Biological Sciences pi028 Biological Sciences 0.0000 4747.3542 0.0000
2018-02-07 user124 Chemical and Biomolecular Engr pi029 Mechanical Engr and Mechanics 0.0000 0.0000 316.4639
2018-02-08 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 462.0000 0.0000 0.0000
2018-02-08 user047 Chemistry pi011 Chemistry 0.0000 0.0000 115.3056
2018-02-08 user049 AS/Physics (AS) pi012 Physics 0.0000 0.0000 1217.4006
2018-02-08 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics 9245.0667 0.0000 0.0000
2018-02-08 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 0.0000 0.0000 2592.4267
2018-02-08 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 278.2267 0.0000 1271.8533
2018-02-08 user100 Biological Sciences pi028 Biological Sciences 0.0000 0.0000 4493.6267
2018-02-08 user102 AS/Molecular Biology pi028 Biological Sciences 0.0000 1702.7492 0.0000
2018-02-08 user103 Biological Sciences pi028 Biological Sciences 0.0000 883.8308 0.0000
2018-02-08 user114 Biological Sciences pi028 Biological Sciences 0.0000 4771.3419 0.0000
2018-02-09 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 882.7422 0.0000 0.0000
2018-02-09 user078 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics 0.0000 0.0000 1860.4667
2018-02-09 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 413.7933 0.0000 1151.7400
2018-02-09 user100 Biological Sciences pi028 Biological Sciences 0.0000 0.0000 979.9556
2018-02-09 user102 AS/Molecular Biology pi028 Biological Sciences 0.0000 501.1664 0.0000
2018-02-09 user103 Biological Sciences pi028 Biological Sciences 0.0000 4120.8064 0.0000
2018-02-09 user113 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 2205.0861
2018-02-09 user124 Chemical and Biomolecular Engr pi029 Mechanical Engr and Mechanics 0.0000 0.0000 1056.1344
2018-02-10 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 467.1611 0.0000 0.0000
2018-02-10 user049 AS/Physics (AS) pi012 Physics 0.0000 0.0000 1349.0581
2018-02-10 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics 4205.4489 0.0000 0.0000
2018-02-10 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics 0.0000 0.0000 180.3111
2018-02-10 user093 Biological Sciences pi028 Biological Sciences 0.0000 433.1294 0.0000
2018-02-10 user098 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 3024.9533
2018-02-10 user100 Biological Sciences pi028 Biological Sciences 0.0000 150.1050 2467.5778
2018-02-10 user113 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 337.9083
2018-02-10 user114 Biological Sciences pi028 Biological Sciences 0.0000 13001.7522 0.0000
2018-02-11 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 901.5111 0.0000 0.0000
2018-02-11 user049 AS/Physics (AS) pi012 Physics 0.0000 0.0000 568.0267
2018-02-11 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics 2724.8889 0.0000 0.0000
2018-02-11 user074 EN/ pi021 Chemical and Biomolecular Engr 0.0000 175.5864 0.0000
2018-02-11 user093 Biological Sciences pi028 Biological Sciences 0.0000 275.9447 0.0000
2018-02-11 user098 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 2244.7867
2018-02-11 user100 Biological Sciences pi028 Biological Sciences 0.0000 0.0000 3471.1689
2018-02-11 user103 Biological Sciences pi028 Biological Sciences 0.0000 456.9964 0.0000
2018-02-11 user113 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 1888.3639
2018-02-11 user114 Biological Sciences pi028 Biological Sciences 0.0000 12664.6194 0.0000
2018-02-11 user124 Chemical and Biomolecular Engr pi029 Mechanical Engr and Mechanics 0.0000 0.0000 469.1378
2018-02-12 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 531.7444 0.0000 0.0000
2018-02-12 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics 1536.3378 0.0000 0.0000
2018-02-12 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics 0.0000 594.1553 253.0778
2018-02-12 user091 Civil and Environmental Engr pi027 Civil and Environmental Engr 0.0000 107.2997 0.0000
2018-02-12 user093 Biological Sciences pi028 Biological Sciences 0.0000 255.1869 0.0000
2018-02-12 user100 Biological Sciences pi028 Biological Sciences 0.0000 0.0000 5724.8667
2018-02-12 user103 Biological Sciences pi028 Biological Sciences 0.0000 918.1464 0.0000
2018-02-12 user114 Biological Sciences pi028 Biological Sciences 0.0000 14283.5228 0.0000
2018-02-13 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 346.9111 0.0000 0.0000
2018-02-13 user074 EN/ pi021 Chemical and Biomolecular Engr 0.0000 118.5172 0.0000
2018-02-13 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics 301.5556 1294.0481 276.6000
2018-02-13 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 0.0000 0.0000 254.5733
2018-02-13 user093 Biological Sciences pi028 Biological Sciences 0.0000 123.7914 0.0000
2018-02-13 user098 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 3037.5067
2018-02-13 user100 Biological Sciences pi028 Biological Sciences 0.0000 0.0000 2390.3378
2018-02-13 user103 Biological Sciences pi028 Biological Sciences 0.0000 631.3822 0.0000
2018-02-13 user113 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 2597.9556
2018-02-13 user114 Biological Sciences pi028 Biological Sciences 0.0000 13776.2064 0.0000
2018-02-14 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics 128.2133 0.0000 0.0000
2018-02-14 user074 EN/ pi021 Chemical and Biomolecular Engr 0.0000 267.5903 0.0000
2018-02-14 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics 0.0000 918.3131 338.4944
2018-02-14 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 0.0000 0.0000 1402.7867
2018-02-14 user103 Biological Sciences pi028 Biological Sciences 0.0000 1222.9708 0.0000
2018-02-14 user113 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 728.6861
2018-02-14 user114 Biological Sciences pi028 Biological Sciences 0.0000 9812.0792 0.0000
2018-02-14 user124 Chemical and Biomolecular Engr pi029 Mechanical Engr and Mechanics 0.0000 0.0000 1056.0000
2018-02-15 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 419.5333 0.0000 0.0000
2018-02-15 user023 Computer Sci and Engineering pi006 Computer Sci and Engineering 0.0000 0.0000 340.8528
2018-02-15 user049 AS/Physics (AS) pi012 Physics 0.0000 0.0000 568.0689
2018-02-15 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics 4860.0533 0.0000 0.0000
2018-02-15 user074 EN/ pi021 Chemical and Biomolecular Engr 0.0000 256.6567 0.0000
2018-02-15 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 0.0000 0.0000 10681.6489
2018-02-15 user098 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 3029.6733
2018-02-15 user100 Biological Sciences pi028 Biological Sciences 0.0000 0.0000 337.4756
2018-02-15 user112 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 203.2289 217.2744
2018-02-15 user113 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 215.0778
2018-02-15 user114 Biological Sciences pi028 Biological Sciences 0.0000 2530.1858 0.0000
2018-02-16 user049 AS/Physics (AS) pi012 Physics 0.0000 0.0000 1278.0100
2018-02-16 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics 5640.4444 0.0000 0.0000
2018-02-16 user073 EN/Chemical Engineering pi021 Chemical and Biomolecular Engr 0.0000 408.1292 0.0000
2018-02-16 user074 EN/ pi021 Chemical and Biomolecular Engr 0.0000 782.2869 0.0000
2018-02-16 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 454.8733 0.0000 0.0000
2018-02-16 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 0.0000 0.0000 7923.9906
2018-02-16 user091 Civil and Environmental Engr pi027 Civil and Environmental Engr 0.0000 126.9350 0.0000
2018-02-16 user103 Biological Sciences pi028 Biological Sciences 0.0000 432.0269 0.0000
2018-02-16 user112 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 127.4314 0.0000
2018-02-16 user113 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 721.3056
2018-02-16 user114 Biological Sciences pi028 Biological Sciences 0.0000 7726.5111 0.0000
2018-02-17 user013 Chemical and Biomolecular Engr pi003 Chemical and Biomolecular Engr 0.0000 337.4100 0.0000
2018-02-17 user049 AS/Physics (AS) pi012 Physics 0.0000 0.0000 1775.1500
2018-02-17 user074 EN/ pi021 Chemical and Biomolecular Engr 0.0000 266.3006 0.0000
2018-02-17 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics 0.0000 1137.3522 0.0000
2018-02-17 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 0.0000 0.0000 10820.6422
2018-02-17 user093 Biological Sciences pi028 Biological Sciences 0.0000 1463.6450 0.0000
2018-02-17 user100 Biological Sciences pi028 Biological Sciences 0.0000 0.0000 1982.6444
2018-02-17 user103 Biological Sciences pi028 Biological Sciences 0.0000 886.3556 0.0000
2018-02-17 user113 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 738.1722
2018-02-17 user114 Biological Sciences pi028 Biological Sciences 0.0000 10708.1586 0.0000
2018-02-17 user124 Chemical and Biomolecular Engr pi029 Mechanical Engr and Mechanics 0.0000 0.0000 1056.0306
2018-02-18 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 764.9444 0.0000 0.0000
2018-02-18 user047 Chemistry pi011 Chemistry 0.0000 0.0000 245.3222
2018-02-18 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics 3072.3200 0.0000 0.0000
2018-02-18 user073 EN/Chemical Engineering pi021 Chemical and Biomolecular Engr 0.0000 755.4661 0.0000
2018-02-18 user074 EN/ pi021 Chemical and Biomolecular Engr 0.0000 343.4633 0.0000
2018-02-18 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics 0.0000 319.6775 0.0000
2018-02-18 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 968.0667 0.0000 1584.0856
2018-02-18 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 0.0000 0.0000 3904.3878
2018-02-18 user093 Biological Sciences pi028 Biological Sciences 0.0000 1047.7806 0.0000
2018-02-18 user098 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 3234.3867
2018-02-18 user100 Biological Sciences pi028 Biological Sciences 0.0000 0.0000 1274.2889
2018-02-18 user103 Biological Sciences pi028 Biological Sciences 0.0000 329.6586 0.0000
2018-02-18 user113 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 112.8583
2018-02-18 user114 Biological Sciences pi028 Biological Sciences 0.0000 222.2292 0.0000
2018-02-18 user124 Chemical and Biomolecular Engr pi029 Mechanical Engr and Mechanics 0.0000 0.0000 335.3228
2018-02-19 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 647.6000 0.0000 0.0000
2018-02-19 user073 EN/Chemical Engineering pi021 Chemical and Biomolecular Engr 0.0000 339.1172 0.0000
2018-02-19 user074 EN/ pi021 Chemical and Biomolecular Engr 0.0000 629.0411 0.0000
2018-02-19 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics 0.0000 202.8258 0.0000
2018-02-19 user081 Economics pi025 Economics 0.0000 0.0000 372.3867
2018-02-19 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 0.0000 0.0000 5681.7333
2018-02-19 user093 Biological Sciences pi028 Biological Sciences 0.0000 852.7972 0.0000
2018-02-19 user100 Biological Sciences pi028 Biological Sciences 0.0000 0.0000 2212.2133
2018-02-19 user103 Biological Sciences pi028 Biological Sciences 0.0000 303.4178 0.0000
2018-02-19 user114 Biological Sciences pi028 Biological Sciences 0.0000 1813.6136 0.0000
2018-02-19 user125 Mechanical Engr and Mechanics pi029 Mechanical Engr and Mechanics 0.0000 0.0000 2057.6661
2018-02-20 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 2814.1778 0.0000 0.0000
2018-02-20 user073 EN/Chemical Engineering pi021 Chemical and Biomolecular Engr 0.0000 249.9369 0.0000
2018-02-20 user081 Economics pi025 Economics 0.0000 0.0000 252.8489
2018-02-20 user091 Civil and Environmental Engr pi027 Civil and Environmental Engr 0.0000 114.9858 0.0000
2018-02-20 user093 Biological Sciences pi028 Biological Sciences 0.0000 2364.0533 0.0000
2018-02-20 user114 Biological Sciences pi028 Biological Sciences 0.0000 3321.5261 0.0000
2018-02-21 user074 EN/ pi021 Chemical and Biomolecular Engr 0.0000 451.1503 0.0000
2018-02-21 user081 Economics pi025 Economics 0.0000 0.0000 190.2978
2018-02-21 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 1152.0467 0.0000 0.0000
2018-02-21 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 0.0000 0.0000 2702.2067
2018-02-21 user091 Civil and Environmental Engr pi027 Civil and Environmental Engr 0.0000 317.0514 0.0000
2018-02-21 user093 Biological Sciences pi028 Biological Sciences 0.0000 8111.0386 0.0000
2018-02-21 user100 Biological Sciences pi028 Biological Sciences 0.0000 0.0000 3702.6267
2018-02-21 user114 Biological Sciences pi028 Biological Sciences 0.0000 150.3164 0.0000
2018-02-22 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics 907.3600 0.0000 0.0000
2018-02-22 user073 EN/Chemical Engineering pi021 Chemical and Biomolecular Engr 0.0000 155.7150 0.0000
2018-02-22 user081 Economics pi025 Economics 0.0000 0.0000 189.2544
2018-02-22 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 0.0000 0.0000 1751.3772
2018-02-22 user091 Civil and Environmental Engr pi027 Civil and Environmental Engr 0.0000 157.5728 0.0000
2018-02-22 user100 Biological Sciences pi028 Biological Sciences 0.0000 0.0000 2735.9556
2018-02-22 user111 Biological Sciences pi028 Biological Sciences 0.0000 0.0000 169.7850
2018-02-22 user112 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 252.6211
2018-02-22 user114 Biological Sciences pi028 Biological Sciences 0.0000 5686.1175 0.0000
2018-02-22 user125 Mechanical Engr and Mechanics pi029 Mechanical Engr and Mechanics 6336.7700 0.0000 3168.2078
2018-02-23 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 115.2444 0.0000 0.0000
2018-02-23 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics 6144.6400 0.0000 0.0000
2018-02-23 user073 EN/Chemical Engineering pi021 Chemical and Biomolecular Engr 0.0000 248.4239 0.0000
2018-02-23 user074 EN/ pi021 Chemical and Biomolecular Engr 0.0000 854.2564 0.0000
2018-02-23 user081 Economics pi025 Economics 0.0000 0.0000 152.5422
2018-02-23 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 0.0000 0.0000 405.5761
2018-02-23 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 0.0000 0.0000 2215.1000
2018-02-23 user091 Civil and Environmental Engr pi027 Civil and Environmental Engr 0.0000 154.8761 0.0000
2018-02-23 user100 Biological Sciences pi028 Biological Sciences 0.0000 0.0000 1528.8800
2018-02-23 user103 Biological Sciences pi028 Biological Sciences 0.0000 432.0683 0.0000
2018-02-23 user112 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 321.4444
2018-02-23 user114 Biological Sciences pi028 Biological Sciences 0.0000 5970.8617 0.0000
2018-02-24 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 2035.7867 0.0000 0.0000
2018-02-24 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics 5703.8933 0.0000 0.0000
2018-02-24 user074 EN/ pi021 Chemical and Biomolecular Engr 0.0000 581.0139 0.0000
2018-02-24 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 0.0000 0.0000 2625.7922
2018-02-24 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 0.0000 0.0000 381.0533
2018-02-24 user091 Civil and Environmental Engr pi027 Civil and Environmental Engr 0.0000 0.0000 176.6278
2018-02-24 user100 Biological Sciences pi028 Biological Sciences 0.0000 0.0000 1036.1956
2018-02-24 user114 Biological Sciences pi028 Biological Sciences 0.0000 6800.2386 0.0000
2018-02-24 user125 Mechanical Engr and Mechanics pi029 Mechanical Engr and Mechanics 0.0000 0.0000 2112.1833
2018-02-25 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 991.0767 0.0000 0.0000
2018-02-25 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics 3072.4622 0.0000 0.0000
2018-02-25 user074 EN/ pi021 Chemical and Biomolecular Engr 0.0000 300.4897 0.0000
2018-02-25 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics 0.0000 3936.7806 0.0000
2018-02-25 user098 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 3519.5467
2018-02-25 user100 Biological Sciences pi028 Biological Sciences 0.0000 0.0000 3297.0222
2018-02-25 user103 Biological Sciences pi028 Biological Sciences 0.0000 426.7639 0.0000
2018-02-25 user112 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 1637.4294
2018-02-25 user114 Biological Sciences pi028 Biological Sciences 0.0000 1558.2203 0.0000
2018-02-26 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 1642.4333 0.0000 0.0000
2018-02-26 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics 4608.2133 0.0000 0.0000
2018-02-26 user074 EN/ pi021 Chemical and Biomolecular Engr 0.0000 143.6639 0.0000
2018-02-26 user077 EN/Mechanical Engineering pi023 Mechanical Engr and Mechanics 0.0000 353.1256 0.0000
2018-02-26 user093 Biological Sciences pi028 Biological Sciences 0.0000 274.1886 0.0000
2018-02-26 user100 Biological Sciences pi028 Biological Sciences 0.0000 0.0000 1818.3689
2018-02-26 user114 Biological Sciences pi028 Biological Sciences 0.0000 1659.5142 0.0000
2018-02-27 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics 733.2800 0.0000 0.0000
2018-02-27 user074 EN/ pi021 Chemical and Biomolecular Engr 0.0000 176.6083 0.0000
2018-02-27 user081 Economics pi025 Economics 0.0000 0.0000 454.8911
2018-02-27 user093 Biological Sciences pi028 Biological Sciences 0.0000 2961.7306 0.0000
2018-02-27 user098 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 3036.5000
2018-02-27 user100 Biological Sciences pi028 Biological Sciences 0.0000 0.0000 768.0711
2018-02-27 user103 Biological Sciences pi028 Biological Sciences 0.0000 432.0292 0.0000
2018-02-27 user114 Biological Sciences pi028 Biological Sciences 0.0000 2208.2944 0.0000
2018-02-28 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics 5490.6844 0.0000 0.0000
2018-02-28 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 596.0600 0.0000 2047.5528
2018-02-28 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 0.0000 0.0000 1909.3133
2018-02-28 user093 Biological Sciences pi028 Biological Sciences 0.0000 4081.5022 0.0000
2018-02-28 user114 Biological Sciences pi028 Biological Sciences 0.0000 8832.5167 0.0000
2018-02-28 user125 Mechanical Engr and Mechanics pi029 Mechanical Engr and Mechanics 0.0000 0.0000 2113.3567
2018-03-01 user006 EN/Mechanical Engineering pi001 Mechanical Engr and Mechanics 2026.1033 0.0000 0.0000
2018-03-01 user056 EN/Mechanical Engineering pi014 Mechanical Engr and Mechanics 3072.3733 0.0000 0.0000
2018-03-01 user073 EN/Chemical Engineering pi021 Chemical and Biomolecular Engr 0.0000 112.1753 0.0000
2018-03-01 user083 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 0.0000 0.0000 2295.3150
2018-03-01 user088 EN/Chemical Engineering pi026 Chemical and Biomolecular Engr 0.0000 0.0000 892.5667
2018-03-01 user093 Biological Sciences pi028 Biological Sciences 0.0000 9942.6639 0.0000
2018-03-01 user098 AS/Biochemistry (CAS) pi028 Biological Sciences 0.0000 0.0000 3024.2333
2018-03-01 user100 Biological Sciences pi028 Biological Sciences 0.0000 111.9161 326.6733
2018-03-01 user103 Biological Sciences pi028 Biological Sciences 0.0000 682.3461 0.0000

Other Tidyr functions

  • separate(): Splitting a single variable into two
daily %>% 
   select(c(Department,Day,Total)) %>% 
   separate(Day,c("Year","Month","Day"),sep="-") -> tmp
head(tmp)
## # A tibble: 6 x 5
##   Department                    Year  Month Day   Total
##   <chr>                         <chr> <chr> <chr> <dbl>
## 1 EN/Mechanical Engineering     2017  10    01        0
## 2 Mechanical Engr and Mechanics 2017  10    01        0
## 3 EN/Mechanical Engineering     2017  10    01        0
## 4 EN/Mechanical Engineering     2017  10    01        0
## 5 EN/Mechanical Engineering     2017  10    01        0
## 6 EN/Mechanical Engineering     2017  10    01        0
  • unite(): Merging two variables into one
tmp %>%
  unite(Day,c("Year","Month","Day"),sep="/") %>%
  tail
## # A tibble: 6 x 3
##   Department                     Day        Total
##   <chr>                          <chr>      <dbl>
## 1 Biological Sciences            2018/09/30     0
## 2 Biological Sciences            2018/09/30     0
## 3 EN/Computer Science (EN)       2018/09/30     0
## 4 Chemical and Biomolecular Engr 2018/09/30     0
## 5 Mechanical Engr and Mechanics  2018/09/30     0
## 6 AS/Applied Mathematics         2018/09/30     0

What more can be done with R?

  • Data Visualization
  • Data cleaning/preprocessing
  • Profiling and debugging
  • Regression Models
  • Machine learning/Data Mining
  • ···

Data Visualization

  • Data visualization or data visualisation is viewed by many disciplines as a modern equivalent of visual communication.
  • It involves the creation and study of the visual representation of data.
  • A primary goal of data visualization is to communicate information clearly and efficiently via statistical graphics, plots and information graphics.
  • Data visualization is both an art and a science.
  • More details in next weeks seminar

Bar Charts

p <- monthlystatus %>%
  ggplot(aes(x=Status,y=Total)) + geom_col()
p

plot of chunk unnamed-chunk-53

p + coord_flip()

plot of chunk unnamed-chunk-54

Bar Charts Monthly Usage

p <- monthlyusage %>%
  ggplot(aes(Month,Percent)) + geom_col()
p

plot of chunk unnamed-chunk-55

  • Add Plot Title and Caption, and x and y labels
p + labs(title="Sol Usage", y="Percent", x="Month", caption="AY 2016-17")

plot of chunk unnamed-chunk-56

Line Charts

p <- daily %>%
  group_by(Day, Status=trimws(Status)) %>%
  summarize(Total=round(sum(as.double(Total)),2),Jobs=round(sum(as.double(TotalJ)))) %>%
  ggplot(aes(Day,Total)) + geom_line(aes(col = Status))
p

plot of chunk unnamed-chunk-57

Line Charts (contd)

Plot is very busy. There are several options to clean this up.

  • summarize by week or month
  • take a running average or add a smoothing function
  • create separate plots for each Department using facet_wrap
p + facet_wrap( ~Status, scales = "free", ncol = 2) + theme(legend.position='none')

plot of chunk unnamed-chunk-58

Animations

If a Picture is Worth a Thousand Words, Then Is a Video Worth a Million?

  • What is an animation really?
    • Just a collection of images that appear at a high frequency or frame rate.
  • If you have a collection of pictures, you can convert them to gif, mpeg, or any other video format using tools like ImageMagick or ffmpeg.
  • R provides tools that will convert a collection of images from plots to video provided you have one of these conversion tools.
if(!require('animation')){
    install.packages('animation')
}
## Loading required package: animation
if(!require('gganimate')){
    install.packages('gganimate')
    install.packages('gifski')
    install.packages('png')
}
## Loading required package: gganimate

Usage by Status

dailyusage_status <- daily %>%
  group_by(Day=floor_date(as.Date(Day), "week"), Status) %>%
  summarize(Total=round(sum(as.double(Total)),2),
            Jobs=round(sum(as.double(TotalJ)))) %>%
  ggplot(aes(Day,Total,group=Status)) + 
  geom_line(aes(col = Status)) +
  labs(title = 'Week: {frame_along}', x = 'Month', y = 'Usage', color = 'Status') +
  transition_reveal(along = Day)
anim <- animate(dailyusage_status, height = 300, width = 640)
anim_save("weeklystatus.gif", anim)

Animations (contd)

Usage by Users Status

Usage by PI Department

dailyusage_pidept <- daily %>%
  group_by(Day=floor_date(as.Date(Day), "week"), PIDept) %>%
  summarize(Total=round(sum(as.double(Total)),2),
            Jobs=round(sum(as.double(TotalJ)))) %>%
  ggplot(aes(Day,Total,group=PIDept)) + 
  geom_line(aes(col = PIDept)) +
  facet_wrap( ~PIDept, scales = "free", ncol = 3) + 
  theme(legend.position='none') + 
  labs(title = 'Week: {frame_along}', x = 'Month', y = 'Usage', color = 'Department') +
  transition_reveal(along = Day)
anim <- animate(dailyusage_pidept, height = 640, width = 960)
anim_save("weeklypidept.gif",anim)

Animations (contd)

Usage by PI Department{width=900px}

Jobs completed per day

dailyjobs <- daily %>% 
  select(c(Day,Total,Jobs=TotalJ)) %>% 
  separate(Day,c("Year","Month","Day"),sep="-", convert = TRUE) %>%
  group_by(Month,Day) %>%
  summarize(Total=round(sum(as.double(Total)),2),
            Jobs=round(sum(as.double(Jobs)))) %>%
  ggplot(aes(Day,Jobs,group = Month, color=Month)) +
  geom_line() + 
  scale_color_gradientn(colors=rainbow(12)) +
  geom_segment(aes(xend = 31, yend = Jobs), linetype = 2, color = 'grey') +
  geom_point(size = 2) + 
  geom_text(aes(x = 31.1, label = month(Month, label = TRUE)), hjust = 0)  + 
  transition_reveal(Day) + 
  coord_cartesian(clip = 'off') + 
  scale_y_log10() +
  labs(title = 'Day: {frame_along}', y = 'Jobs') + 
  theme_minimal() + theme(legend.position = 'none')
animate(dailyjobs, height = 640, width = 960)
anim <- animate(dailyjobs, height = 600, width = 960)
anim_save("dailyjobs.gif",anim)

Animations (contd)

Jobs completed per day

Learning R

Data Analysis with Reporting

  • Typical data analysis workflow involves
    • Obtaining the data
    • Cleaning and preprocessing the data
    • Analyzing the data
    • Generating a report
  • knitr is a R package that allows one to generate dynamic report by weaving R code and human readable texts together
    • It uses the markdown syntax
    • The output can be HTML, PDF or (even) Word
  • slidify is a R package that allows one to create a HTML presentation
    • You are now at the end of a slidify presentation

Creating presentations using Slidify

  • Install the devtools package and load it
install.packages('devtools')
library(devtools)
  • Install the slidify and slidifyLibraries package from github
install_git('git://github.com/ramnathv/slidify')
install_git('git://github.com/ramnathv/slidifyLibraries')
  • Load the slidify library
library(slidify)
  • Create a Slide desk
author("myslides")

Creating presentations using Slidify (contd)

  • This will create a folder called myslides with files and subdirectories to create your presentation
    • assets/css/custom.css: Create your own custom css
    • assets/layouts/: Don't like the default layouts, create your own in this directory
    • libraries: files that slidify create. Do not edit the files, copy the file to the assets directory and modify it.
  • To edit your presentation, edit the index.Rmd file using R Markdown
  • To create slides, in the R console run the command
slidify('index.Rmd')``
# View the presentation in a web browser
browserURL('index.html')
  • Do a Google search for slidify to learn more and/or see example slides.

Creating presentations using Slidify (contd)

  • To use my template
git clone https://gogs.cc.lehigh.edu/alp514/slidify
  • Edit the index.Rmd or create a new .Rmd file
  • OR just overwrite the assets folder in your myslides folder with the one from the git repository you just cloned
  • The git repository contains a script compile.R that will compile the R markdown file (for e.g. index.Rmd) into a html file (for e.g. index.html)
chmod +x compile.R
./compile.R index