<div dir="ltr">Hi,<div><br></div><div>Thanks for your further advice. However, I must not have explained myself very clearly, sorry about that. I want one plot with all of the boxplots in it plotted using the same Y scale so that I can visually compare them to each other. Does that make sense? See attached sketch that will hopefully make it clearer!</div><div><br></div><div>Sorry again for not being clear from the outset as to what I was trying to do!</div><div><br></div><div>kind regards,</div><div>Susan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 13 April 2017 at 23:19, affableambler [via R] <span dir="ltr"><<a href="/user/SendEmail.jtp?type=node&node=4732686&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>></span> wrote:<br><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sorry for not getting back to you sooner. In that case, you can use par() before the loop to combine multiple plots into one view:
<br><span class=""><br>data<-read.table('E:\\<wbr>Libraries\\Documents\\WCM4.<wbr>txt',sep='\t',header=T,<wbr>stringsAsFactors = F)
<br><br>#Remove column of row numbers
<br>data$x<-NULL
<br><br>#Run a for loop to create separate boxplots for the data in each row:
<br></span>par(mfrow=c(1,nrow(data)))
<br>for(row in 1:nrow(data)){boxplot(as.<wbr>numeric(as.vector(data[row,]))<wbr>,main=row)}
<br><br><br>The mfrow parameter takes a vector of two integers. The first is the number of rows in the view and the second is the number of columns, so the code above gives you one row with fourteen plots. If you want to divide it into two rows, just change it to c(2,nrow(data)/2), etc.
<br><br>
<br>
<br>
<hr noshade size="1" color="#cccccc">
<div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif"><span class="">
<div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
</span><a href="http://r.789695.n4.nabble.com/Boxplot-of-mean-sd-max-min-without-raw-data-tp4730939p4732123.html" target="_blank" rel="nofollow" link="external">http://r.789695.n4.nabble.com/<wbr>Boxplot-of-mean-sd-max-min-<wbr>without-raw-data-<wbr>tp4730939p4732123.html</a>
</div><div class="HOEnZb"><div class="h5">
<div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
To unsubscribe from Boxplot of mean, sd, max, min without raw data, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.<br>
<a href="http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_blank" link="external">NAML</a>
</div></div></div></blockquote></div><br></div>
<!--start-attachments--><div class="small"><br/><img src="http://r.789695.n4.nabble.com/images/icon_attachment.gif" > <strong>boxplot.jpg</strong> (67K) <a href="http://r.789695.n4.nabble.com/attachment/4732686/0/boxplot.jpg" target="_top" rel="nofollow" link="external">Download Attachment</a></div><!--end-attachments-->
<br/><hr align="left" width="300" />
View this message in context: <a href="http://r.789695.n4.nabble.com/Boxplot-of-mean-sd-max-min-without-raw-data-tp4730939p4732686.html">Re: Boxplot of mean, sd, max, min without raw data</a><br/>
Sent from the <a href="http://r.789695.n4.nabble.com/datatable-help-f2315188.html">datatable-help mailing list archive</a> at Nabble.com.<br/>