Skip to content
Open

kwd #17

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions kwd.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: "R-Beyond the Basics"
author: "fangxingyu"
date: "Feb 6th, 2018"
output:
html_notebook:
theme: cosmo
toc: yes
toc_float: yes
pdf_document:
toc: yes
---

This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. When you execute code within the notebook, the results appear beneath the code.

Try executing this chunk by clicking the *Run* button within the chunk or by placing your cursor inside it and pressing *Cmd+Shift+Enter*.



##Part 1: Import the data
###Read in the data transactions.csv. ####
```{r}
transactions <- fread("data/transactions.csv")
```
###Change dates
```{r}
transactions[, TransDate:=dmy(TransDate, tz="UTC")]
```
###Check the data
```{r}
head(transactions)
str(transactions)
summary(transactions)
```


##Part 2: Aggregation of variables

###Save the latest transaction as the object now in your R environment. ####

```{r}
max.Date <- max(transactions[, TransDate])
```

1 change: 1 addition & 0 deletions print1+2.R
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print(1+2)