Skip to content
Open
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# github-practice

BoomChicaBoomBoom

Practice using Git & Github

* Fork a version of this repository to your Github account
Expand Down
36 changes: 36 additions & 0 deletions Rmarkdown001.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: "myfristmarkdown"
author: "bakian"
date: "9/9/2020"
output: html_document
---

```{r}

```



```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

## R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.

When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

```{r cars}
summary(cars)
```

## Including Plots

You can also embed plots, for example:

```{r pressure, echo=FALSE}
plot(pressure)
```

Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.
29 changes: 29 additions & 0 deletions Rnotebook001.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: "R Notebook"
output: html_notebook
---

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 *Ctrl+Shift+Enter*.

```{r}
plot(cars)
my_data <- cars

```

Add a new chunk by clicking the *Insert Chunk* button on the toolbar or by pressing *Ctrl+Alt+I*.

When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the *Preview* button or press *Ctrl+Shift+K* to preview the HTML file).

The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike *Knit*, *Preview* does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.


```{r}

```




70 changes: 70 additions & 0 deletions Rnotebook002.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: "R Notebook"
output: html_notebook
---

---
# Source Videos
---
#https://www.youtube.com/watch?v=gCAwHbmOqCo
#https://www.youtube.com/watch?v=1QYgccXBtrI



### Load Libraries

```{r}
library(ggplot2)
```

# Plots {.tabset}

## Scatter Plot No Title

```{r}
d21 <- (iris)

ggplot(iris)


d22 <- ggplot(iris, aes(Sepal.Length, Petal.Length))
d22 + geom_point()


d23 <- ggplot(iris, aes(Sepal.Length, Petal.Length, color=Species))
d24 <- (d23 + geom_point())

print(d24)

```

## Scatter Plot with Title
```{r}
d24 + labs(title = "My Scatter Plot")
```


## Scatter Plot with Title and Axis Labels
```{r}
d24 + labs(title = "My Scatter Plot", x="Sepal Length", y="Petal Length")
```



# New Stuff {.tabset}

Talk about it

## 2nd Level Header

Idea

## New Tab Again

Idea 2






1,880 changes: 1,880 additions & 0 deletions Rnotebook002.nb.html

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions Rscript001.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#https://www.youtube.com/watch?v=rKvybSJ4nM0

library(tidyverse)

grades1 <- data.frame(
First = c("Mark", "Dave", "Jackie"),
Last = c("Gingrass", "Doe", "Smith"),
Grade = c(94, 79, 68)
)

grades2 <- tibble(
First = c("Mark", "Dave", "Jackie"),
Last = c("Gingrass", "Doe", "Smith"),
Grade = c(94, 79, 68)
)


grades3 <- tribble(
~First, ~Last, ~Grade,
"Mark", "Gingrass", "94",
"Dave", "Doe", "79",
"Jackie", "Smith", "68"
)

22 changes: 22 additions & 0 deletions Rscript002.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#https://www.youtube.com/watch?v=yDZljicdLAk

library(tidyverse)

people <- tribble(
~Name,
"Berj Akian",
"Stan Watts",
"George Perreault"
)

#people %>%
# separate(Name, into = c("First", "Last"), sep = "/") -> people2



people %>%
separate(Name, into = c("First", "Last"), sep = c(" ")) %>%
head(1)



24 changes: 24 additions & 0 deletions Rscript003.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#https://www.youtube.com/watch?v=wkHLIWiGLyI

bucket <- c(1,2,3,4,5,6)

s1 <- sample(bucket, 50, replace = TRUE)

s2 <- sample(bucket, 5, replace = FALSE)

s3 <- sample(runif(20, min = 10, max = 20), 3000, replace = TRUE)


r_num <- runif(20, min = 10, max = 20)
s4 <- sample(r_num, 3000, replace = TRUE)



hist(s1)

hist(s2)

hist(s3)

hist(s4)

43 changes: 43 additions & 0 deletions Rscript004.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#https://www.youtube.com/watch?v=gCAwHbmOqCo

library(ggplot2)

---
#diamonds dataset
---
View(diamonds)
dim(diamonds)
ggplot(diamonds)

ggplot(diamonds, aes(carat, price))

d01 <- ggplot(diamonds, aes(carat,price))
d01 + geom_point()


d02 <- ggplot(diamonds, aes(carat,price,color=cut))
d02 + geom_point()


d03 <- ggplot(diamonds, aes(carat,price,color=color))
d03 + geom_point()

---
#iris dataset
---

View(iris)
dim(iris)
ggplot(iris)

ggplot(iris)

ggplot(iris, aes(Sepal.Length,Petal.Length))

d11 <- ggplot(iris, aes(Sepal.Length,Petal.Length))
d11 + geom_point()


d12 <- ggplot(iris, aes(Sepal.Length,Petal.Length,color=Species))
d12 + geom_point()

Binary file added desktop.ini
Binary file not shown.
13 changes: 13 additions & 0 deletions github-practice.Rproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX