Posts

Showing posts from March, 2023

Assignment 11

## Original Code 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) } #DeBugged Code tukey_multiple <- function(x) {   outliers <- array(TRUE, dim=dim(x))   for (j in 1:ncol(x)) {     outliers[,j] <- outliers[,j] && #tukey.outlier(x[,j])  ## tukey.outlier does not exist       }   outlier.vec <- vector(length=nrow(x))   for (i in 1:nrow(x)) {     outlier.vec[i] <- all(outliers[i,])   }   return(outlier.vec)  } To start debugging, I pasted the code into RStudio to see what kind of error it would throw. The syntax was wrong with the alignment of certain brackets and parentheses. I then realized that ...

Assignment 10

  Often times I face the difficulty of not being able to save all my  results from my R console to a file to refer back to it later. However, with my  new package "checkpoint",  it will be able to save the code and all the results from the consol  into a file and will be able to update the results for each line of code  incase you want to edit it and rerun it. This will help me really keep track of my results in one location without it being disorganized. https://github.com/aishwaryashiv10/Lis6371/blob/08a989e95e6e79ff1c97950fef1e3f7fb45b6de3/Module%2010%20Assignment.R

Assignment 9

Image
  I created a scatter plot of the brca dataset comparing the variables of the radius mean and the texture mean. I created a line graph of the brca dataset comparing the variables of the radius mean and the texture mean. I created a bar graph of the brca dataset comparing the variables of the radius mean and the texture mean and the perimeter mean.

Assignment 8

Image
 # Import dataset Module8 <- read.table('Users/aishwaryashivakumar/Downloads/Assignment\ 6\ Dataset-1.txt', header = TRUE, sep = ",")\ #run plyr generates for the mean of both Age and Grade split by gender install.packages("plyr") library(plyr)  StudentAverage <- ddply(Module8,"Sex",transform, Grade.Average=mean(Grade))  # Print to a file  write.table(Module8,"/Users/aishwaryashivakumar/Desktop/Student_Average", sep = ",") # Filter the names in the given list for names that contain the letter i newModule8 <- subset(Module8,grepl("[iI]",Module8$Name)) # Export filtered list as table write.table(newModule8,"/Users/aishwaryashivakumar/Desktop/Datasubset", sep = ",")