Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Boxplots Using R (for Beginners)
1. How to make boxplots in R
(for beginners)
by
Amnah Siddiqa
Correspondence to:
amnahsiddiqa@gmail.com
2. Downloads Available
• The code is available at http://textuploader.com/drcg5
• The test data is available at http://textuploader.com/drcgd
3. Open R studio (see figure below) the circle shows the console
where you will enter your commands
4. 1. Set the working directory: name of the folder where you have
placed your data file and write the command
setwd("C:/Users/DellPC/Desktop/tutorials/boxplot")
in console.
2. Read your data or test data available at
http://textuploader.com/drcgd Using the command
testdata=read.table("test_data_boxplot.txt", as.is=T, sep="t",
header=T)
You should save a text file of your data or if you plan to use other
file type like csv etc then do not forget to change the extension of
file.
5. 3. Make a simple boxplot of the data using command
command: boxplot (testdata)
Following graph should be generated:
6. 4. Change the horizontal x axis values to vertical using command
boxplot (data, las = 2)
7. 5. Change the names of x-axis data points using command
boxplot (testdata, las = 2, names = c("S 1","S
2","S3",“S4",“S5",“S6"))
8. 6. Title and Axes names: Change the names of axis and title of plot using
command:
boxplot(testdata, las = 2, names = c("S 1","S 2","S3",“S4",“S5",“S6"),
xlab="Samples", ylab="Log Intensities", main="Example Dataset")
9. 7. Color the boxes in plot using command:
boxplot(testdata, las = 2, names = c("S1","S 2","S 3",“S4",“S5",“S6"),
xlab="Samples", ylab="Log Intensities", main="Example Dataset", col =
c(“red","yellow","green","darkgreen","blue",“magenta")