hw1allysonbeach

HW1

Allyson Beach
09-30-2021

Introduction

Hello everyone! My name is Allyson Beach. I have never used R before this course, but am excited to learn more about it. I am in my final semester in the CS masters program. For this first post, I will plot some simulated data.

Objective

We will create a vector through the sequence function from 1 to 10 by increments of 1 (default). We will then plot this data with ggplot2 package as a function of y = 2x.

Data

x <- seq(1, 10)
x
 [1]  1  2  3  4  5  6  7  8  9 10
y <- x*2
y
 [1]  2  4  6  8 10 12 14 16 18 20

We can also change the x data to be incremented by 2.

x <- seq(1,20, 2)
x
 [1]  1  3  5  7  9 11 13 15 17 19
y <- x*2
y
 [1]  2  6 10 14 18 22 26 30 34 38

Here we will plot the data using the ggplot2 package.

figure <- ggplot2::qplot(x,y)
show(figure)

Reuse

Text and figures are licensed under Creative Commons Attribution CC BY-NC 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".

Citation

For attribution, please cite this work as

Beach (2021, Sept. 30). DACSS 601 Fall 2021: hw1allysonbeach. Retrieved from https://mrolfe.github.io/DACSS601Fall21/posts/2021-09-30-hw1allysonbeach/

BibTeX citation

@misc{beach2021hw1allysonbeach,
  author = {Beach, Allyson},
  title = {DACSS 601 Fall 2021: hw1allysonbeach},
  url = {https://mrolfe.github.io/DACSS601Fall21/posts/2021-09-30-hw1allysonbeach/},
  year = {2021}
}