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...
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...
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...
Comments
Post a Comment