Hi
I have implented boxplots in my script to create box plots
BoxplotsCheck <- readline(prompt = "Would you like to create boxplots for any
Feature? (y/n):")
if (BoxplotsCheck == "y"){
BoxplotsFeature <- readline(prompt = "Which Feature would you like to
create a Boxplot for?:")
BoxplotsFeature <- as.numeric(BoxplotsFeature)
BoxplotsData <- as.numeric(which(PCIList == BoxplotsFeature))
BoxplotsData <- TotalIntensityList[BoxplotsData,]
BoxplotsHeading <- paste("Tukey boxplot (including outliers) for PCI ",
BoxplotsFeature , sep = "")
bplot(as.numeric(BoxplotsData), GroupingList, style = "tukey", outlier =
TRUE,
col="red", main = BoxplotsHeading,
xlab = "Groups", ylab = "Normalised Intensity", plot = TRUE)
BoxplotsFilename <- paste(BoxplotsFeature, "_Boxplot", sep = "")
savePlot(filename = "BoxplotsFilename", type = "jpeg", device = dev.cur(),
restoreConsole = TRUE)
RepeatPlot <- readline(prompt = "Would you like to create another boxplot for
any Feature? (y/n):")
}
If the user inputs "y" for BoxplotsCheck then a boxplot is saved and creatyed
based on a user choice.
I want to include the option to do another boxplot if needed (i.e. another user
prompt after saveplot returning another y or n for the variable "RepeatPlot "
) how can i do this. I guess some kind of loop continuing whileRepeatPlot == y
Can anyone help
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.