From 1803b0fad7c8c002afe3ed13c5bc522183fdf339 Mon Sep 17 00:00:00 2001 From: Emily Chen Date: Thu, 4 Nov 2021 10:13:33 -0400 Subject: [PATCH 1/4] Chen Exercise 07 --- .RData | Bin 0 -> 29803 bytes .Rhistory | 512 +++++++++++++++++++++++++++++++++++++++++++++++++++++ Rscript7.R | 28 +++ setosa.csv | 51 ++++++ 4 files changed, 591 insertions(+) create mode 100644 .RData create mode 100644 .Rhistory create mode 100644 Rscript7.R create mode 100644 setosa.csv diff --git a/.RData b/.RData new file mode 100644 index 0000000000000000000000000000000000000000..1c4984d476b94cc47d832709ae17ceb20b11b0fa GIT binary patch literal 29803 zcma&Nd4?p|EnF80=eSt`x97KO$BhD+-l zpN!u!z5nEm+LpOwK_3(PnrSJMeT;{ z+;4R4aFno*L{@6uy=L{TF!>y>06+eEK1~u2UU8ro{W^6a;iXe@{$6vNLG%%`AnZA? z4%Z-vY}K@2OTFb;{$CIJ2--)RsHr!U5{%5)k^%(A>If=(@DAQcC6O2SXhyu0-N;S? zQMjx4Wi$R1zrtSx!?ZsC89I|RpdL{dMet7|^v}(o~$R7%yc>X|xwJ3W%)oNx#XRGnd%i>_H~1jb4SNw zlg#~PIWCz&p06HM5&O*{A(j^mwI;nYP=Sa0ILE;=u}L3QvlCjV=-Z@CV&mxp+YnHe zCR^0ADvp^ltyXB}+ws&lQ@>^;V0C&+4_7 zMJ8_=D=d>YkCiWzH-)uPHESSsSvBiVs&M(Z)u?#+xXmbPIs5lf`f_&b(YNL7R-?S- z>^7sX%lr90hOkDf>W`%A0GO+gVFu`%-wJGLK0p<%N0r}8zY&!5+(C!)v^H1h$cW3) z?H2$JL=gqYWE3~~I_=s)fd@NDmZ$;rtdg3Cl37m!)nx)ea>aT~pSR&B^|22QmbK?I z8of!x0mW#4{uF-;&w?t*WYS;Y4iiobKzxianO4or+ z`2Bf?q)*C~NK(2gUvSl6PC|m~%BcT0k;W;iJ@{{-+c5=JrBWwNHrC0PB5zxhmM+=t z*u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MW4;k}X zKI-#xos2%~7<&1OXcxT$sM|+$ik_stk9{A+`nc}>A08>0uRgnE`?Yt1I3fx?f@?CDKU zcK&V}>)X7t0w?kFwvGF~N(;=xlwCRSga;w7RcN)DKhq>$Nww7I!dOmR2D+sjDsD0h zMRO!H+{u+$7`eInaci`G#&M5v7EJln^TZ{3yK_0uUpgBuq`0rfEr2u%;;g~nY^V4L zNatu?^M25-MbMdSy=^7SOX_s0wS&C-ZJ$ZzZx<5=75*yl(R=KeinE z-!3)&u9^Im95BdgyD9FY&t5e5vj@I`9x!`>P! zQ0Av<8F`_5qIA+w z4Bj`$#Xs3I9aVJ#=>3oA&^gRfziXzX@XDlShs|53^fTx+=gn{MF;zNma8(Dl_5PEw zgj*SO9D{ao#g8IiTJM}}wHTYPw!89w=_}PazI=0=D_* zvRqyOE;C@dGw1sTTpt0EQCr#zU12pGMF4J&CB$(KR@)?+84TSAR0BF~7OMO@A?}8U99Nuk zj)P?Nd#)S#t$4k4_4O%HtfQ^G@duDh6H*`rUc_^w<8ZSL!*gn2$s4i-v+NB`< z&`U4qnc_c9SG}8`kC_?hdDo2$KxRv$j(UDU?y$y~7cM1LVzuYzNjO^Xoh_a%0lsjb zSpb}ofj2?G8Gn>WE}I*5w3C4#z1wZChvtz>=FkF~naG-@IJ%Clbe@Z0xth_-jE!_` zGimtOMKlh1FEwU*)3ZDq7A&ZGDS@IpY~H9mARnZUT6tETPT+U&$1f`i)#1%|8;`$x zK+*JbXOpq0Fy$)=9@zk8BG5iMM-0p3@wX3c)5*LfsLx;K90A4~PN#fNo2)L;zLUBC Siq9^ur7XL@8+%1@?SBELwlJ*# literal 0 HcmV?d00001 diff --git a/.Rhistory b/.Rhistory new file mode 100644 index 0000000..4350f01 --- /dev/null +++ b/.Rhistory @@ -0,0 +1,512 @@ +O[i] = O[i-1]+Supply-Demand +} +# second simulation model inputs +O2 = O #results of the second simulation of muscle oxygen content +Hrate = 135 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE +Alevel = 2.5 # 1 for rest and >2 for exercise; activity level of skeletal muscle +for(i in 2:length(O)){ +Supply = Oblood*Hrate*f*b*(1-O2[i-1]/Omax) +Demand = Odemand*Alevel +O2[i] = O2[i-1]+Supply-Demand +} +# plot the results of each simulation to compare the change in muscle oxygen content over time +# depending on the input heart rate and activity level +# https://www.datacamp.com/community/tutorials/15-questions-about-r-plots +plot(O, type='l', xlab="Timestep (minute)", ylab="Oxygen Content (mg O2/100ml)", ylim=c(0, 10)) # first simulation results, line colored black +lines(O2, col='red') # second simulation results, line colored red +abline(h=1.2, lty=3) # draw a horizontal line at 1.2 = 1/(273*8.3e3)*1000*100*32; this assumes 100 ml skeletal muscle +legend("top", bty="n", inset=0, legend=c("Resting", "Active"), col=c("black", "red"), lty=1:1, cex=0.8, horiz = TRUE) +# model for simulating muscle oxygen content depending on activity level (exercise) and heart rate +# model parameters; https://data-flair.training/blogs/r-vector/ +# 1 ml O2 is 1.43 mg O2 at Standard Temperature and Pressure +Oblood = 0.2*1.43 # mg O2 (ml blood)-1 +f = 0.7 # maximum fraction of oxygen transfered from blood to tissue +b = 0.0357 # ml blood /(beat 100 ml muscle)-1 +Odemand = 0.11*1.43 # mg O2 (100 ml muscle minute)-1 +Omax = 10 # max oxygen content in mg O2/100ml +timesteps = 120 # run each simulation for 120 timesteps (minutes) +O = numeric(timesteps) # vector for the results of the simulations of muscle oxygen content +O[1] = 5 # initial oxygen content for the models is 5 mg O2/100ml +# multiple model simulations follow to calculate muscle oxygen content +# with different input heart rates and activity levels for 120 minutes each; https://campus.datacamp.com/courses/intermediate-r-for-finance/loops-3?ex=9 +# and an initial muscle oxygen content of 5 mg O2 +# muscle oxygen content is updated each minute based on previous muscle oxygen content +# first simulation model inputs +Hrate = 68 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE +Alevel = 1 # 1 for rest and >2 for exercise; activity level of skeletal muscle +for(i in 2:length(O)){ +Supply = Oblood*Hrate*f*b*(1-O[i-1]/Omax) +Demand = Odemand*Alevel +O[i] = O[i-1]+Supply-Demand +} +# second simulation model inputs +O2 = O #results of the second simulation of muscle oxygen content +Hrate = 145 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE +Alevel = 2.5 # 1 for rest and >2 for exercise; activity level of skeletal muscle +for(i in 2:length(O)){ +Supply = Oblood*Hrate*f*b*(1-O2[i-1]/Omax) +Demand = Odemand*Alevel +O2[i] = O2[i-1]+Supply-Demand +} +# plot the results of each simulation to compare the change in muscle oxygen content over time +# depending on the input heart rate and activity level +# https://www.datacamp.com/community/tutorials/15-questions-about-r-plots +plot(O, type='l', xlab="Timestep (minute)", ylab="Oxygen Content (mg O2/100ml)", ylim=c(0, 10)) # first simulation results, line colored black +lines(O2, col='red') # second simulation results, line colored red +abline(h=1.2, lty=3) # draw a horizontal line at 1.2 = 1/(273*8.3e3)*1000*100*32; this assumes 100 ml skeletal muscle +legend("top", bty="n", inset=0, legend=c("Resting", "Active"), col=c("black", "red"), lty=1:1, cex=0.8, horiz = TRUE) +# model for simulating muscle oxygen content depending on activity level (exercise) and heart rate +# model parameters; https://data-flair.training/blogs/r-vector/ +# 1 ml O2 is 1.43 mg O2 at Standard Temperature and Pressure +Oblood = 0.2*1.43 # mg O2 (ml blood)-1 +f = 0.7 # maximum fraction of oxygen transfered from blood to tissue +b = 0.0357 # ml blood /(beat 100 ml muscle)-1 +Odemand = 0.11*1.43 # mg O2 (100 ml muscle minute)-1 +Omax = 10 # max oxygen content in mg O2/100ml +timesteps = 120 # run each simulation for 120 timesteps (minutes) +O = numeric(timesteps) # vector for the results of the simulations of muscle oxygen content +O[1] = 5 # initial oxygen content for the models is 5 mg O2/100ml +# multiple model simulations follow to calculate muscle oxygen content +# with different input heart rates and activity levels for 120 minutes each; https://campus.datacamp.com/courses/intermediate-r-for-finance/loops-3?ex=9 +# and an initial muscle oxygen content of 5 mg O2 +# muscle oxygen content is updated each minute based on previous muscle oxygen content +# first simulation model inputs +Hrate = 68 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE +Alevel = 1 # 1 for rest and >2 for exercise; activity level of skeletal muscle +for(i in 2:length(O)){ +Supply = Oblood*Hrate*f*b*(1-O[i-1]/Omax) +Demand = Odemand*Alevel +O[i] = O[i-1]+Supply-Demand +} +# second simulation model inputs +O2 = O #results of the second simulation of muscle oxygen content +Hrate = 150 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE +Alevel = 2.5 # 1 for rest and >2 for exercise; activity level of skeletal muscle +for(i in 2:length(O)){ +Supply = Oblood*Hrate*f*b*(1-O2[i-1]/Omax) +Demand = Odemand*Alevel +O2[i] = O2[i-1]+Supply-Demand +} +# plot the results of each simulation to compare the change in muscle oxygen content over time +# depending on the input heart rate and activity level +# https://www.datacamp.com/community/tutorials/15-questions-about-r-plots +plot(O, type='l', xlab="Timestep (minute)", ylab="Oxygen Content (mg O2/100ml)", ylim=c(0, 10)) # first simulation results, line colored black +lines(O2, col='red') # second simulation results, line colored red +abline(h=1.2, lty=3) # draw a horizontal line at 1.2 = 1/(273*8.3e3)*1000*100*32; this assumes 100 ml skeletal muscle +legend("top", bty="n", inset=0, legend=c("Resting", "Active"), col=c("black", "red"), lty=1:1, cex=0.8, horiz = TRUE) +# model for simulating muscle oxygen content depending on activity level (exercise) and heart rate +# model parameters; https://data-flair.training/blogs/r-vector/ +# 1 ml O2 is 1.43 mg O2 at Standard Temperature and Pressure +Oblood = 0.2*1.43 # mg O2 (ml blood)-1 +f = 0.7 # maximum fraction of oxygen transfered from blood to tissue +b = 0.0357 # ml blood /(beat 100 ml muscle)-1 +Odemand = 0.11*1.43 # mg O2 (100 ml muscle minute)-1 +Omax = 10 # max oxygen content in mg O2/100ml +timesteps = 120 # run each simulation for 120 timesteps (minutes) +O = numeric(timesteps) # vector for the results of the simulations of muscle oxygen content +O[1] = 5 # initial oxygen content for the models is 5 mg O2/100ml +# multiple model simulations follow to calculate muscle oxygen content +# with different input heart rates and activity levels for 120 minutes each; https://campus.datacamp.com/courses/intermediate-r-for-finance/loops-3?ex=9 +# and an initial muscle oxygen content of 5 mg O2 +# muscle oxygen content is updated each minute based on previous muscle oxygen content +# first simulation model inputs +Hrate = 68 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE +Alevel = 1 # 1 for rest and >2 for exercise; activity level of skeletal muscle +for(i in 2:length(O)){ +Supply = Oblood*Hrate*f*b*(1-O[i-1]/Omax) +Demand = Odemand*Alevel +O[i] = O[i-1]+Supply-Demand +} +# second simulation model inputs +O2 = O #results of the second simulation of muscle oxygen content +Hrate = 155 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE +Alevel = 2.5 # 1 for rest and >2 for exercise; activity level of skeletal muscle +for(i in 2:length(O)){ +Supply = Oblood*Hrate*f*b*(1-O2[i-1]/Omax) +Demand = Odemand*Alevel +O2[i] = O2[i-1]+Supply-Demand +} +# plot the results of each simulation to compare the change in muscle oxygen content over time +# depending on the input heart rate and activity level +# https://www.datacamp.com/community/tutorials/15-questions-about-r-plots +plot(O, type='l', xlab="Timestep (minute)", ylab="Oxygen Content (mg O2/100ml)", ylim=c(0, 10)) # first simulation results, line colored black +lines(O2, col='red') # second simulation results, line colored red +abline(h=1.2, lty=3) # draw a horizontal line at 1.2 = 1/(273*8.3e3)*1000*100*32; this assumes 100 ml skeletal muscle +legend("top", bty="n", inset=0, legend=c("Resting", "Active"), col=c("black", "red"), lty=1:1, cex=0.8, horiz = TRUE) +# model for simulating muscle oxygen content depending on activity level (exercise) and heart rate +# model parameters; https://data-flair.training/blogs/r-vector/ +# 1 ml O2 is 1.43 mg O2 at Standard Temperature and Pressure +Oblood = 0.2*1.43 # mg O2 (ml blood)-1 +f = 0.7 # maximum fraction of oxygen transfered from blood to tissue +b = 0.0357 # ml blood /(beat 100 ml muscle)-1 +Odemand = 0.11*1.43 # mg O2 (100 ml muscle minute)-1 +Omax = 10 # max oxygen content in mg O2/100ml +timesteps = 120 # run each simulation for 120 timesteps (minutes) +O = numeric(timesteps) # vector for the results of the simulations of muscle oxygen content +O[1] = 5 # initial oxygen content for the models is 5 mg O2/100ml +# multiple model simulations follow to calculate muscle oxygen content +# with different input heart rates and activity levels for 120 minutes each; https://campus.datacamp.com/courses/intermediate-r-for-finance/loops-3?ex=9 +# and an initial muscle oxygen content of 5 mg O2 +# muscle oxygen content is updated each minute based on previous muscle oxygen content +# first simulation model inputs +Hrate = 68 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE +Alevel = 1 # 1 for rest and >2 for exercise; activity level of skeletal muscle +for(i in 2:length(O)){ +Supply = Oblood*Hrate*f*b*(1-O[i-1]/Omax) +Demand = Odemand*Alevel +O[i] = O[i-1]+Supply-Demand +} +# second simulation model inputs +O2 = O #results of the second simulation of muscle oxygen content +Hrate = 160 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE +Alevel = 2.5 # 1 for rest and >2 for exercise; activity level of skeletal muscle +for(i in 2:length(O)){ +Supply = Oblood*Hrate*f*b*(1-O2[i-1]/Omax) +Demand = Odemand*Alevel +O2[i] = O2[i-1]+Supply-Demand +} +# plot the results of each simulation to compare the change in muscle oxygen content over time +# depending on the input heart rate and activity level +# https://www.datacamp.com/community/tutorials/15-questions-about-r-plots +plot(O, type='l', xlab="Timestep (minute)", ylab="Oxygen Content (mg O2/100ml)", ylim=c(0, 10)) # first simulation results, line colored black +lines(O2, col='red') # second simulation results, line colored red +abline(h=1.2, lty=3) # draw a horizontal line at 1.2 = 1/(273*8.3e3)*1000*100*32; this assumes 100 ml skeletal muscle +legend("top", bty="n", inset=0, legend=c("Resting", "Active"), col=c("black", "red"), lty=1:1, cex=0.8, horiz = TRUE) +# model for simulating muscle oxygen content depending on activity level (exercise) and heart rate +# model parameters; https://data-flair.training/blogs/r-vector/ +# 1 ml O2 is 1.43 mg O2 at Standard Temperature and Pressure +Oblood = 0.2*1.43 # mg O2 (ml blood)-1 +f = 0.7 # maximum fraction of oxygen transfered from blood to tissue +b = 0.0357 # ml blood /(beat 100 ml muscle)-1 +Odemand = 0.11*1.43 # mg O2 (100 ml muscle minute)-1 +Omax = 10 # max oxygen content in mg O2/100ml +timesteps = 120 # run each simulation for 120 timesteps (minutes) +O = numeric(timesteps) # vector for the results of the simulations of muscle oxygen content +O[1] = 5 # initial oxygen content for the models is 5 mg O2/100ml +# multiple model simulations follow to calculate muscle oxygen content +# with different input heart rates and activity levels for 120 minutes each; https://campus.datacamp.com/courses/intermediate-r-for-finance/loops-3?ex=9 +# and an initial muscle oxygen content of 5 mg O2 +# muscle oxygen content is updated each minute based on previous muscle oxygen content +# first simulation model inputs +Hrate = 68 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE +Alevel = 1 # 1 for rest and >2 for exercise; activity level of skeletal muscle +for(i in 2:length(O)){ +Supply = Oblood*Hrate*f*b*(1-O[i-1]/Omax) +Demand = Odemand*Alevel +O[i] = O[i-1]+Supply-Demand +} +# second simulation model inputs +O2 = O #results of the second simulation of muscle oxygen content +Hrate = 162 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE +Alevel = 2.5 # 1 for rest and >2 for exercise; activity level of skeletal muscle +for(i in 2:length(O)){ +Supply = Oblood*Hrate*f*b*(1-O2[i-1]/Omax) +Demand = Odemand*Alevel +O2[i] = O2[i-1]+Supply-Demand +} +# plot the results of each simulation to compare the change in muscle oxygen content over time +# depending on the input heart rate and activity level +# https://www.datacamp.com/community/tutorials/15-questions-about-r-plots +plot(O, type='l', xlab="Timestep (minute)", ylab="Oxygen Content (mg O2/100ml)", ylim=c(0, 10)) # first simulation results, line colored black +lines(O2, col='red') # second simulation results, line colored red +abline(h=1.2, lty=3) # draw a horizontal line at 1.2 = 1/(273*8.3e3)*1000*100*32; this assumes 100 ml skeletal muscle +legend("top", bty="n", inset=0, legend=c("Resting", "Active"), col=c("black", "red"), lty=1:1, cex=0.8, horiz = TRUE) +# model for simulating muscle oxygen content depending on activity level (exercise) and heart rate +# model parameters; https://data-flair.training/blogs/r-vector/ +# 1 ml O2 is 1.43 mg O2 at Standard Temperature and Pressure +Oblood = 0.2*1.43 # mg O2 (ml blood)-1 +f = 0.7 # maximum fraction of oxygen transfered from blood to tissue +b = 0.0357 # ml blood /(beat 100 ml muscle)-1 +Odemand = 0.11*1.43 # mg O2 (100 ml muscle minute)-1 +Omax = 10 # max oxygen content in mg O2/100ml +timesteps = 120 # run each simulation for 120 timesteps (minutes) +O = numeric(timesteps) # vector for the results of the simulations of muscle oxygen content +O[1] = 5 # initial oxygen content for the models is 5 mg O2/100ml +# multiple model simulations follow to calculate muscle oxygen content +# with different input heart rates and activity levels for 120 minutes each; https://campus.datacamp.com/courses/intermediate-r-for-finance/loops-3?ex=9 +# and an initial muscle oxygen content of 5 mg O2 +# muscle oxygen content is updated each minute based on previous muscle oxygen content +# first simulation model inputs +Hrate = 68 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE +Alevel = 1 # 1 for rest and >2 for exercise; activity level of skeletal muscle +for(i in 2:length(O)){ +Supply = Oblood*Hrate*f*b*(1-O[i-1]/Omax) +Demand = Odemand*Alevel +O[i] = O[i-1]+Supply-Demand +} +# second simulation model inputs +O2 = O #results of the second simulation of muscle oxygen content +Hrate = 164 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE +Alevel = 2.5 # 1 for rest and >2 for exercise; activity level of skeletal muscle +for(i in 2:length(O)){ +Supply = Oblood*Hrate*f*b*(1-O2[i-1]/Omax) +Demand = Odemand*Alevel +O2[i] = O2[i-1]+Supply-Demand +} +# plot the results of each simulation to compare the change in muscle oxygen content over time +# depending on the input heart rate and activity level +# https://www.datacamp.com/community/tutorials/15-questions-about-r-plots +plot(O, type='l', xlab="Timestep (minute)", ylab="Oxygen Content (mg O2/100ml)", ylim=c(0, 10)) # first simulation results, line colored black +lines(O2, col='red') # second simulation results, line colored red +abline(h=1.2, lty=3) # draw a horizontal line at 1.2 = 1/(273*8.3e3)*1000*100*32; this assumes 100 ml skeletal muscle +legend("top", bty="n", inset=0, legend=c("Resting", "Active"), col=c("black", "red"), lty=1:1, cex=0.8, horiz = TRUE) +install.packages(c("swirl","swirlify")) +install.packages("swirl") +library("siwrl") +library("swirl") +swirl() +swirl() +swirl() +library(swirl) +swirl() +library() +swirl() +library("swirl") +swirl() +swirl() +5+7 +x <- 5 + 7 +x +y <- x - 3 +y +c(1.1, 9, 3.14) +z <- (1.1, 9, 3.14) +z <- c(1.1, 9, 3.14) +?c +z +c(z, 555, z) +z * 2 + 100 +my_sqrt <- sqrt(z-1) +swirl() +my_sqrt +my_div <- z/my_sqrt +my_div +c(1, 2, 3, 4) + c(0, 10) +c( 1, 2, 3, 4) + c(0, 10, 100) +c( 1, 2, 3, 4) + c(0, 10, 1000) +c( 1, 2, 3, 4) + c(0, 10, 1000) +info() +c( 1, 2, 3, 4) + c(0, 10, 1000) +c( 1, 2, 3, 4) + c(0, 10, 1000) +c( 1, 2, 3, 4) + c(0, 10, 1000) +c( 1, 2, 3, 4) + c(0, 10, 1000) +info() +nxt() +z * 2 + 1000 +my_div +getwd() +ls() +x <- 9 +ls() +list.files() +?list.files +args(list.files()) +args(list.files) +old.dir <- wkdir +old.dir <- list.files +old.dir <- getwd() +dir.create(testdir) +dir.create("testdir") +setwd("testdir") +file.create("mytest.R") +ls("wkdir") +ls() +list.files() +ls +file.exists("mytest.R") +file.info("mytest.R") +file.rename("mytest.R") +file.rename("mytest.R") to "mytest2.R" +file.rename("mytest.R" to "mytest2.R") +file.rename("mytest.R" "to" "mytest2.R") +file.rename(mytest.R) +?file.rename +file.rename("mytest.R", to "mytest2.R") +file.rename("mytest.R", "mytest2.R") +file.copy(mytest2.R, mytest3.R) +file.copy("mytest2.R", "mytest4.R") +file.copy("mytest2.R", "mytest3.R") +file.path("mytest3.R") +file.path("folder1") +file.path("folder1", "folder2") +?dir.create +dir.create("testdir2") file.path("testdir3") +?file.path() +dir.create("testdir2" file.path("testdir3")) +dir.create(file.path("testdir2", "testdir3") +dir.create(file.path("testdir2", "testdir3")) +dir.create(file.path("testdir2", "testdir3")) +dir.create(file.path("testdir2", "testdir3"), recursive = TRUE) +setwd() +setwd(old.dir) +1:20 +pi:10 +15:1 +':' +?':' +seq(1,20) +seq(0, 10, by=0.5) +seq(5, 10, length=30) +my_seq <- seq(5, 10, length=30) +length("my_seq") +length(my_seq) +1:length(my_seq) +seq(along.with = my_seq) +seq_along(my_seq) +rep(0, times = 40) +rep(c(0, 1, 2), times =10) +rep(c(0 , 1, 2), each = 10) +num_vect(0.5, 55, -10, 6) +num_vect("0.5, 55, -10, 6") +c(0.5, 55, -10, 6) +?c +c(0.5, 55, -10, 6, recursive = FALSE) +<- num_vect c(0.5, 55, -10, 6) +num_vect <- c(0.5, 55, -10, 6) +tf <- num_vect < 1 +swirl() +swirl() +swirl() +swirl() +tf +num_vect >=6 +swirl() +my_char <- c("My", "name", "is") +my_char +paste(my_char, collapse = " ") +my_name <- c(my_char, "Emily") +my_name +paste(my_name, collapse = " ") +paste("Hello", "world!", sep = " ") +paste("1:3", c("X", "Y", "Z"), sep = "") +paste(1:3, c("X", "Y", "Z"), sep = "") +paste(LETTERS, 1:4, sep = "-") +setwd("~/Downloads/Notre Dame/Biocomputing/Biocomp_tutorial9") +data=read.table(file="wages.csv",header=TRUE,sep=",") +data +?head +?dim +?head +head(data) +data[data[,]] +cat iris.csv +data2=read.table(file="iris.csv",header=TRUE,sep=",") +data2=read.table(file="iris.csv",header=TRUE,sep=",") +data2 +?tail +tail(data2) +?slice +?slice() +tail[data[2,2]] +tail(data[2,2]) +?tail +tail(data(2,2)) +tail(data[2,2]) +tail(data) +tail(data, n=2, n=2) +tail(data, n=2L, n=2L) +tail(data, 2 = 6L) +tail(data, 2=6L) +tail*data, n = -6L) +tail(data, n = -6L) +tail(data, n=2) +tail(tail(data, n=2), n=2) +select(tail(names(.),2)) +?select +?df.iloc +?iloc +?tidyverse +tail(data[n=2,n=2]) +tail(data, n=2) +2rows<-tail(data, n=2) +lastrows<-tail(data,n=2) +lastrows +tail(n=2, lastrows) +tail(lastrows, n=2) +select.list("yearsSchool","wage") +?select.list +select.list(lastrows[,2]) +?selectMethod +tail(latrows,n=2) +tail(lastrows, n=2_) +tail(lastrows, n=2) +?select.list +select.list(lastrows, preselect = NULL, multiple = TRUE) +?sort.list +sort.list(lastrows, n=2) +lastrowsandcolumns<-lastrows[,3:4] +lastrowsandcolumns +data2=read.table(file="iris.csv",header=TRUE,sep=",") +data2 +lastrows<-tail(data2,n=2) +lastrows +tail(lastrows, n=2) +lastrowsandcolumns<-lastrows[,3:4] +lastrowsandcolumns<-lastrows[,4:5] +lastrowsandcolumns +dim(data2$Species) +dim(data2) +observations<-data2[data2$Species] +observations +observations<-data2[,$Species] +observations,-[,5] +observations<-[,5] +observations<-data2[,5] +observations +dim(observations) +observations=data2[$Species] +dim(data2) +observations<-data2[,5] +observations +dim(observations) +?dim +observations<-data2[,1:2] +observations +observations<-data2[,2] +observations +dim(observations) +data2 +?unique +?str +str(data2) +sepalwidth<-data2[data2$Sepal.Width>"3.5"] +sepalwidth<-data2[data2$Sepal.Width>"3.5",] +sepalwidth +dir.create("setosa.csv") +setosa=data2[data2$Species=="setosa",] +setosa +setosa.csv=data2[data2$Species=="setosa",] +setosa.csv +setosa=data2[data2$Species=="setosa",] +write.csv(setosa,'setosa.csv') +?write.csv +setosa +write.table(x=setosa,file="setosa.csv",row.names=FALSE,col.names=TRUE,sep=",") +unlink("setosa.csv") +write.table(x=setosa,file="setosa.csv",row.names=FALSE,col.names=TRUE,sep=",") +write.table(x=setosa,file="setosa.csv",row.names=FALSE,col.names=TRUE,sep=",") +list.files() +print(setosa.csv) +?write.table +data2 +print("The maximum Petal Length is:") +data2[data2$Petal.Length==max(data2$Petal.Length),] +data2[data2$Petal.Length==max(data2$Petal.Length),$Species=virginica] +data2[data2$Petal.Length==max(data2$Petal.Length),5=virginica] +virginica=data2[data2[,5]=="virginica",] +virginica +virginica[virginica$Petal.Length==max(virginica$Petal.Length),] +virginica[virginica$Petal.Length==min(virginica$Petal.Length),] +> virginica[virginica$Petal.Length==mean(virginica$Petal.Length),] +?mean +virginica[virginica$Petal.Length==mean(virginica$Petal.Length),] +virginica +mean(virginica) +mean <- mean(virginica) +mean<-mean(virginica) +x<-c("Petal.Length") +x +?colMeans +pedallength<-virginica[,3] +pedallength +mean(pedallength) diff --git a/Rscript7.R b/Rscript7.R new file mode 100644 index 0000000..5063e95 --- /dev/null +++ b/Rscript7.R @@ -0,0 +1,28 @@ +#Exercise7 +# Problem 1 +data=read.table(file="wages.csv",header=TRUE,sep=",") +# how to get variable for number of lines? +lines=5 +data[1:lines,] + +#Problem 2 +data2=read.table(file="iris.csv",header=TRUE,sep=",") +# print last 2 rows in last 2 columns +lastrows<-tail(data2,n=2) +lastrowsandcolumns<-lastrows[,3:4] +# what is number of observations for each species? +unique(data2$Species) +sum(data2$Species=="setosa") +sum(data2$Species=="versicolor") +sum(data2$Species=="virginica") +# get rows with Sepal.Width > 3.5 +sepalwidth<-data2[data2$Sepal.Width>3.5,] +# write data for species setosa to comma-delimited file named "setosa.csv" +# ***is this comma delimited?? +setosa=data2[data2$Species=="setosa",] +write.table(x=setosa,file="setosa.csv",row.names=FALSE,col.names=TRUE,sep=",") +# Calculate mean, minimum, and max of Petal.Length for obs from virginica +virginica=data2[data2[,5]=="virginica",] +max(virginica$Petal.Length) +min(virginica$Petal.Length) +mean(virginica$Petal.Length) diff --git a/setosa.csv b/setosa.csv new file mode 100644 index 0000000..2f03ff3 --- /dev/null +++ b/setosa.csv @@ -0,0 +1,51 @@ +"Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species" +5.1,3.5,1.4,0.2,"setosa" +4.9,3,1.4,0.2,"setosa" +4.7,3.2,1.3,0.2,"setosa" +4.6,3.1,1.5,0.2,"setosa" +5,3.6,1.4,0.2,"setosa" +5.4,3.9,1.7,0.4,"setosa" +4.6,3.4,1.4,0.3,"setosa" +5,3.4,1.5,0.2,"setosa" +4.4,2.9,1.4,0.2,"setosa" +4.9,3.1,1.5,0.1,"setosa" +5.4,3.7,1.5,0.2,"setosa" +4.8,3.4,1.6,0.2,"setosa" +4.8,3,1.4,0.1,"setosa" +4.3,3,1.1,0.1,"setosa" +5.8,4,1.2,0.2,"setosa" +5.7,4.4,1.5,0.4,"setosa" +5.4,3.9,1.3,0.4,"setosa" +5.1,3.5,1.4,0.3,"setosa" +5.7,3.8,1.7,0.3,"setosa" +5.1,3.8,1.5,0.3,"setosa" +5.4,3.4,1.7,0.2,"setosa" +5.1,3.7,1.5,0.4,"setosa" +4.6,3.6,1,0.2,"setosa" +5.1,3.3,1.7,0.5,"setosa" +4.8,3.4,1.9,0.2,"setosa" +5,3,1.6,0.2,"setosa" +5,3.4,1.6,0.4,"setosa" +5.2,3.5,1.5,0.2,"setosa" +5.2,3.4,1.4,0.2,"setosa" +4.7,3.2,1.6,0.2,"setosa" +4.8,3.1,1.6,0.2,"setosa" +5.4,3.4,1.5,0.4,"setosa" +5.2,4.1,1.5,0.1,"setosa" +5.5,4.2,1.4,0.2,"setosa" +4.9,3.1,1.5,0.2,"setosa" +5,3.2,1.2,0.2,"setosa" +5.5,3.5,1.3,0.2,"setosa" +4.9,3.6,1.4,0.1,"setosa" +4.4,3,1.3,0.2,"setosa" +5.1,3.4,1.5,0.2,"setosa" +5,3.5,1.3,0.3,"setosa" +4.5,2.3,1.3,0.3,"setosa" +4.4,3.2,1.3,0.2,"setosa" +5,3.5,1.6,0.6,"setosa" +5.1,3.8,1.9,0.4,"setosa" +4.8,3,1.4,0.3,"setosa" +5.1,3.8,1.6,0.2,"setosa" +4.6,3.2,1.4,0.2,"setosa" +5.3,3.7,1.5,0.2,"setosa" +5,3.3,1.4,0.2,"setosa" From 7a01692bf907d975197143c23e558cb0bd538366 Mon Sep 17 00:00:00 2001 From: Emily Chen Date: Thu, 4 Nov 2021 10:22:21 -0400 Subject: [PATCH 2/4] Chen Exercise 07 New --- .Rhistory | 512 ------------------------------------------------------ 1 file changed, 512 deletions(-) delete mode 100644 .Rhistory diff --git a/.Rhistory b/.Rhistory deleted file mode 100644 index 4350f01..0000000 --- a/.Rhistory +++ /dev/null @@ -1,512 +0,0 @@ -O[i] = O[i-1]+Supply-Demand -} -# second simulation model inputs -O2 = O #results of the second simulation of muscle oxygen content -Hrate = 135 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE -Alevel = 2.5 # 1 for rest and >2 for exercise; activity level of skeletal muscle -for(i in 2:length(O)){ -Supply = Oblood*Hrate*f*b*(1-O2[i-1]/Omax) -Demand = Odemand*Alevel -O2[i] = O2[i-1]+Supply-Demand -} -# plot the results of each simulation to compare the change in muscle oxygen content over time -# depending on the input heart rate and activity level -# https://www.datacamp.com/community/tutorials/15-questions-about-r-plots -plot(O, type='l', xlab="Timestep (minute)", ylab="Oxygen Content (mg O2/100ml)", ylim=c(0, 10)) # first simulation results, line colored black -lines(O2, col='red') # second simulation results, line colored red -abline(h=1.2, lty=3) # draw a horizontal line at 1.2 = 1/(273*8.3e3)*1000*100*32; this assumes 100 ml skeletal muscle -legend("top", bty="n", inset=0, legend=c("Resting", "Active"), col=c("black", "red"), lty=1:1, cex=0.8, horiz = TRUE) -# model for simulating muscle oxygen content depending on activity level (exercise) and heart rate -# model parameters; https://data-flair.training/blogs/r-vector/ -# 1 ml O2 is 1.43 mg O2 at Standard Temperature and Pressure -Oblood = 0.2*1.43 # mg O2 (ml blood)-1 -f = 0.7 # maximum fraction of oxygen transfered from blood to tissue -b = 0.0357 # ml blood /(beat 100 ml muscle)-1 -Odemand = 0.11*1.43 # mg O2 (100 ml muscle minute)-1 -Omax = 10 # max oxygen content in mg O2/100ml -timesteps = 120 # run each simulation for 120 timesteps (minutes) -O = numeric(timesteps) # vector for the results of the simulations of muscle oxygen content -O[1] = 5 # initial oxygen content for the models is 5 mg O2/100ml -# multiple model simulations follow to calculate muscle oxygen content -# with different input heart rates and activity levels for 120 minutes each; https://campus.datacamp.com/courses/intermediate-r-for-finance/loops-3?ex=9 -# and an initial muscle oxygen content of 5 mg O2 -# muscle oxygen content is updated each minute based on previous muscle oxygen content -# first simulation model inputs -Hrate = 68 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE -Alevel = 1 # 1 for rest and >2 for exercise; activity level of skeletal muscle -for(i in 2:length(O)){ -Supply = Oblood*Hrate*f*b*(1-O[i-1]/Omax) -Demand = Odemand*Alevel -O[i] = O[i-1]+Supply-Demand -} -# second simulation model inputs -O2 = O #results of the second simulation of muscle oxygen content -Hrate = 145 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE -Alevel = 2.5 # 1 for rest and >2 for exercise; activity level of skeletal muscle -for(i in 2:length(O)){ -Supply = Oblood*Hrate*f*b*(1-O2[i-1]/Omax) -Demand = Odemand*Alevel -O2[i] = O2[i-1]+Supply-Demand -} -# plot the results of each simulation to compare the change in muscle oxygen content over time -# depending on the input heart rate and activity level -# https://www.datacamp.com/community/tutorials/15-questions-about-r-plots -plot(O, type='l', xlab="Timestep (minute)", ylab="Oxygen Content (mg O2/100ml)", ylim=c(0, 10)) # first simulation results, line colored black -lines(O2, col='red') # second simulation results, line colored red -abline(h=1.2, lty=3) # draw a horizontal line at 1.2 = 1/(273*8.3e3)*1000*100*32; this assumes 100 ml skeletal muscle -legend("top", bty="n", inset=0, legend=c("Resting", "Active"), col=c("black", "red"), lty=1:1, cex=0.8, horiz = TRUE) -# model for simulating muscle oxygen content depending on activity level (exercise) and heart rate -# model parameters; https://data-flair.training/blogs/r-vector/ -# 1 ml O2 is 1.43 mg O2 at Standard Temperature and Pressure -Oblood = 0.2*1.43 # mg O2 (ml blood)-1 -f = 0.7 # maximum fraction of oxygen transfered from blood to tissue -b = 0.0357 # ml blood /(beat 100 ml muscle)-1 -Odemand = 0.11*1.43 # mg O2 (100 ml muscle minute)-1 -Omax = 10 # max oxygen content in mg O2/100ml -timesteps = 120 # run each simulation for 120 timesteps (minutes) -O = numeric(timesteps) # vector for the results of the simulations of muscle oxygen content -O[1] = 5 # initial oxygen content for the models is 5 mg O2/100ml -# multiple model simulations follow to calculate muscle oxygen content -# with different input heart rates and activity levels for 120 minutes each; https://campus.datacamp.com/courses/intermediate-r-for-finance/loops-3?ex=9 -# and an initial muscle oxygen content of 5 mg O2 -# muscle oxygen content is updated each minute based on previous muscle oxygen content -# first simulation model inputs -Hrate = 68 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE -Alevel = 1 # 1 for rest and >2 for exercise; activity level of skeletal muscle -for(i in 2:length(O)){ -Supply = Oblood*Hrate*f*b*(1-O[i-1]/Omax) -Demand = Odemand*Alevel -O[i] = O[i-1]+Supply-Demand -} -# second simulation model inputs -O2 = O #results of the second simulation of muscle oxygen content -Hrate = 150 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE -Alevel = 2.5 # 1 for rest and >2 for exercise; activity level of skeletal muscle -for(i in 2:length(O)){ -Supply = Oblood*Hrate*f*b*(1-O2[i-1]/Omax) -Demand = Odemand*Alevel -O2[i] = O2[i-1]+Supply-Demand -} -# plot the results of each simulation to compare the change in muscle oxygen content over time -# depending on the input heart rate and activity level -# https://www.datacamp.com/community/tutorials/15-questions-about-r-plots -plot(O, type='l', xlab="Timestep (minute)", ylab="Oxygen Content (mg O2/100ml)", ylim=c(0, 10)) # first simulation results, line colored black -lines(O2, col='red') # second simulation results, line colored red -abline(h=1.2, lty=3) # draw a horizontal line at 1.2 = 1/(273*8.3e3)*1000*100*32; this assumes 100 ml skeletal muscle -legend("top", bty="n", inset=0, legend=c("Resting", "Active"), col=c("black", "red"), lty=1:1, cex=0.8, horiz = TRUE) -# model for simulating muscle oxygen content depending on activity level (exercise) and heart rate -# model parameters; https://data-flair.training/blogs/r-vector/ -# 1 ml O2 is 1.43 mg O2 at Standard Temperature and Pressure -Oblood = 0.2*1.43 # mg O2 (ml blood)-1 -f = 0.7 # maximum fraction of oxygen transfered from blood to tissue -b = 0.0357 # ml blood /(beat 100 ml muscle)-1 -Odemand = 0.11*1.43 # mg O2 (100 ml muscle minute)-1 -Omax = 10 # max oxygen content in mg O2/100ml -timesteps = 120 # run each simulation for 120 timesteps (minutes) -O = numeric(timesteps) # vector for the results of the simulations of muscle oxygen content -O[1] = 5 # initial oxygen content for the models is 5 mg O2/100ml -# multiple model simulations follow to calculate muscle oxygen content -# with different input heart rates and activity levels for 120 minutes each; https://campus.datacamp.com/courses/intermediate-r-for-finance/loops-3?ex=9 -# and an initial muscle oxygen content of 5 mg O2 -# muscle oxygen content is updated each minute based on previous muscle oxygen content -# first simulation model inputs -Hrate = 68 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE -Alevel = 1 # 1 for rest and >2 for exercise; activity level of skeletal muscle -for(i in 2:length(O)){ -Supply = Oblood*Hrate*f*b*(1-O[i-1]/Omax) -Demand = Odemand*Alevel -O[i] = O[i-1]+Supply-Demand -} -# second simulation model inputs -O2 = O #results of the second simulation of muscle oxygen content -Hrate = 155 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE -Alevel = 2.5 # 1 for rest and >2 for exercise; activity level of skeletal muscle -for(i in 2:length(O)){ -Supply = Oblood*Hrate*f*b*(1-O2[i-1]/Omax) -Demand = Odemand*Alevel -O2[i] = O2[i-1]+Supply-Demand -} -# plot the results of each simulation to compare the change in muscle oxygen content over time -# depending on the input heart rate and activity level -# https://www.datacamp.com/community/tutorials/15-questions-about-r-plots -plot(O, type='l', xlab="Timestep (minute)", ylab="Oxygen Content (mg O2/100ml)", ylim=c(0, 10)) # first simulation results, line colored black -lines(O2, col='red') # second simulation results, line colored red -abline(h=1.2, lty=3) # draw a horizontal line at 1.2 = 1/(273*8.3e3)*1000*100*32; this assumes 100 ml skeletal muscle -legend("top", bty="n", inset=0, legend=c("Resting", "Active"), col=c("black", "red"), lty=1:1, cex=0.8, horiz = TRUE) -# model for simulating muscle oxygen content depending on activity level (exercise) and heart rate -# model parameters; https://data-flair.training/blogs/r-vector/ -# 1 ml O2 is 1.43 mg O2 at Standard Temperature and Pressure -Oblood = 0.2*1.43 # mg O2 (ml blood)-1 -f = 0.7 # maximum fraction of oxygen transfered from blood to tissue -b = 0.0357 # ml blood /(beat 100 ml muscle)-1 -Odemand = 0.11*1.43 # mg O2 (100 ml muscle minute)-1 -Omax = 10 # max oxygen content in mg O2/100ml -timesteps = 120 # run each simulation for 120 timesteps (minutes) -O = numeric(timesteps) # vector for the results of the simulations of muscle oxygen content -O[1] = 5 # initial oxygen content for the models is 5 mg O2/100ml -# multiple model simulations follow to calculate muscle oxygen content -# with different input heart rates and activity levels for 120 minutes each; https://campus.datacamp.com/courses/intermediate-r-for-finance/loops-3?ex=9 -# and an initial muscle oxygen content of 5 mg O2 -# muscle oxygen content is updated each minute based on previous muscle oxygen content -# first simulation model inputs -Hrate = 68 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE -Alevel = 1 # 1 for rest and >2 for exercise; activity level of skeletal muscle -for(i in 2:length(O)){ -Supply = Oblood*Hrate*f*b*(1-O[i-1]/Omax) -Demand = Odemand*Alevel -O[i] = O[i-1]+Supply-Demand -} -# second simulation model inputs -O2 = O #results of the second simulation of muscle oxygen content -Hrate = 160 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE -Alevel = 2.5 # 1 for rest and >2 for exercise; activity level of skeletal muscle -for(i in 2:length(O)){ -Supply = Oblood*Hrate*f*b*(1-O2[i-1]/Omax) -Demand = Odemand*Alevel -O2[i] = O2[i-1]+Supply-Demand -} -# plot the results of each simulation to compare the change in muscle oxygen content over time -# depending on the input heart rate and activity level -# https://www.datacamp.com/community/tutorials/15-questions-about-r-plots -plot(O, type='l', xlab="Timestep (minute)", ylab="Oxygen Content (mg O2/100ml)", ylim=c(0, 10)) # first simulation results, line colored black -lines(O2, col='red') # second simulation results, line colored red -abline(h=1.2, lty=3) # draw a horizontal line at 1.2 = 1/(273*8.3e3)*1000*100*32; this assumes 100 ml skeletal muscle -legend("top", bty="n", inset=0, legend=c("Resting", "Active"), col=c("black", "red"), lty=1:1, cex=0.8, horiz = TRUE) -# model for simulating muscle oxygen content depending on activity level (exercise) and heart rate -# model parameters; https://data-flair.training/blogs/r-vector/ -# 1 ml O2 is 1.43 mg O2 at Standard Temperature and Pressure -Oblood = 0.2*1.43 # mg O2 (ml blood)-1 -f = 0.7 # maximum fraction of oxygen transfered from blood to tissue -b = 0.0357 # ml blood /(beat 100 ml muscle)-1 -Odemand = 0.11*1.43 # mg O2 (100 ml muscle minute)-1 -Omax = 10 # max oxygen content in mg O2/100ml -timesteps = 120 # run each simulation for 120 timesteps (minutes) -O = numeric(timesteps) # vector for the results of the simulations of muscle oxygen content -O[1] = 5 # initial oxygen content for the models is 5 mg O2/100ml -# multiple model simulations follow to calculate muscle oxygen content -# with different input heart rates and activity levels for 120 minutes each; https://campus.datacamp.com/courses/intermediate-r-for-finance/loops-3?ex=9 -# and an initial muscle oxygen content of 5 mg O2 -# muscle oxygen content is updated each minute based on previous muscle oxygen content -# first simulation model inputs -Hrate = 68 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE -Alevel = 1 # 1 for rest and >2 for exercise; activity level of skeletal muscle -for(i in 2:length(O)){ -Supply = Oblood*Hrate*f*b*(1-O[i-1]/Omax) -Demand = Odemand*Alevel -O[i] = O[i-1]+Supply-Demand -} -# second simulation model inputs -O2 = O #results of the second simulation of muscle oxygen content -Hrate = 162 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE -Alevel = 2.5 # 1 for rest and >2 for exercise; activity level of skeletal muscle -for(i in 2:length(O)){ -Supply = Oblood*Hrate*f*b*(1-O2[i-1]/Omax) -Demand = Odemand*Alevel -O2[i] = O2[i-1]+Supply-Demand -} -# plot the results of each simulation to compare the change in muscle oxygen content over time -# depending on the input heart rate and activity level -# https://www.datacamp.com/community/tutorials/15-questions-about-r-plots -plot(O, type='l', xlab="Timestep (minute)", ylab="Oxygen Content (mg O2/100ml)", ylim=c(0, 10)) # first simulation results, line colored black -lines(O2, col='red') # second simulation results, line colored red -abline(h=1.2, lty=3) # draw a horizontal line at 1.2 = 1/(273*8.3e3)*1000*100*32; this assumes 100 ml skeletal muscle -legend("top", bty="n", inset=0, legend=c("Resting", "Active"), col=c("black", "red"), lty=1:1, cex=0.8, horiz = TRUE) -# model for simulating muscle oxygen content depending on activity level (exercise) and heart rate -# model parameters; https://data-flair.training/blogs/r-vector/ -# 1 ml O2 is 1.43 mg O2 at Standard Temperature and Pressure -Oblood = 0.2*1.43 # mg O2 (ml blood)-1 -f = 0.7 # maximum fraction of oxygen transfered from blood to tissue -b = 0.0357 # ml blood /(beat 100 ml muscle)-1 -Odemand = 0.11*1.43 # mg O2 (100 ml muscle minute)-1 -Omax = 10 # max oxygen content in mg O2/100ml -timesteps = 120 # run each simulation for 120 timesteps (minutes) -O = numeric(timesteps) # vector for the results of the simulations of muscle oxygen content -O[1] = 5 # initial oxygen content for the models is 5 mg O2/100ml -# multiple model simulations follow to calculate muscle oxygen content -# with different input heart rates and activity levels for 120 minutes each; https://campus.datacamp.com/courses/intermediate-r-for-finance/loops-3?ex=9 -# and an initial muscle oxygen content of 5 mg O2 -# muscle oxygen content is updated each minute based on previous muscle oxygen content -# first simulation model inputs -Hrate = 68 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE -Alevel = 1 # 1 for rest and >2 for exercise; activity level of skeletal muscle -for(i in 2:length(O)){ -Supply = Oblood*Hrate*f*b*(1-O[i-1]/Omax) -Demand = Odemand*Alevel -O[i] = O[i-1]+Supply-Demand -} -# second simulation model inputs -O2 = O #results of the second simulation of muscle oxygen content -Hrate = 164 # 50-200; heart rate beats per minute UPDATE YOUR HEARTRATE HERE -Alevel = 2.5 # 1 for rest and >2 for exercise; activity level of skeletal muscle -for(i in 2:length(O)){ -Supply = Oblood*Hrate*f*b*(1-O2[i-1]/Omax) -Demand = Odemand*Alevel -O2[i] = O2[i-1]+Supply-Demand -} -# plot the results of each simulation to compare the change in muscle oxygen content over time -# depending on the input heart rate and activity level -# https://www.datacamp.com/community/tutorials/15-questions-about-r-plots -plot(O, type='l', xlab="Timestep (minute)", ylab="Oxygen Content (mg O2/100ml)", ylim=c(0, 10)) # first simulation results, line colored black -lines(O2, col='red') # second simulation results, line colored red -abline(h=1.2, lty=3) # draw a horizontal line at 1.2 = 1/(273*8.3e3)*1000*100*32; this assumes 100 ml skeletal muscle -legend("top", bty="n", inset=0, legend=c("Resting", "Active"), col=c("black", "red"), lty=1:1, cex=0.8, horiz = TRUE) -install.packages(c("swirl","swirlify")) -install.packages("swirl") -library("siwrl") -library("swirl") -swirl() -swirl() -swirl() -library(swirl) -swirl() -library() -swirl() -library("swirl") -swirl() -swirl() -5+7 -x <- 5 + 7 -x -y <- x - 3 -y -c(1.1, 9, 3.14) -z <- (1.1, 9, 3.14) -z <- c(1.1, 9, 3.14) -?c -z -c(z, 555, z) -z * 2 + 100 -my_sqrt <- sqrt(z-1) -swirl() -my_sqrt -my_div <- z/my_sqrt -my_div -c(1, 2, 3, 4) + c(0, 10) -c( 1, 2, 3, 4) + c(0, 10, 100) -c( 1, 2, 3, 4) + c(0, 10, 1000) -c( 1, 2, 3, 4) + c(0, 10, 1000) -info() -c( 1, 2, 3, 4) + c(0, 10, 1000) -c( 1, 2, 3, 4) + c(0, 10, 1000) -c( 1, 2, 3, 4) + c(0, 10, 1000) -c( 1, 2, 3, 4) + c(0, 10, 1000) -info() -nxt() -z * 2 + 1000 -my_div -getwd() -ls() -x <- 9 -ls() -list.files() -?list.files -args(list.files()) -args(list.files) -old.dir <- wkdir -old.dir <- list.files -old.dir <- getwd() -dir.create(testdir) -dir.create("testdir") -setwd("testdir") -file.create("mytest.R") -ls("wkdir") -ls() -list.files() -ls -file.exists("mytest.R") -file.info("mytest.R") -file.rename("mytest.R") -file.rename("mytest.R") to "mytest2.R" -file.rename("mytest.R" to "mytest2.R") -file.rename("mytest.R" "to" "mytest2.R") -file.rename(mytest.R) -?file.rename -file.rename("mytest.R", to "mytest2.R") -file.rename("mytest.R", "mytest2.R") -file.copy(mytest2.R, mytest3.R) -file.copy("mytest2.R", "mytest4.R") -file.copy("mytest2.R", "mytest3.R") -file.path("mytest3.R") -file.path("folder1") -file.path("folder1", "folder2") -?dir.create -dir.create("testdir2") file.path("testdir3") -?file.path() -dir.create("testdir2" file.path("testdir3")) -dir.create(file.path("testdir2", "testdir3") -dir.create(file.path("testdir2", "testdir3")) -dir.create(file.path("testdir2", "testdir3")) -dir.create(file.path("testdir2", "testdir3"), recursive = TRUE) -setwd() -setwd(old.dir) -1:20 -pi:10 -15:1 -':' -?':' -seq(1,20) -seq(0, 10, by=0.5) -seq(5, 10, length=30) -my_seq <- seq(5, 10, length=30) -length("my_seq") -length(my_seq) -1:length(my_seq) -seq(along.with = my_seq) -seq_along(my_seq) -rep(0, times = 40) -rep(c(0, 1, 2), times =10) -rep(c(0 , 1, 2), each = 10) -num_vect(0.5, 55, -10, 6) -num_vect("0.5, 55, -10, 6") -c(0.5, 55, -10, 6) -?c -c(0.5, 55, -10, 6, recursive = FALSE) -<- num_vect c(0.5, 55, -10, 6) -num_vect <- c(0.5, 55, -10, 6) -tf <- num_vect < 1 -swirl() -swirl() -swirl() -swirl() -tf -num_vect >=6 -swirl() -my_char <- c("My", "name", "is") -my_char -paste(my_char, collapse = " ") -my_name <- c(my_char, "Emily") -my_name -paste(my_name, collapse = " ") -paste("Hello", "world!", sep = " ") -paste("1:3", c("X", "Y", "Z"), sep = "") -paste(1:3, c("X", "Y", "Z"), sep = "") -paste(LETTERS, 1:4, sep = "-") -setwd("~/Downloads/Notre Dame/Biocomputing/Biocomp_tutorial9") -data=read.table(file="wages.csv",header=TRUE,sep=",") -data -?head -?dim -?head -head(data) -data[data[,]] -cat iris.csv -data2=read.table(file="iris.csv",header=TRUE,sep=",") -data2=read.table(file="iris.csv",header=TRUE,sep=",") -data2 -?tail -tail(data2) -?slice -?slice() -tail[data[2,2]] -tail(data[2,2]) -?tail -tail(data(2,2)) -tail(data[2,2]) -tail(data) -tail(data, n=2, n=2) -tail(data, n=2L, n=2L) -tail(data, 2 = 6L) -tail(data, 2=6L) -tail*data, n = -6L) -tail(data, n = -6L) -tail(data, n=2) -tail(tail(data, n=2), n=2) -select(tail(names(.),2)) -?select -?df.iloc -?iloc -?tidyverse -tail(data[n=2,n=2]) -tail(data, n=2) -2rows<-tail(data, n=2) -lastrows<-tail(data,n=2) -lastrows -tail(n=2, lastrows) -tail(lastrows, n=2) -select.list("yearsSchool","wage") -?select.list -select.list(lastrows[,2]) -?selectMethod -tail(latrows,n=2) -tail(lastrows, n=2_) -tail(lastrows, n=2) -?select.list -select.list(lastrows, preselect = NULL, multiple = TRUE) -?sort.list -sort.list(lastrows, n=2) -lastrowsandcolumns<-lastrows[,3:4] -lastrowsandcolumns -data2=read.table(file="iris.csv",header=TRUE,sep=",") -data2 -lastrows<-tail(data2,n=2) -lastrows -tail(lastrows, n=2) -lastrowsandcolumns<-lastrows[,3:4] -lastrowsandcolumns<-lastrows[,4:5] -lastrowsandcolumns -dim(data2$Species) -dim(data2) -observations<-data2[data2$Species] -observations -observations<-data2[,$Species] -observations,-[,5] -observations<-[,5] -observations<-data2[,5] -observations -dim(observations) -observations=data2[$Species] -dim(data2) -observations<-data2[,5] -observations -dim(observations) -?dim -observations<-data2[,1:2] -observations -observations<-data2[,2] -observations -dim(observations) -data2 -?unique -?str -str(data2) -sepalwidth<-data2[data2$Sepal.Width>"3.5"] -sepalwidth<-data2[data2$Sepal.Width>"3.5",] -sepalwidth -dir.create("setosa.csv") -setosa=data2[data2$Species=="setosa",] -setosa -setosa.csv=data2[data2$Species=="setosa",] -setosa.csv -setosa=data2[data2$Species=="setosa",] -write.csv(setosa,'setosa.csv') -?write.csv -setosa -write.table(x=setosa,file="setosa.csv",row.names=FALSE,col.names=TRUE,sep=",") -unlink("setosa.csv") -write.table(x=setosa,file="setosa.csv",row.names=FALSE,col.names=TRUE,sep=",") -write.table(x=setosa,file="setosa.csv",row.names=FALSE,col.names=TRUE,sep=",") -list.files() -print(setosa.csv) -?write.table -data2 -print("The maximum Petal Length is:") -data2[data2$Petal.Length==max(data2$Petal.Length),] -data2[data2$Petal.Length==max(data2$Petal.Length),$Species=virginica] -data2[data2$Petal.Length==max(data2$Petal.Length),5=virginica] -virginica=data2[data2[,5]=="virginica",] -virginica -virginica[virginica$Petal.Length==max(virginica$Petal.Length),] -virginica[virginica$Petal.Length==min(virginica$Petal.Length),] -> virginica[virginica$Petal.Length==mean(virginica$Petal.Length),] -?mean -virginica[virginica$Petal.Length==mean(virginica$Petal.Length),] -virginica -mean(virginica) -mean <- mean(virginica) -mean<-mean(virginica) -x<-c("Petal.Length") -x -?colMeans -pedallength<-virginica[,3] -pedallength -mean(pedallength) From 6c9ff5b960e80bfdff49d609bf91f8d1dc208a34 Mon Sep 17 00:00:00 2001 From: Emily Chen Date: Thu, 4 Nov 2021 10:23:32 -0400 Subject: [PATCH 3/4] Chen Exercise 07 New --- Rscript7.R | 1 - 1 file changed, 1 deletion(-) diff --git a/Rscript7.R b/Rscript7.R index 5063e95..dd8d538 100644 --- a/Rscript7.R +++ b/Rscript7.R @@ -18,7 +18,6 @@ sum(data2$Species=="virginica") # get rows with Sepal.Width > 3.5 sepalwidth<-data2[data2$Sepal.Width>3.5,] # write data for species setosa to comma-delimited file named "setosa.csv" -# ***is this comma delimited?? setosa=data2[data2$Species=="setosa",] write.table(x=setosa,file="setosa.csv",row.names=FALSE,col.names=TRUE,sep=",") # Calculate mean, minimum, and max of Petal.Length for obs from virginica From 5b1cdb88e76588a68d34d540292d565f35d362d0 Mon Sep 17 00:00:00 2001 From: Emily Chen Date: Thu, 4 Nov 2021 14:17:37 -0400 Subject: [PATCH 4/4] Chen Exercise 07 --- Rscript7.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rscript7.R b/Rscript7.R index dd8d538..dd6c0f4 100644 --- a/Rscript7.R +++ b/Rscript7.R @@ -9,7 +9,7 @@ data[1:lines,] data2=read.table(file="iris.csv",header=TRUE,sep=",") # print last 2 rows in last 2 columns lastrows<-tail(data2,n=2) -lastrowsandcolumns<-lastrows[,3:4] +lastrowsandcolumns<-lastrows[,4:5] # what is number of observations for each species? unique(data2$Species) sum(data2$Species=="setosa")