Skip to content
Snippets Groups Projects
Commit 81165828 authored by Andrew Woodruff's avatar Andrew Woodruff
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
# BSGP 7030 Jupyter Notebook - Linear Modeling Scripts: R
## This repository is for the Jupyter Notebook - Linear Modeling Scripts assignment, specifically for R files! It will contain two .png files and a .r file, along with this README.md!
To launch the MyBinder notebook (utilizing Python 3.7.7 and R 3.5.3) used to generate these files, please click on the badge icon below of your choice:
- Launch in Jupyter: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/git/https%3A%2F%2Fcode.osu.edu%2Fwoodruff.207%2Fr_with_python/py37_r353)
- Launch in Jupyter Lab: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/git/https%3A%2F%2Fcode.osu.edu%2Fwoodruff.207%2Fr_with_python/py37_r353?urlpath=lab)
- Launch in RStudio: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/git/https%3A%2F%2Fcode.osu.edu%2Fwoodruff.207%2Fr_with_python/py37_r353?urlpath=rstudio)
Following this, to clone this repository into the MyBinder notebook, input the following into the terminal:
git clone https://code.osu.edu/woodruff.207/jupyter_assignment2_r.git
\ No newline at end of file
args = commandArgs(trailingOnly=TRUE)
df = read.csv(args[1],header=TRUE, stringsAsFactors=FALSE)
head(df)
cat("...","\n")
tail(df)
cat("\n")
summary(df)
cat("\n","Saving the original figure...","\n")
png("r_orig.png")
plot(df$x, df$y)
dev.off()
relation <- lm(df$y~df$x)
relation
cat("Saving the linear modeling figure...","\n")
png("r_lm.png")
plot(df$x,df$y)
abline(relation)
dev.off()
\ No newline at end of file
.ipynb_checkpoints/r_lm-checkpoint.png

7.16 KiB

.ipynb_checkpoints/r_orig-checkpoint.png

5.64 KiB

# BSGP 7030 Jupyter Notebook - Linear Modeling Scripts: R
## This repository is for the Jupyter Notebook - Linear Modeling Scripts assignment, specifically for R files! It will contain two .png files and a .r file, along with this README.md!
To launch the MyBinder notebook (utilizing Python 3.7.7 and R 3.5.3) used to generate these files, please click on the badge icon below of your choice:
- Launch in Jupyter: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/git/https%3A%2F%2Fcode.osu.edu%2Fwoodruff.207%2Fr_with_python/py37_r353)
- Launch in Jupyter Lab: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/git/https%3A%2F%2Fcode.osu.edu%2Fwoodruff.207%2Fr_with_python/py37_r353?urlpath=lab)
- Launch in RStudio: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/git/https%3A%2F%2Fcode.osu.edu%2Fwoodruff.207%2Fr_with_python/py37_r353?urlpath=rstudio)
Following this, to clone this repository into the MyBinder notebook, input the following into the terminal:
git clone https://code.osu.edu/woodruff.207/jupyter_assignment2_r.git
\ No newline at end of file
args = commandArgs(trailingOnly=TRUE)
df = read.csv(args[1],header=TRUE, stringsAsFactors=FALSE)
head(df)
cat("...","\n")
tail(df)
cat("\n")
summary(df)
cat("\n","Saving the original figure...","\n")
png("r_orig.png")
plot(df$x, df$y)
dev.off()
relation <- lm(df$y~df$x)
relation
cat("Saving the linear modeling figure...","\n")
png("r_lm.png")
plot(df$x,df$y)
abline(relation)
dev.off()
\ No newline at end of file
r_lm.png 0 → 100644
r_lm.png

7.16 KiB

r_orig.png

5.64 KiB

y,x
6.8102,9.8492
9.8437,11.1450
4.9767,5.1209
5.0006,8.1085
3.5047,3.5599
3.6419,1.9883
7.8725,15.5322
5.1442,7.5202
8.3883,14.0202
6.8204,7.5226
9.0185,14.3272
2.6148,3.8950
3.7367,1.8707
2.8651,0.8347
10.7469,18.3413
2.3710,1.6645
9.6653,17.0579
7.1926,9.2375
11.7833,21.0000
3.9537,3.5286
15.0000,25.0000
7.9152,9.9008
9.3368,17.5990
8.7587,13.8790
6.7813,10.8690
7.9924,12.6238
2.2806,0.9719
10.4050,14.4814
3.7891,2.1792
10.9067,18.4052
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment