Posts

Showing posts from November, 2023

Final Project-R Package

Image
Introduction  BMI/BP Calculator My biological father suffered a stroke 4 years ago , however, I am not here to lament on his medical condition but to provide a solution, to be more precise, a preventative measure for physical trainers ( which I believe play a important role in professional spheres) or any for that matter. This tool can help someone quickly figure out the next best course of actions regarding there medical health, and body weight, if there are any concerns to report. The calculator output the value of your cardiac output, which is the volumetric flow rate, Q . The optimum value is 40 L/m. Recording this value we can calculate Mean Arterial Pressure (MAP).  MAP is the product of cardiac output and total  peripheral vascular resistance . Importantly, both of these parameters are under the control of the arterial baroreflex and autonomic nervous system. Since cardiac output is the product of heart rate and stroke volume, changes in either of these parameter...

Visualization in R

Image
Basic Graph                                                                Romar Wallen For my module 8 visualization I chose the Dow Jones stock market file since I have very little knowledge of it and I'd like to see what the value are and how the values are affected by time. I used this command, DJFranses <- DJFranses[, -1], to remove the first and additional column. This will remove a third element that can issues when running the command for the 2-D graph. running the code below creates a basic visualization of the DJFranses stock market over the 15 year period. plot (DJFranses$time, DJFranses$value, cex = 3, pch = 20, main = "Dow index time series data", xlab="Time", ylab = "Stock Value") Lattice   after loading the library(lattice) into the interface I was able to pl...

R Mark down

Image
  R Mark down file was created by clicking the new R markdown file button . The result  of pressing Knit is discussed and explained. After pressing knit this was the result plot and table of values. 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.

Mod 11 debugging

 Debugging this R program. Steps taken. running the program. The R programming environment output an Error message. The error as seen below.  Reformating the program using an editor that can really help readability and run time. To correct the error. reformatting of key words, Correct spacing and alignment of iterations statements, for loops, and output: return helped the program to compile smoothly without error > tukey_multiple <- function(x) { + outliers <- array(TRUE,dim=dim(x)) + for (j in 1:ncol(x)) + { + outliers[,j] <- outliers[,j] && tukey.outlier(x[,j]) + } + outlier.vec <- vector(length=nrow(x)) + for (i in 1:nrow(x)) + { outlier.vec[i] <- all(outliers[i,]) } return(outlier.vec) } Error: unexpected symbol in: " for (i in 1:nrow(x)) { outlier.vec[i] <- all(outliers[i,]) } return" > tukey_multiple <- function(x) { + + > tukey_multiple <- function(x) + + { + + ou...

R package

 Package: fprojromarW Title: bmi calculator Version: 0.0.0.1 Authors@R:Romar Wallen Description: The bmi calculator will take 6 values of 1 mass and calculate average body mass index and plot a data table and graph License: `use_mit_license()` Encoding: UTF-8 Roxygen: list(markdown = TRUE) https://github.com/wallenr8/rw10-R/blob/dc89539a200e98b722cc1b55345a2d2f216442dc/mod10R