<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-13820</id>
	<title>Nabble - R help</title>
	<updated>2009-11-25T14:08:29Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/R-help-f13820.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/R-help-f13820.html" />
	<subtitle type="html">The main R mailing list, for discussion about problems and solutions using R, announcements (not covered by R-announce or R-packages, see above), about the availability of new functionality for R and documentation of R, comparison and compatibility with S-plus, and for the posting of nice examples and benchmarks.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26521137</id>
	<title>Re: Reading from Google Docs</title>
	<published>2009-11-25T14:08:29Z</published>
	<updated>2009-11-25T14:08:29Z</updated>
	<author>
		<name>Farrel Buchinsky</name>
	</author>
	<content type="html">Oh OH! Could you please help with a problem that I never used to get.
&lt;br&gt;&lt;br&gt;library(RGoogleDocs)
&lt;br&gt;ps &amp;lt;-readline(prompt=&amp;quot;get the password in &amp;quot;)
&lt;br&gt;sheets.con = getGoogleDocsConnection(getGoogleAuth(&amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26521137&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fjbuch@...&lt;/a&gt;&amp;quot;, ps,
&lt;br&gt;service =&amp;quot;wise&amp;quot;))
&lt;br&gt;ts2=getWorksheets(&amp;quot;OnCall&amp;quot;,sheets.con)
&lt;br&gt;&lt;br&gt;Those opening lines of script used to work flawlesly. Now I get.
&lt;br&gt;Error in getDocs(con) : problems connecting to get the list of documents
&lt;br&gt;&lt;br&gt;Yet I got it to work earlier while I had been toying with RGoogleData
&lt;br&gt;package in another session. Could RGoogleData have opened something for
&lt;br&gt;RGoogleDocs to use?
&lt;br&gt;&lt;br&gt;Farrel Buchinsky
&lt;br&gt;Google Voice Tel: (412) 567-7870
&lt;br&gt;&lt;br&gt;Sent from Pittsburgh, Pennsylvania, United States
&lt;br&gt;&lt;br&gt;On Wed, Nov 25, 2009 at 16:34, Farrel Buchinsky &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26521137&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fjbuch@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; That was painless. I had already installed Rtools and had already put it on
&lt;br&gt;&amp;gt; my path.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Your line worked very well. [Thanks for telling me. However I did it last
&lt;br&gt;&amp;gt; time was worse than sticking daggers in my eyes. ]
&lt;br&gt;&amp;gt; &amp;nbsp;install.packages( &amp;quot;RGoogleDocs&amp;quot;, repos=&amp;quot;&lt;a href=&quot;http://www.omegahat.org/R&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.omegahat.org/R&lt;/a&gt;&amp;quot;, type=&amp;quot;source&amp;quot;
&lt;br&gt;&amp;gt; )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I now have
&lt;br&gt;&amp;gt; Package: RGoogleDocs
&lt;br&gt;&amp;gt; Version: 0.4-0
&lt;br&gt;&amp;gt; Title:....
&lt;br&gt;&amp;gt; ....
&lt;br&gt;&amp;gt; Maintainer: Duncan Temple Lang &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26521137&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;duncan@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Packaged: 2009-10-27 22:10:22 UTC; duncan
&lt;br&gt;&amp;gt; Built: R 2.10.0; ; 2009-11-25 20:59:03 UTC; windows
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I am providing the following link to a copy of my RGoogleDocs zipped
&lt;br&gt;&amp;gt; directory. It is for people who run R in windows and do not want to go
&lt;br&gt;&amp;gt; through the pain of setting things up so that they can install source.
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://dl.dropbox.com/u/23200/RGoogleDocs/RGoogleDocs.zip&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://dl.dropbox.com/u/23200/RGoogleDocs/RGoogleDocs.zip&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I BELIEVE that if one downloads the zip and extracts it to an empty
&lt;br&gt;&amp;gt; directory called RGoogleDocs in one's Library directory then everything will
&lt;br&gt;&amp;gt; work. Please let me know.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Farrel Buchinsky
&lt;br&gt;&amp;gt; Google Voice Tel: (412) 567-7870
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Wed, Nov 25, 2009 at 15:15, Charlie Sharpsteen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26521137&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;chuck@...&lt;/a&gt;&amp;gt;wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Wed, Nov 25, 2009 at 12:02 PM, Farrel Buchinsky &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26521137&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fjbuch@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; I reinstalled from a binary that Duncan Temple Lang placed in omegahat.
&lt;br&gt;&amp;gt;&amp;gt; I
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; see that omegahat has a subdirectory for each version of R. There is not
&lt;br&gt;&amp;gt;&amp;gt; a
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; directory for 2.10. I took the liberty of taking it from the 2.9
&lt;br&gt;&amp;gt;&amp;gt; directory.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; That explains the warning message.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Who knows what crime I committed. Is that first or third degree murder.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Well, it's just a warning-- so it shouldn't be a show-stopper. &amp;nbsp;And
&lt;br&gt;&amp;gt;&amp;gt; from what I see the warning is only referring to the package help
&lt;br&gt;&amp;gt;&amp;gt; pages, which are available online. &amp;nbsp;It looks like the functionality of
&lt;br&gt;&amp;gt;&amp;gt; the package should still work just fine if you don't want to bother
&lt;br&gt;&amp;gt;&amp;gt; with a reinstall.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; I saw however that there is a far more recent version of RGoogleDocs
&lt;br&gt;&amp;gt;&amp;gt; (Last
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Release: 0.4-0 (27 Oct 2009)). But it is in tar.gz. I assume that it is
&lt;br&gt;&amp;gt;&amp;gt; in
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; source. Once before I spent about 27000 hours getting a source to become
&lt;br&gt;&amp;gt;&amp;gt; a
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; binary. I don't know how I finally got it right and am reluctant to
&lt;br&gt;&amp;gt;&amp;gt; wander
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; into that swamp again.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Farrel Buchinsky
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; This shouldn't be extraordinarily difficult-- unfortunately Murphy's
&lt;br&gt;&amp;gt;&amp;gt; Law does come into play sometimes. &amp;nbsp;But it should just be a matter of:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;install.packages( &amp;quot;RGoogleDocs&amp;quot;, repos=&amp;quot;&lt;a href=&quot;http://www.omegahat.org/R&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.omegahat.org/R&lt;/a&gt;&amp;quot;,
&lt;br&gt;&amp;gt;&amp;gt; type=&amp;quot;source&amp;quot; )
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; And that's it for Linux, Mac OS or other UNIX-based system. &amp;nbsp;With
&lt;br&gt;&amp;gt;&amp;gt; Windows you will first have to install the toolset available at:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;&lt;a href=&quot;http://www.murdoch-sutherland.com/Rtools/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.murdoch-sutherland.com/Rtools/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Grab the &amp;quot;Rtools210&amp;quot; installer as you are using R 2.10.x. &amp;nbsp;Install
&lt;br&gt;&amp;gt;&amp;gt; using the &amp;quot;Package Authoring&amp;quot; option and make sure you check any
&lt;br&gt;&amp;gt;&amp;gt; options that ask about modifying your PATH.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Good luck!
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; -Charlie
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [[alternative HTML version deleted]]
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26521137&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reading-from-Google-Docs-tp21023112p26521137.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26521075</id>
	<title>predict(): NoSuchMethodError</title>
	<published>2009-11-25T14:05:30Z</published>
	<updated>2009-11-25T14:05:30Z</updated>
	<author>
		<name>nstender49</name>
	</author>
	<content type="html">I am currently working on a code which clusters attributes from a data set, then uses a linear regression model to predict NA values in the data set. &amp;nbsp;The code works for almost all cases, but then errors out on a case that seems like it should work the same. 
&lt;br&gt;&lt;br&gt;&lt;b&gt;This is the line of code that is giving me the problem:&lt;/b&gt;&lt;br&gt;&lt;br&gt;NewClusterData[j,att] &amp;lt;- predict(cl,newdata = ClusterData[j,],type=&amp;quot;class&amp;quot;)
&lt;br&gt;&lt;br&gt;&lt;b&gt;Here is the code for the arguments:&lt;/b&gt;&lt;br&gt;&lt;br&gt;algName &amp;lt;- &amp;quot;LinearRegression&amp;quot;
&lt;br&gt;Formula &amp;lt;- as.formula(paste(as.name(att), &amp;quot; ~ &amp;quot;, &amp;nbsp;paste(otherAtts, collapse= &amp;quot;+&amp;quot;)))
&lt;br&gt;myAlg &amp;lt;- get(algName)
&lt;br&gt;cl &amp;lt;- myAlg(Formula, data = Data)
&lt;br&gt;&lt;br&gt;&lt;b&gt;And this is the error I'm getting:&lt;/b&gt;&lt;br&gt;&lt;br&gt;Error in .jnew(&amp;quot;weka/core/Attribute&amp;quot;, attname[i]) : java.lang.NoSuchMethodError: &amp;lt;init&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;b&gt;Here is the printout of the a working case:&lt;/b&gt;&lt;br&gt;&lt;br&gt;cl = Linear Regression Model
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; petallength =
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.748 &amp;nbsp;* sepallength +
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -1.4174 * sepalwidth +
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -2.1294
&lt;br&gt;&amp;nbsp; &amp;nbsp;
&lt;br&gt;ClusterData[j,] = sepallength sepalwidth petallength petalwidth class
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5.7 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2.6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NA &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&lt;br&gt;petallength = 4.148813
&lt;br&gt;&lt;br&gt;&lt;b&gt;And the non-working case:&lt;/b&gt;&lt;br&gt;&lt;br&gt;cl = Linear Regression Model
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; petalwidth =
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.8948 * class +
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.3031
&lt;br&gt;ClusterData[j,] = sepallength sepalwidth petallength petalwidth class
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4.9 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1.4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NA &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;&lt;br&gt;Error in .jnew(&amp;quot;weka/core/Attribute&amp;quot;, attname[i]) : 
&lt;br&gt;&amp;nbsp; java.lang.NoSuchMethodError: &amp;lt;init&amp;gt;
&lt;br&gt;&lt;br&gt;Thanks for any help that anyone can provide!</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/predict%28%29%3A-NoSuchMethodError-tp26521075p26521075.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26521073</id>
	<title>Re: R Packages Crack the 3,000 Mark!</title>
	<published>2009-11-25T14:02:13Z</published>
	<updated>2009-11-25T14:02:13Z</updated>
	<author>
		<name>Stephan Kolassa</name>
	</author>
	<content type="html">Hi Bob,
&lt;br&gt;&lt;br&gt;Muenchen, Robert A (Bob) wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Does anyone have a program that graphs the growth of R packages? I don't
&lt;br&gt;&amp;gt; know if that historical data is around.
&lt;br&gt;&lt;br&gt;John Fox had a slide on this in his useR 2008 talk &amp;quot;The Social 
&lt;br&gt;Organization of the R Project&amp;quot; (page 7), with package counts up to March 
&lt;br&gt;2008. As &amp;quot;Source of Data&amp;quot; he gave &lt;a href=&quot;https://svn.r-project.org/R/branches/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://svn.r-project.org/R/branches/&lt;/a&gt;. 
&lt;br&gt;I've been digging around in there but really have no idea how he found 
&lt;br&gt;the relevant data there.
&lt;br&gt;&lt;br&gt;I'd be quite interested in this, too, so if you find out anything please 
&lt;br&gt;drop me a line...
&lt;br&gt;&lt;br&gt;Best,
&lt;br&gt;Stephan
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26521073&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/R-Packages-Crack-the-3%2C000-Mark%21-tp26505155p26521073.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26520841</id>
	<title>Insert elements into a vector in a defined positions</title>
	<published>2009-11-25T13:46:53Z</published>
	<updated>2009-11-25T13:46:53Z</updated>
	<author>
		<name>Manuel Ramon</name>
	</author>
	<content type="html">Dear R users,
&lt;br&gt;I have a vector of length n and I want to insert some elements (in my case the NA string) into a defined positions. For example, my vector is z1 and I want to add NA's in positions 4, 6 y 7 so after that, my new vector, z2, should have a length of 10+3. 
&lt;br&gt;&lt;br&gt;&lt;i&gt;&amp;nbsp; z1 &amp;lt;- 1:10
&lt;br&gt;&amp;nbsp; id &amp;lt;- c(4,6,7)
&lt;br&gt;&lt;br&gt;&amp;nbsp; # And z2 should be: 
&lt;br&gt;&amp;nbsp; z2 &amp;lt;- c(1,2,3,NA,4,5,NA,NA,6,7,8,9,10)&lt;/i&gt;&lt;br&gt;&lt;br&gt;Anyone knows how can I do that?
&lt;br&gt;Thank you.&lt;div class=&quot;signature&quot;&gt;Manuel Ramón Fernández
&lt;br&gt;Group of Reproductive Biology (GBR)
&lt;br&gt;University of Castilla-La Mancha (Spain)
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=sig&amp;user=1322616&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mramon@...&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Insert-elements-into-a-vector-in-a-defined-positions-tp26520841p26520841.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26520800</id>
	<title>Re: Feature request for as.Date() function</title>
	<published>2009-11-25T13:42:22Z</published>
	<updated>2009-11-25T13:42:22Z</updated>
	<author>
		<name>smu-3</name>
	</author>
	<content type="html">hi,
&lt;br&gt;&lt;br&gt;it fails, when the NA is surrounded by double quotes, which is the
&lt;br&gt;default way of quoting of the write.table command.
&lt;br&gt;&lt;br&gt;x &amp;lt;- read.csv(textConnection('date,value
&lt;br&gt;+ + 2009-01-01,10
&lt;br&gt;+ + 2009-02-01,1
&lt;br&gt;+ + &amp;quot;NA&amp;quot;, 3'), colClasses=c(&amp;quot;Date&amp;quot;, 'integer'))
&lt;br&gt;Fehler in fromchar(x) : 
&lt;br&gt;character string is not in a standard unambiguous format
&lt;br&gt;&lt;br&gt;regards,
&lt;br&gt;&amp;nbsp;stefan
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Wed, Nov 25, 2009 at 02:56:56PM -0500, jim holtman wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Seems to work fine in my testing:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; x &amp;lt;- read.csv(textConnection(&amp;quot;date,value
&lt;br&gt;&amp;gt; + 2009-01-01,10
&lt;br&gt;&amp;gt; + 2009-02-01,1
&lt;br&gt;&amp;gt; + 'NA', 3&amp;quot;), colClasses=c(&amp;quot;Date&amp;quot;, 'integer'))
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; str(x)
&lt;br&gt;&amp;gt; 'data.frame': &amp;nbsp; 3 obs. of &amp;nbsp;2 variables:
&lt;br&gt;&amp;gt; &amp;nbsp;$ date :Class 'Date' &amp;nbsp;num [1:3] 14245 14276 NA
&lt;br&gt;&amp;gt; &amp;nbsp;$ value: int &amp;nbsp;10 1 3
&lt;br&gt;&amp;gt; &amp;gt; x &amp;lt;- read.csv(textConnection(&amp;quot;date,value
&lt;br&gt;&amp;gt; + 2009-01-01,10
&lt;br&gt;&amp;gt; + 2009-02-01,1
&lt;br&gt;&amp;gt; + NA, 3&amp;quot;), colClasses=c(&amp;quot;Date&amp;quot;, 'integer'))
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; str(x)
&lt;br&gt;&amp;gt; 'data.frame': &amp;nbsp; 3 obs. of &amp;nbsp;2 variables:
&lt;br&gt;&amp;gt; &amp;nbsp;$ date :Class 'Date' &amp;nbsp;num [1:3] 14245 14276 NA
&lt;br&gt;&amp;gt; &amp;nbsp;$ value: int &amp;nbsp;10 1 3
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;&amp;gt; and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Wed, Nov 25, 2009 at 12:38 PM,
&lt;br&gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520800&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;nabble.30.miller_2555@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; Hello -
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I have a csv file with a few date columns. Some of the records have an
&lt;br&gt;&amp;gt; &amp;gt; &amp;quot;NA&amp;quot; character string instead of the date. When I attempt to use
&lt;br&gt;&amp;gt; &amp;gt; read.csv() and typecast the columns using colClasses, I receive the
&lt;br&gt;&amp;gt; &amp;gt; following error:
&lt;br&gt;&amp;gt; &amp;gt;    Error in charToDate(x) :
&lt;br&gt;&amp;gt; &amp;gt;      character string is not in a standard unambiguous format
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Similarly, the following command produces the same error:
&lt;br&gt;&amp;gt; &amp;gt;    as.Date(&amp;quot;NA&amp;quot;)
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; However, as.Date(NA) performs as documented.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Can we enhance the as.Date() function to convert &amp;quot;NA&amp;quot; strings into NA
&lt;br&gt;&amp;gt; &amp;gt; value prior to type conversion?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Thanks!
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; ______________________________________________
&lt;br&gt;&amp;gt; &amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520800&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt; &amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; Jim Holtman
&lt;br&gt;&amp;gt; Cincinnati, OH
&lt;br&gt;&amp;gt; +1 513 646 9390
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; What is the problem that you are trying to solve?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520800&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;&amp;gt; PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;&amp;gt; and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520800&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Feature-request-for-as.Date%28%29-function-tp26518807p26520800.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26520717</id>
	<title>Re: Reading from Google Docs</title>
	<published>2009-11-25T13:34:58Z</published>
	<updated>2009-11-25T13:34:58Z</updated>
	<author>
		<name>Farrel Buchinsky</name>
	</author>
	<content type="html">That was painless. I had already installed Rtools and had already put it on
&lt;br&gt;my path.
&lt;br&gt;&lt;br&gt;Your line worked very well. [Thanks for telling me. However I did it last
&lt;br&gt;time was worse than sticking daggers in my eyes. ]
&lt;br&gt;&amp;nbsp;install.packages( &amp;quot;RGoogleDocs&amp;quot;, repos=&amp;quot;&lt;a href=&quot;http://www.omegahat.org/R&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.omegahat.org/R&lt;/a&gt;&amp;quot;,
&lt;br&gt;type=&amp;quot;source&amp;quot;
&lt;br&gt;)
&lt;br&gt;&lt;br&gt;I now have
&lt;br&gt;Package: RGoogleDocs
&lt;br&gt;Version: 0.4-0
&lt;br&gt;Title:....
&lt;br&gt;....
&lt;br&gt;Maintainer: Duncan Temple Lang &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520717&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;duncan@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Packaged: 2009-10-27 22:10:22 UTC; duncan
&lt;br&gt;Built: R 2.10.0; ; 2009-11-25 20:59:03 UTC; windows
&lt;br&gt;&lt;br&gt;I am providing the following link to a copy of my RGoogleDocs zipped
&lt;br&gt;directory. It is for people who run R in windows and do not want to go
&lt;br&gt;through the pain of setting things up so that they can install source.
&lt;br&gt;&lt;a href=&quot;http://dl.dropbox.com/u/23200/RGoogleDocs/RGoogleDocs.zip&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://dl.dropbox.com/u/23200/RGoogleDocs/RGoogleDocs.zip&lt;/a&gt;&lt;br&gt;&lt;br&gt;I BELIEVE that if one downloads the zip and extracts it to an empty
&lt;br&gt;directory called RGoogleDocs in one's Library directory then everything will
&lt;br&gt;work. Please let me know.
&lt;br&gt;&lt;br&gt;Farrel Buchinsky
&lt;br&gt;Google Voice Tel: (412) 567-7870
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Wed, Nov 25, 2009 at 15:15, Charlie Sharpsteen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520717&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;chuck@...&lt;/a&gt;&amp;gt;wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Wed, Nov 25, 2009 at 12:02 PM, Farrel Buchinsky &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520717&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fjbuch@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; I reinstalled from a binary that Duncan Temple Lang placed in omegahat. I
&lt;br&gt;&amp;gt; &amp;gt; see that omegahat has a subdirectory for each version of R. There is not
&lt;br&gt;&amp;gt; a
&lt;br&gt;&amp;gt; &amp;gt; directory for 2.10. I took the liberty of taking it from the 2.9
&lt;br&gt;&amp;gt; directory.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; That explains the warning message.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Who knows what crime I committed. Is that first or third degree murder.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Well, it's just a warning-- so it shouldn't be a show-stopper. &amp;nbsp;And
&lt;br&gt;&amp;gt; from what I see the warning is only referring to the package help
&lt;br&gt;&amp;gt; pages, which are available online. &amp;nbsp;It looks like the functionality of
&lt;br&gt;&amp;gt; the package should still work just fine if you don't want to bother
&lt;br&gt;&amp;gt; with a reinstall.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I saw however that there is a far more recent version of RGoogleDocs
&lt;br&gt;&amp;gt; (Last
&lt;br&gt;&amp;gt; &amp;gt; Release: 0.4-0 (27 Oct 2009)). But it is in tar.gz. I assume that it is
&lt;br&gt;&amp;gt; in
&lt;br&gt;&amp;gt; &amp;gt; source. Once before I spent about 27000 hours getting a source to become
&lt;br&gt;&amp;gt; a
&lt;br&gt;&amp;gt; &amp;gt; binary. I don't know how I finally got it right and am reluctant to
&lt;br&gt;&amp;gt; wander
&lt;br&gt;&amp;gt; &amp;gt; into that swamp again.
&lt;br&gt;&amp;gt; &amp;gt; Farrel Buchinsky
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This shouldn't be extraordinarily difficult-- unfortunately Murphy's
&lt;br&gt;&amp;gt; Law does come into play sometimes. &amp;nbsp;But it should just be a matter of:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;install.packages( &amp;quot;RGoogleDocs&amp;quot;, repos=&amp;quot;&lt;a href=&quot;http://www.omegahat.org/R&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.omegahat.org/R&lt;/a&gt;&amp;quot;,
&lt;br&gt;&amp;gt; type=&amp;quot;source&amp;quot; )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; And that's it for Linux, Mac OS or other UNIX-based system. &amp;nbsp;With
&lt;br&gt;&amp;gt; Windows you will first have to install the toolset available at:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;&lt;a href=&quot;http://www.murdoch-sutherland.com/Rtools/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.murdoch-sutherland.com/Rtools/&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Grab the &amp;quot;Rtools210&amp;quot; installer as you are using R 2.10.x. &amp;nbsp;Install
&lt;br&gt;&amp;gt; using the &amp;quot;Package Authoring&amp;quot; option and make sure you check any
&lt;br&gt;&amp;gt; options that ask about modifying your PATH.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Good luck!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -Charlie
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [[alternative HTML version deleted]]
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520717&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reading-from-Google-Docs-tp21023112p26520717.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26520680</id>
	<title>Re: order of panels in xyplots</title>
	<published>2009-11-25T13:32:39Z</published>
	<updated>2009-11-25T13:32:39Z</updated>
	<author>
		<name>Peter Ehlers</name>
	</author>
	<content type="html">&lt;br&gt;Titus Malsburg wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; The documentation of xyplot could be improved here. &amp;nbsp;It says:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;quot;If 'index.cond' is a list, it has to be as long as the number of conditioning
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;variables, and the 'i'-th component has to be a valid indexing vector for the
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;integer vector '1:nlevels(g_i)' (which can, among other things, repeat some
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;of the levels or drop some altogether).&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It should make explicit that nlevels is the number of levels actually
&lt;br&gt;&amp;gt; used in the data and not length(levels(f)).
&lt;br&gt;&amp;gt; 
&lt;/div&gt;It does say &amp;quot;... _valid_ indexing vector ...&amp;quot; (my emphasis).
&lt;br&gt;If nlevels(g) = 5, but you're only plotting 3 panels, it seems
&lt;br&gt;to me that c(3,1,5) might be a valid indexing vector.
&lt;br&gt;&lt;br&gt;&amp;nbsp; -Peter Ehlers
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Titus
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520680&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;&amp;gt; PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;&amp;gt; and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520680&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/order-of-panels-in-xyplots-tp26517646p26520680.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26520606</id>
	<title>Re: R or C++ on FreeNX servers</title>
	<published>2009-11-25T13:25:05Z</published>
	<updated>2009-11-25T13:25:05Z</updated>
	<author>
		<name>Tobias Verbeke-4</name>
	</author>
	<content type="html">Hi Murray,
&lt;br&gt;&lt;br&gt;Murray Jorgensen wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; I have just found out that the machine learning group in our Faculty has
&lt;br&gt;&amp;gt; a lot of spare capacity on their FreeNX servers. I do not know a lot
&lt;br&gt;&amp;gt; about these beasts but I understand that they are a free version of
&lt;br&gt;&amp;gt; something produced by a firm called &amp;quot;NoMachine&amp;quot;.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; They are designed for executing parallel algorithms and I thought that
&lt;br&gt;&amp;gt; they might be of use in a project of mine comparing different
&lt;br&gt;&amp;gt; model-fitting algorithms from the point of view of sensitivity to
&lt;br&gt;&amp;gt; starting values.
&lt;br&gt;&lt;br&gt;As far as I know FreeNX is an implementation of a protocol that
&lt;br&gt;allows to connect to remote X sessions (X being the standard
&lt;br&gt;windowing system for *nix systems) in an optimized way.
&lt;br&gt;&lt;br&gt;There is (in my understanding) no relationship to parallel algorithm
&lt;br&gt;execution. Using a NX client, you can connect to a remote (often
&lt;br&gt;more powerful) machine (potentially making use of multiple cores on
&lt;br&gt;that machine in a parallel way), but the FreeNX part of it is just
&lt;br&gt;about having the remote machine's GUI forwarded such that you can
&lt;br&gt;work &amp;quot;on the server&amp;quot; (in a window on) on your desktop machine.
&lt;br&gt;&lt;br&gt;HTH,
&lt;br&gt;Tobias
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Anyway before revealing my near-total ignorance to my computer science
&lt;br&gt;&amp;gt; colleagues I thought I would ask if any of my fellow R users have any
&lt;br&gt;&amp;gt; experience with these things and possibly advice to offer. The CS people
&lt;br&gt;&amp;gt; &amp;nbsp;are probably using the servers in conjunction with Java or C++ and I
&lt;br&gt;&amp;gt; could possibly use the latter of these. I wondered, though, if R could
&lt;br&gt;&amp;gt; be used directly with such hardware and if so, how the parallelizing
&lt;br&gt;&amp;gt; would be handled.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Regards, &amp;nbsp; Murray Jorgensen
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520606&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/R-or-C%2B%2B-on-FreeNX-servers-tp26520276p26520606.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26520475</id>
	<title>Re: lattice: plotting in a loop</title>
	<published>2009-11-25T13:18:22Z</published>
	<updated>2009-11-25T13:18:22Z</updated>
	<author>
		<name>Ryan Archer</name>
	</author>
	<content type="html">Ah, it's a FAQ ... thought I'd looked hard enough. &amp;nbsp;The ignominy, and for a
&lt;br&gt;first post! &amp;nbsp;Well, in any case, thanks a lot Baptiste.
&lt;br&gt;&lt;br&gt;2009/11/25 baptiste auguie &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520475&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;baptiste.auguie@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; it's a FAQ, you need to print() the plot,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-lattice_002ftrellis-graphics-not-work_003f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-lattice_002ftrellis-graphics-not-work_003f&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; baptiste
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 2009/11/25 Ryan Archer &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520475&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ra.lists.r@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt; &amp;gt; Hi,
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I'm having trouble seeing graphics output from lattice xyplot() when
&lt;br&gt;&amp;gt; called
&lt;br&gt;&amp;gt; &amp;gt; from inside a for loop:
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; x &amp;lt;- 1:50
&lt;br&gt;&amp;gt; &amp;gt; for ( i in 1:5 ) {
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;y &amp;lt;- rnorm(x)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;xyplot(y~x) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# no graphics when inside for-loop
&lt;br&gt;&amp;gt; &amp;gt; # plot(x,y) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# works fine
&lt;br&gt;&amp;gt; &amp;gt; # Sys.sleep(0.5) &amp;nbsp; &amp;nbsp; &amp;nbsp; # doesn't seem to help
&lt;br&gt;&amp;gt; &amp;gt; }
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; The xyplot() is fine outside the loop. &amp;nbsp;Results are the same to X11
&lt;br&gt;&amp;gt; device
&lt;br&gt;&amp;gt; &amp;gt; and to file devices.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I have noticed that there is a delay proportional to the size of the
&lt;br&gt;&amp;gt; loop,
&lt;br&gt;&amp;gt; &amp;gt; so presumably xyplot() is computing although the results aren't reaching
&lt;br&gt;&amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt; graphics device.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Can anyone suggest a cause or remedy?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; This is my first post to the list, although I've picked up a lot of
&lt;br&gt;&amp;gt; useful
&lt;br&gt;&amp;gt; &amp;gt; information reading here!
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; -Ryan
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[[alternative HTML version deleted]]
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; ______________________________________________
&lt;br&gt;&amp;gt; &amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520475&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt; &amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; PLEASE do read the posting guide
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [[alternative HTML version deleted]]
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520475&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/lattice%3A-plotting-in-a-loop-tp26520318p26520475.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26520458</id>
	<title>Re: How to sum only a few elements in a line</title>
	<published>2009-11-25T13:15:14Z</published>
	<updated>2009-11-25T13:15:14Z</updated>
	<author>
		<name>Peter Ehlers</name>
	</author>
	<content type="html">&lt;br&gt;Marcio Resende wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I have a matrix with the numbers 0,1 and 9
&lt;br&gt;&amp;gt; I would like to write a function that could sum each line skiping everytime
&lt;br&gt;&amp;gt; a number 9 appears
&lt;br&gt;&amp;gt; for example
&lt;br&gt;&amp;gt; [0 1 0 1 1 9 1]
&lt;br&gt;&amp;gt; the sum would be 4.
&lt;br&gt;&amp;gt; However I cannot replace 9 by 0 otherwise after the sum is done I wouldnÂ´t
&lt;br&gt;&amp;gt; be able to distiguish which ones were real zeros and which ones were nines
&lt;br&gt;&amp;gt; replaced by zero just to sum.
&lt;br&gt;&amp;gt; Thank you very much
&lt;br&gt;&amp;gt; 
&lt;/div&gt;In order to distinguish 'real' 0s from those resulting
&lt;br&gt;from elimination of 9s (without going back to the original
&lt;br&gt;matrix), you can do this:
&lt;br&gt;&lt;br&gt;f &amp;lt;- function(x){
&lt;br&gt;&amp;nbsp; &amp;nbsp;Sum &amp;lt;- sum(x[x != 9])
&lt;br&gt;&amp;nbsp; &amp;nbsp;has_9 &amp;lt;- 9 %in% x
&lt;br&gt;&amp;nbsp; &amp;nbsp;c(Sum = Sum, has_9 = has_9)
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;# make a sample matrix
&lt;br&gt;M &amp;lt;- matrix(sample(c(0,1,9), 30, TRUE), 6, 5)
&lt;br&gt;&lt;br&gt;# get sums and whether the row contained one or more 9s
&lt;br&gt;t(apply(M, 1, f))
&lt;br&gt;&lt;br&gt;&amp;nbsp; -Peter Ehlers
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520458&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-How-to-sum-only-a-few-elements-in-a-line-tp26520082p26520458.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26520386</id>
	<title>Re: lattice: plotting in a loop</title>
	<published>2009-11-25T13:11:21Z</published>
	<updated>2009-11-25T13:11:21Z</updated>
	<author>
		<name>baptiste auguie-5</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;it's a FAQ, you need to print() the plot,
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-lattice_002ftrellis-graphics-not-work_003f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-lattice_002ftrellis-graphics-not-work_003f&lt;/a&gt;&lt;br&gt;&lt;br&gt;baptiste
&lt;br&gt;&lt;br&gt;2009/11/25 Ryan Archer &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520386&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ra.lists.r@...&lt;/a&gt;&amp;gt;:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'm having trouble seeing graphics output from lattice xyplot() when called
&lt;br&gt;&amp;gt; from inside a for loop:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; x &amp;lt;- 1:50
&lt;br&gt;&amp;gt; for ( i in 1:5 ) {
&lt;br&gt;&amp;gt;  y &amp;lt;- rnorm(x)
&lt;br&gt;&amp;gt;  xyplot(y~x)          # no graphics when inside for-loop
&lt;br&gt;&amp;gt; # plot(x,y)            # works fine
&lt;br&gt;&amp;gt; # Sys.sleep(0.5)       # doesn't seem to help
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The xyplot() is fine outside the loop.  Results are the same to X11 device
&lt;br&gt;&amp;gt; and to file devices.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have noticed that there is a delay proportional to the size of the loop,
&lt;br&gt;&amp;gt; so presumably xyplot() is computing although the results aren't reaching the
&lt;br&gt;&amp;gt; graphics device.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Can anyone suggest a cause or remedy?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This is my first post to the list, although I've picked up a lot of useful
&lt;br&gt;&amp;gt; information reading here!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -Ryan
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;        [[alternative HTML version deleted]]
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520386&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;&amp;gt; PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;&amp;gt; and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520386&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/lattice%3A-plotting-in-a-loop-tp26520318p26520386.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26520339</id>
	<title>Re: R or C++ on FreeNX servers</title>
	<published>2009-11-25T13:09:04Z</published>
	<updated>2009-11-25T13:09:04Z</updated>
	<author>
		<name>Cedrick W. Johnson</name>
	</author>
	<content type="html">All FreeNX allows you to do is access a regular linux machine using X 
&lt;br&gt;over SSH as opposed to ssh'ing in, redirecting the X-display back to 
&lt;br&gt;your local machine (running a xserver locally)..
&lt;br&gt;&lt;br&gt;You can install R on the machine(s) just as you would normally, and if 
&lt;br&gt;the machines are in some sort of clustered environment, &amp;nbsp;you could setup 
&lt;br&gt;the packages specifically available on linux for R to do that (snow, 
&lt;br&gt;multicore, etc...)
&lt;br&gt;&lt;br&gt;Check out FreeNX here &lt;a href=&quot;http://freenx.berlios.de/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://freenx.berlios.de/&lt;/a&gt;&lt;br&gt;&lt;br&gt;hth
&lt;br&gt;-c
&lt;br&gt;&lt;br&gt;Murray Jorgensen wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi all,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have just found out that the machine learning group in our Faculty has
&lt;br&gt;&amp;gt; a lot of spare capacity on their FreeNX servers. I do not know a lot
&lt;br&gt;&amp;gt; about these beasts but I understand that they are a free version of
&lt;br&gt;&amp;gt; something produced by a firm called &amp;quot;NoMachine&amp;quot;.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; They are designed for executing parallel algorithms and I thought that
&lt;br&gt;&amp;gt; they might be of use in a project of mine comparing different
&lt;br&gt;&amp;gt; model-fitting algorithms from the point of view of sensitivity to
&lt;br&gt;&amp;gt; starting values.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Anyway before revealing my near-total ignorance to my computer science
&lt;br&gt;&amp;gt; colleagues I thought I would ask if any of my fellow R users have any
&lt;br&gt;&amp;gt; experience with these things and possibly advice to offer. The CS people
&lt;br&gt;&amp;gt; &amp;nbsp;are probably using the servers in conjunction with Java or C++ and I
&lt;br&gt;&amp;gt; could possibly use the latter of these. I wondered, though, if R could
&lt;br&gt;&amp;gt; be used directly with such hardware and if so, how the parallelizing
&lt;br&gt;&amp;gt; would be handled.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Regards, &amp;nbsp; Murray Jorgensen
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520339&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/R-or-C%2B%2B-on-FreeNX-servers-tp26520276p26520339.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26520318</id>
	<title>lattice: plotting in a loop</title>
	<published>2009-11-25T13:07:15Z</published>
	<updated>2009-11-25T13:07:15Z</updated>
	<author>
		<name>Ryan Archer</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;I'm having trouble seeing graphics output from lattice xyplot() when called
&lt;br&gt;from inside a for loop:
&lt;br&gt;&lt;br&gt;x &amp;lt;- 1:50
&lt;br&gt;for ( i in 1:5 ) {
&lt;br&gt;&amp;nbsp; y &amp;lt;- rnorm(x)
&lt;br&gt;&amp;nbsp; xyplot(y~x) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# no graphics when inside for-loop
&lt;br&gt;# plot(x,y) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# works fine
&lt;br&gt;# Sys.sleep(0.5) &amp;nbsp; &amp;nbsp; &amp;nbsp; # doesn't seem to help
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;The xyplot() is fine outside the loop. &amp;nbsp;Results are the same to X11 device
&lt;br&gt;and to file devices.
&lt;br&gt;&lt;br&gt;I have noticed that there is a delay proportional to the size of the loop,
&lt;br&gt;so presumably xyplot() is computing although the results aren't reaching the
&lt;br&gt;graphics device.
&lt;br&gt;&lt;br&gt;Can anyone suggest a cause or remedy?
&lt;br&gt;&lt;br&gt;This is my first post to the list, although I've picked up a lot of useful
&lt;br&gt;information reading here!
&lt;br&gt;&lt;br&gt;-Ryan
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [[alternative HTML version deleted]]
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520318&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/lattice%3A-plotting-in-a-loop-tp26520318p26520318.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26520276</id>
	<title>R or C++ on FreeNX servers</title>
	<published>2009-11-25T13:03:40Z</published>
	<updated>2009-11-25T13:03:40Z</updated>
	<author>
		<name>Murray Jorgensen-2</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;br&gt;I have just found out that the machine learning group in our Faculty has
&lt;br&gt;a lot of spare capacity on their FreeNX servers. I do not know a lot
&lt;br&gt;about these beasts but I understand that they are a free version of
&lt;br&gt;something produced by a firm called &amp;quot;NoMachine&amp;quot;.
&lt;br&gt;&lt;br&gt;They are designed for executing parallel algorithms and I thought that
&lt;br&gt;they might be of use in a project of mine comparing different
&lt;br&gt;model-fitting algorithms from the point of view of sensitivity to
&lt;br&gt;starting values.
&lt;br&gt;&lt;br&gt;Anyway before revealing my near-total ignorance to my computer science
&lt;br&gt;colleagues I thought I would ask if any of my fellow R users have any
&lt;br&gt;experience with these things and possibly advice to offer. The CS people
&lt;br&gt;&amp;nbsp; are probably using the servers in conjunction with Java or C++ and I
&lt;br&gt;could possibly use the latter of these. I wondered, though, if R could
&lt;br&gt;be used directly with such hardware and if so, how the parallelizing
&lt;br&gt;would be handled.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Regards, &amp;nbsp; Murray Jorgensen
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Dr Murray Jorgensen &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.stats.waikato.ac.nz/Staff/maj.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.stats.waikato.ac.nz/Staff/maj.html&lt;/a&gt;&lt;br&gt;Department of Statistics, University of Waikato, Hamilton, New Zealand
&lt;br&gt;Email: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520276&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;maj@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fax 7 838 4155
&lt;br&gt;Phone &amp;nbsp;+64 7 838 4773 wk &amp;nbsp; &amp;nbsp;Home +64 7 825 0441 &amp;nbsp; Mobile 021 0200 8350
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520276&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/R-or-C%2B%2B-on-FreeNX-servers-tp26520276p26520276.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26520082</id>
	<title>Re: How to sum only a few elements in a line</title>
	<published>2009-11-25T12:48:46Z</published>
	<updated>2009-11-25T12:48:46Z</updated>
	<author>
		<name>David Winsemius</name>
	</author>
	<content type="html">&lt;br&gt;On Nov 25, 2009, at 3:27 PM, Marcio Resende wrote:
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have a matrix with the numbers 0,1 and 9
&lt;br&gt;&amp;gt; I would like to write a function that could sum each line skiping &amp;nbsp;
&lt;br&gt;&amp;gt; everytime
&lt;br&gt;&amp;gt; a number 9 appears
&lt;br&gt;&amp;gt; for example
&lt;br&gt;&amp;gt; [0 1 0 1 1 9 1]
&lt;br&gt;&lt;br&gt;sum(x[x != 9])
&lt;br&gt;&lt;br&gt;&amp;gt; the sum would be 4.
&lt;br&gt;&amp;gt; However I cannot replace 9 by 0 otherwise after the sum is done I &amp;nbsp;
&lt;br&gt;&amp;gt; wouldn´t
&lt;br&gt;&amp;gt; be able to distiguish which ones were real zeros and which ones were &amp;nbsp;
&lt;br&gt;&amp;gt; nines
&lt;br&gt;&amp;gt; replaced by zero just to sum.
&lt;br&gt;&amp;gt; Thank you very much
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&lt;br&gt;David Winsemius, MD
&lt;br&gt;Heritage Laboratories
&lt;br&gt;West Hartford, CT
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520082&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-How-to-sum-only-a-few-elements-in-a-line-tp26520082p26520082.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26520032</id>
	<title>Re: How to sum only a few elements in a line</title>
	<published>2009-11-25T12:45:54Z</published>
	<updated>2009-11-25T12:45:54Z</updated>
	<author>
		<name>Peter Alspach-2</name>
	</author>
	<content type="html">Tena koe Marcio
&lt;br&gt;&lt;br&gt;Try something like (untested)
&lt;br&gt;&lt;br&gt;apply(yourMatrix, 1, function(x) sum(x[x!=9])) 
&lt;br&gt;&lt;br&gt;HTH ...
&lt;br&gt;&lt;br&gt;Peter Alspach
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520032&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help-bounces@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520032&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help-bounces@...&lt;/a&gt;] On Behalf Of Marcio Resende
&lt;br&gt;&amp;gt; Sent: Thursday, 26 November 2009 9:27 a.m.
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520032&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: [R] How to sum only a few elements in a line
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I have a matrix with the numbers 0,1 and 9 I would like to 
&lt;br&gt;&amp;gt; write a function that could sum each line skiping everytime a 
&lt;br&gt;&amp;gt; number 9 appears for example [0 1 0 1 1 9 1] the sum would be 4.
&lt;br&gt;&amp;gt; However I cannot replace 9 by 0 otherwise after the sum is 
&lt;br&gt;&amp;gt; done I wouldn´t be able to distiguish which ones were real 
&lt;br&gt;&amp;gt; zeros and which ones were nines replaced by zero just to sum.
&lt;br&gt;&amp;gt; Thank you very much
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/How-to-sum-only-a-few-elements-in-a-line&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/How-to-sum-only-a-few-elements-in-a-line&lt;/a&gt;&lt;br&gt;&amp;gt; -tp26519740p26519740.html
&lt;br&gt;&amp;gt; Sent from the R help mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520032&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;&amp;gt; PLEASE do read the posting guide 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;&amp;gt; and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520032&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-How-to-sum-only-a-few-elements-in-a-line-tp26520032p26520032.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26520058</id>
	<title>Re: How to sum only a few elements in a line</title>
	<published>2009-11-25T12:45:44Z</published>
	<updated>2009-11-25T12:45:44Z</updated>
	<author>
		<name>William Dunlap</name>
	</author>
	<content type="html">&lt;div class='shrinkable-quote'&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520058&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help-bounces@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520058&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help-bounces@...&lt;/a&gt;] On Behalf Of Marcio Resende
&lt;br&gt;&amp;gt; Sent: Wednesday, November 25, 2009 12:27 PM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520058&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: [R] How to sum only a few elements in a line
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I have a matrix with the numbers 0,1 and 9
&lt;br&gt;&amp;gt; I would like to write a function that could sum each line 
&lt;br&gt;&amp;gt; skiping everytime
&lt;br&gt;&amp;gt; a number 9 appears
&lt;br&gt;&amp;gt; for example
&lt;br&gt;&amp;gt; [0 1 0 1 1 9 1]
&lt;br&gt;&amp;gt; the sum would be 4.
&lt;br&gt;&amp;gt; However I cannot replace 9 by 0 otherwise after the sum is 
&lt;br&gt;&amp;gt; done I wouldn´t
&lt;br&gt;&amp;gt; be able to distiguish which ones were real zeros and which 
&lt;br&gt;&amp;gt; ones were nines
&lt;br&gt;&amp;gt; replaced by zero just to sum.
&lt;/div&gt;&lt;br&gt;One of the nice things about the S language is
&lt;br&gt;that arguments functions are not altered by the
&lt;br&gt;function. &amp;nbsp;When the function appears to alter
&lt;br&gt;an argument it is really altering a copy of it.
&lt;br&gt;Thus you can write a function like
&lt;br&gt;&amp;nbsp; &amp;nbsp; f &amp;lt;- function(matrix) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; matrix[matrix==9] &amp;lt;- 0
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rowSums(matrix)
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;and use it as
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;gt; myMatrix &amp;lt;- rbind(c(0,1,0,1,1,9,1), c(9,9,9,9,9,17,9))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;gt; f(myMatrix)
&lt;br&gt;&amp;nbsp; &amp;nbsp; [1] &amp;nbsp;4 17
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;gt; myMatrix # not altered by running f over it
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[,1] [,2] [,3] [,4] [,5] [,6] [,7]
&lt;br&gt;&amp;nbsp; &amp;nbsp; [1,] &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp;9 &amp;nbsp; &amp;nbsp;1
&lt;br&gt;&amp;nbsp; &amp;nbsp; [2,] &amp;nbsp; &amp;nbsp;9 &amp;nbsp; &amp;nbsp;9 &amp;nbsp; &amp;nbsp;9 &amp;nbsp; &amp;nbsp;9 &amp;nbsp; &amp;nbsp;9 &amp;nbsp; 17 &amp;nbsp; &amp;nbsp;9
&lt;br&gt;&lt;br&gt;By the way, it would help if you wrote your example data
&lt;br&gt;as an S expression, e.g., rbind(c(...),c(...)), and not
&lt;br&gt;as an expression in some other language, &amp;quot;[ 1 1 9 ]&amp;quot;.
&lt;br&gt;&lt;br&gt;Bill Dunlap
&lt;br&gt;Spotfire, TIBCO Software
&lt;br&gt;wdunlap tibco.com 
&lt;br&gt;&lt;br&gt;&amp;gt; Thank you very much
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; View this message in context: 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/How-to-sum-only-a-few-elements-in-a-line&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/How-to-sum-only-a-few-elements-in-a-line&lt;/a&gt;&lt;br&gt;-tp26519740p26519740.html
&lt;br&gt;&amp;gt; Sent from the R help mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520058&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;&amp;gt; PLEASE do read the posting guide 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;&amp;gt; and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520058&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-How-to-sum-only-a-few-elements-in-a-line-tp26520058p26520058.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26520012</id>
	<title>Re: Grouped Barplot</title>
	<published>2009-11-25T12:43:21Z</published>
	<updated>2009-11-25T12:43:21Z</updated>
	<author>
		<name>Gary-144</name>
	</author>
	<content type="html">I'm able to add legend. ~Gary
&lt;br&gt;&lt;br&gt;On Wed, Nov 25, 2009 at 3:15 PM, Gary &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520012&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mail2garymiller@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Thanks David. I reduced the data set and its copied below (also attached to
&lt;br&gt;&amp;gt; this email as text file). Now N=50, Only 2 years, Only 2 Cities. I tried:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; foo&amp;lt;-read.table(&amp;quot;SampleData.txt&amp;quot;, header=TRUE)
&lt;br&gt;&amp;gt; boxplot(foo$admit ~ foo$city + foo$year, col=2:3)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I need some help with:
&lt;br&gt;&amp;gt; 1) Defining labels for x-axis (just &amp;quot;2000&amp;quot; and &amp;quot;2001&amp;quot;).
&lt;br&gt;&amp;gt; 2) Removing gap between cities boxplots (but leaving gap between years).
&lt;br&gt;&amp;gt; 3) Adding &amp;quot;MEAN&amp;quot; to the boxplots.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; city &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; year &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; admit
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;&amp;gt; &amp;nbsp;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;&amp;gt; Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4
&lt;br&gt;&amp;gt; Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Sample: &lt;a href=&quot;http://www.imachordata.com/wp-content/uploads/2009/09/boxplot.png&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.imachordata.com/wp-content/uploads/2009/09/boxplot.png&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Wed, Nov 25, 2009 at 2:45 PM, David Winsemius &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520012&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dwinsemius@...&lt;/a&gt;&amp;gt;wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Nov 25, 2009, at 1:48 PM, Gary wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;Hi R Users,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I tried plotting a similar boxplot as it is on the FOLLOWING LINK:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.imachordata.com/wp-content/uploads/2009/09/boxplot.png&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.imachordata.com/wp-content/uploads/2009/09/boxplot.png&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Looks like a product of a function from ggplot2. In fact trimming that URL
&lt;br&gt;&amp;gt;&amp;gt; brings you to a page with the code that created it!
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Sample data is attached --
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; No, it's not. Read the Posting Guide for what file types are acceptable to
&lt;br&gt;&amp;gt;&amp;gt; the server. I suspect you will get better success if the extension is
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;.txt&amp;quot;, even if it is comma separated.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Or better yet follow the directions there for posting data in a form that
&lt;br&gt;&amp;gt;&amp;gt; can be enclosed in your posting and &amp;nbsp;copy-pasted into the console session.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;there are 9 years and 5 cities. In my case I'm
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; looking to plot &amp;quot;Year&amp;quot; on x-axis and grouping boxplots by &amp;quot;City&amp;quot;. I tried
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; the following code.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; foo&amp;lt;-read.table(&amp;quot;SampleData.csv&amp;quot;, sep=&amp;quot;,&amp;quot;, header=TRUE)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; attach(foo)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; boxplot(Admit ~ City + Year, range=0.5, col=2:6) # its not solving the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; purpose
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I need some help with:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 1) Plotting only 9 labels on x-axis (1996-2004).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 2) For each &amp;quot;Year&amp;quot;, I need to plot FIVE boxplots -- one for each &amp;quot;City&amp;quot;.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; [so
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; it will look like nine clusters with five boxplots each (with no gap
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; between
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; them, but with gaps between year labels].
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 3) Adding &amp;quot;MEAN&amp;quot; to the boxplots.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 4) And, legend including &amp;quot;color&amp;quot; + &amp;quot;city name&amp;quot;.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Any help would be greatly appreciated!
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; David Winsemius, MD
&lt;br&gt;&amp;gt;&amp;gt; Heritage Laboratories
&lt;br&gt;&amp;gt;&amp;gt; West Hartford, CT
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [[alternative HTML version deleted]]
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26520012&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Grouped-Barplot-tp26518433p26520012.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26519929</id>
	<title>Re: Mysterious R script behavior when called from webserver</title>
	<published>2009-11-25T12:41:21Z</published>
	<updated>2009-11-25T12:41:21Z</updated>
	<author>
		<name>Dylan Beaudette-3</name>
	</author>
	<content type="html">On Wednesday 25 November 2009, Barry Rowlingson wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Wed, Nov 25, 2009 at 8:15 PM, Dylan Beaudette
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519929&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;debeaudette@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; Hi,
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I am trying to transition a system based on dynamic image generation (via
&lt;br&gt;&amp;gt; &amp;gt; R) from our development system to a production environment. Our R script
&lt;br&gt;&amp;gt; &amp;gt; functions as expected when run by a regular user. However the script dies
&lt;br&gt;&amp;gt; &amp;gt; when calling the png() function, when started by the webserver user.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Here are some details
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;sessionInfo()
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; R version 2.9.2 (2009-08-24)
&lt;br&gt;&amp;gt; &amp;gt; i686-pc-linux-gnu
&lt;br&gt;&amp;gt; &amp;gt; locale:
&lt;br&gt;&amp;gt; &amp;gt; C
&lt;br&gt;&amp;gt; &amp;gt; attached base packages:
&lt;br&gt;&amp;gt; &amp;gt; [1] stats     graphics  grDevices utils     datasets  methods   base
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; The script gets to this line:
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; png(file=filename, width=600, height=400)
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; and then dies. It leaves an empty PNG file where it should be, however it
&lt;br&gt;&amp;gt; &amp;gt; never finishes the file. If
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I replace png() with pdf() an output file is generated and closed by
&lt;br&gt;&amp;gt; &amp;gt; dev.off() as expected.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; It seems like the environment is setup just as when started by a regular
&lt;br&gt;&amp;gt; &amp;gt; user, specifically the LD_LIBRARY_PATH variable.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; This behavior suggests that R is encountering an error, and stopping.
&lt;br&gt;&amp;gt; &amp;gt; However there is no reporting of the error. Is there any way to get more
&lt;br&gt;&amp;gt; &amp;gt; verbose error reporting?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;How is R run from your web server? Does it start a new R process or
&lt;br&gt;&amp;gt; is it an apache module thing with a dynamically linked R (if such a
&lt;br&gt;&amp;gt; thing even exists)? Can't figure out how you could get more error
&lt;br&gt;&amp;gt; reporting without knowing that - you need to see where stderr is
&lt;br&gt;&amp;gt; going, possibly to the apache error.log file - have you looked there?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;Have you tried a trivial png generating example, just a three liner:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; png(file=&amp;quot;/tmp/wherever/foo.png&amp;quot;)
&lt;br&gt;&amp;gt; plot(1:10)
&lt;br&gt;&amp;gt; dev.off()
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;just in case it's something else previous in your script that's
&lt;br&gt;&amp;gt; breaking things.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;In the old days of R you needed an X11 display connection to do PNG
&lt;br&gt;&amp;gt; graphics, but that was fixed before 2.9, I think. Try it interactively
&lt;br&gt;&amp;gt; but unset the DISPLAY variable first:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;export -n DISPLAY
&lt;br&gt;&amp;gt; &amp;nbsp;R
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;gt; png(... etc etc)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;Does that work?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Barry
&lt;/div&gt;&lt;br&gt;Hi Barry thanks for the tips. I was able to get more error reporting by 
&lt;br&gt;placing the png() function inside of try(). Turns out this was an X11 related 
&lt;br&gt;problem-- probably an unset DISPLAY variable for the www user. 
&lt;br&gt;&lt;br&gt;For the record, R was being run by PHP. I just realized that R was not 
&lt;br&gt;compiled with Cairo support-- fixing this should make the problems go away...
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Dylan
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Dylan Beaudette
&lt;br&gt;Soil Resource Laboratory
&lt;br&gt;&lt;a href=&quot;http://casoilresource.lawr.ucdavis.edu/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://casoilresource.lawr.ucdavis.edu/&lt;/a&gt;&lt;br&gt;University of California at Davis
&lt;br&gt;530.754.7341
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519929&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mysterious-R-script-behavior-when-called-from-webserver-tp26519712p26519929.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26519872</id>
	<title>Re: Mysterious R script behavior when called from webserver</title>
	<published>2009-11-25T12:36:01Z</published>
	<updated>2009-11-25T12:36:01Z</updated>
	<author>
		<name>Barry Rowlingson</name>
	</author>
	<content type="html">On Wed, Nov 25, 2009 at 8:15 PM, Dylan Beaudette
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519872&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;debeaudette@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I am trying to transition a system based on dynamic image generation (via R)
&lt;br&gt;&amp;gt; from our development system to a production environment. Our R script
&lt;br&gt;&amp;gt; functions as expected when run by a regular user. However the script dies
&lt;br&gt;&amp;gt; when calling the png() function, when started by the webserver user.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Here are some details
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;sessionInfo()
&lt;br&gt;&amp;gt; R version 2.9.2 (2009-08-24)
&lt;br&gt;&amp;gt; i686-pc-linux-gnu
&lt;br&gt;&amp;gt; locale:
&lt;br&gt;&amp;gt; C
&lt;br&gt;&amp;gt; attached base packages:
&lt;br&gt;&amp;gt; [1] stats     graphics  grDevices utils     datasets  methods   base
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The script gets to this line:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; png(file=filename, width=600, height=400)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; and then dies. It leaves an empty PNG file where it should be, however it
&lt;br&gt;&amp;gt; never finishes the file. If
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I replace png() with pdf() an output file is generated and closed by dev.off()
&lt;br&gt;&amp;gt; as expected.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It seems like the environment is setup just as when started by a regular user,
&lt;br&gt;&amp;gt; specifically the LD_LIBRARY_PATH variable.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This behavior suggests that R is encountering an error, and stopping. However
&lt;br&gt;&amp;gt; there is no reporting of the error. Is there any way to get more verbose
&lt;br&gt;&amp;gt; error reporting?
&lt;/div&gt;&lt;br&gt;&amp;nbsp;How is R run from your web server? Does it start a new R process or
&lt;br&gt;is it an apache module thing with a dynamically linked R (if such a
&lt;br&gt;thing even exists)? Can't figure out how you could get more error
&lt;br&gt;reporting without knowing that - you need to see where stderr is
&lt;br&gt;going, possibly to the apache error.log file - have you looked there?
&lt;br&gt;&lt;br&gt;&amp;nbsp;Have you tried a trivial png generating example, just a three liner:
&lt;br&gt;&lt;br&gt;png(file=&amp;quot;/tmp/wherever/foo.png&amp;quot;)
&lt;br&gt;plot(1:10)
&lt;br&gt;dev.off()
&lt;br&gt;&lt;br&gt;&amp;nbsp;just in case it's something else previous in your script that's
&lt;br&gt;breaking things.
&lt;br&gt;&lt;br&gt;&amp;nbsp;In the old days of R you needed an X11 display connection to do PNG
&lt;br&gt;graphics, but that was fixed before 2.9, I think. Try it interactively
&lt;br&gt;but unset the DISPLAY variable first:
&lt;br&gt;&lt;br&gt;&amp;nbsp;export -n DISPLAY
&lt;br&gt;&amp;nbsp;R
&lt;br&gt;&amp;nbsp; &amp;gt; png(... etc etc)
&lt;br&gt;&lt;br&gt;&amp;nbsp;Does that work?
&lt;br&gt;&lt;br&gt;Barry
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519872&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mysterious-R-script-behavior-when-called-from-webserver-tp26519712p26519872.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26519782</id>
	<title>error with hmm()?</title>
	<published>2009-11-25T12:29:10Z</published>
	<updated>2009-11-25T12:29:10Z</updated>
	<author>
		<name>alon.benari</name>
	</author>
	<content type="html">Hello R users,
&lt;br&gt;&lt;br&gt;I am suing library(hmm.discnp)
&lt;br&gt;I have a vector
&lt;br&gt;y
&lt;br&gt;&amp;quot;.... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0
&lt;br&gt;&amp;nbsp;[741] 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 2 2 1 0 0 0 0 0....&amp;quot;
&lt;br&gt;&lt;br&gt;So I did
&lt;br&gt;&lt;br&gt;y=y+1 &amp;nbsp;(Otherwise &amp;nbsp;R crahsed)
&lt;br&gt;&lt;br&gt;&amp;quot;... 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 6 1 1 1 1 1 1 1 1 1 1 1 1 1
&lt;br&gt;&amp;nbsp;[741] 1 1 1 1 1 1 1 1 1 6 1 1 1 1 1 1 1 3 3 2 1 1 ...&amp;quot;
&lt;br&gt;&lt;br&gt;I try to fit a hidden markov model &amp;nbsp;with two states.
&lt;br&gt;hmm(y,K=2)
&lt;br&gt;and this is what I get
&lt;br&gt;&lt;br&gt;Error in FUN(X[[1L]], ...) : subscript out of bounds?
&lt;br&gt;&lt;br&gt;where is my error?
&lt;br&gt;Thanks,
&lt;br&gt;below is the system I use.
&lt;br&gt;&lt;br&gt;version.string R version 2.8.1 (2008-12-22)
&lt;br&gt;platform &amp;nbsp; &amp;nbsp; &amp;nbsp; i686-suse-linux-gnu
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [[alternative HTML version deleted]]
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519782&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/error-with-hmm%28%29--tp26519782p26519782.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26519712</id>
	<title>Mysterious R script behavior when called from webserver</title>
	<published>2009-11-25T12:15:42Z</published>
	<updated>2009-11-25T12:15:42Z</updated>
	<author>
		<name>Dylan Beaudette-3</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;I am trying to transition a system based on dynamic image generation (via R) 
&lt;br&gt;from our development system to a production environment. Our R script 
&lt;br&gt;functions as expected when run by a regular user. However the script dies 
&lt;br&gt;when calling the png() function, when started by the webserver user.
&lt;br&gt;&lt;br&gt;Here are some details
&lt;br&gt;&lt;br&gt;&amp;gt;sessionInfo()
&lt;br&gt;R version 2.9.2 (2009-08-24)
&lt;br&gt;i686-pc-linux-gnu
&lt;br&gt;locale:
&lt;br&gt;C 
&lt;br&gt;attached base packages:
&lt;br&gt;[1] stats &amp;nbsp; &amp;nbsp; graphics &amp;nbsp;grDevices utils &amp;nbsp; &amp;nbsp; datasets &amp;nbsp;methods &amp;nbsp; base
&lt;br&gt;&lt;br&gt;The script gets to this line:
&lt;br&gt;&lt;br&gt;png(file=filename, width=600, height=400)
&lt;br&gt;&lt;br&gt;and then dies. It leaves an empty PNG file where it should be, however it 
&lt;br&gt;never finishes the file. If 
&lt;br&gt;&lt;br&gt;I replace png() with pdf() an output file is generated and closed by dev.off() 
&lt;br&gt;as expected.
&lt;br&gt;&lt;br&gt;It seems like the environment is setup just as when started by a regular user, 
&lt;br&gt;specifically the LD_LIBRARY_PATH variable.
&lt;br&gt;&lt;br&gt;This behavior suggests that R is encountering an error, and stopping. However 
&lt;br&gt;there is no reporting of the error. Is there any way to get more verbose 
&lt;br&gt;error reporting?
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Dylan
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Dylan Beaudette
&lt;br&gt;Soil Resource Laboratory
&lt;br&gt;&lt;a href=&quot;http://casoilresource.lawr.ucdavis.edu/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://casoilresource.lawr.ucdavis.edu/&lt;/a&gt;&lt;br&gt;University of California at Davis
&lt;br&gt;530.754.7341
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519712&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mysterious-R-script-behavior-when-called-from-webserver-tp26519712p26519712.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26519951</id>
	<title>Re: Reading from Google Docs</title>
	<published>2009-11-25T12:15:28Z</published>
	<updated>2009-11-25T12:15:28Z</updated>
	<author>
		<name>cls59</name>
	</author>
	<content type="html">On Wed, Nov 25, 2009 at 12:02 PM, Farrel Buchinsky &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519951&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fjbuch@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; I reinstalled from a binary that Duncan Temple Lang placed in omegahat. I
&lt;br&gt;&amp;gt; see that omegahat has a subdirectory for each version of R. There is not a
&lt;br&gt;&amp;gt; directory for 2.10. I took the liberty of taking it from the 2.9 directory.
&lt;br&gt;&lt;br&gt;That explains the warning message.
&lt;br&gt;&lt;br&gt;&amp;gt; Who knows what crime I committed. Is that first or third degree murder.
&lt;br&gt;&lt;br&gt;Well, it's just a warning-- so it shouldn't be a show-stopper. &amp;nbsp;And
&lt;br&gt;from what I see the warning is only referring to the package help
&lt;br&gt;pages, which are available online. &amp;nbsp;It looks like the functionality of
&lt;br&gt;the package should still work just fine if you don't want to bother
&lt;br&gt;with a reinstall.
&lt;br&gt;&lt;br&gt;&amp;gt; I saw however that there is a far more recent version of RGoogleDocs (Last
&lt;br&gt;&amp;gt; Release: 0.4-0 (27 Oct 2009)). But it is in tar.gz. I assume that it is in
&lt;br&gt;&amp;gt; source. Once before I spent about 27000 hours getting a source to become a
&lt;br&gt;&amp;gt; binary. I don't know how I finally got it right and am reluctant to wander
&lt;br&gt;&amp;gt; into that swamp again.
&lt;br&gt;&amp;gt; Farrel Buchinsky
&lt;br&gt;&lt;br&gt;This shouldn't be extraordinarily difficult-- unfortunately Murphy's
&lt;br&gt;Law does come into play sometimes. &amp;nbsp;But it should just be a matter of:
&lt;br&gt;&lt;br&gt;&amp;nbsp; install.packages( &amp;quot;RGoogleDocs&amp;quot;, repos=&amp;quot;&lt;a href=&quot;http://www.omegahat.org/R&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.omegahat.org/R&lt;/a&gt;&amp;quot;,
&lt;br&gt;type=&amp;quot;source&amp;quot; )
&lt;br&gt;&lt;br&gt;And that's it for Linux, Mac OS or other UNIX-based system. &amp;nbsp;With
&lt;br&gt;Windows you will first have to install the toolset available at:
&lt;br&gt;&lt;br&gt;&amp;nbsp;&lt;a href=&quot;http://www.murdoch-sutherland.com/Rtools/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.murdoch-sutherland.com/Rtools/&lt;/a&gt;&lt;br&gt;&lt;br&gt;Grab the &amp;quot;Rtools210&amp;quot; installer as you are using R 2.10.x. &amp;nbsp;Install
&lt;br&gt;using the &amp;quot;Package Authoring&amp;quot; option and make sure you check any
&lt;br&gt;options that ask about modifying your PATH.
&lt;br&gt;&lt;br&gt;Good luck!
&lt;br&gt;&lt;br&gt;-Charlie
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519951&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;div class=&quot;signature&quot;&gt;Charlie Sharpsteen
&lt;br&gt;Undergraduate
&lt;br&gt;Environmental Resources Engineering
&lt;br&gt;Humboldt State University&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reading-from-Google-Docs-tp21023112p26519951.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26519713</id>
	<title>Re: Grouped Barplot</title>
	<published>2009-11-25T12:15:05Z</published>
	<updated>2009-11-25T12:15:05Z</updated>
	<author>
		<name>Gary-144</name>
	</author>
	<content type="html">Thanks David. I reduced the data set and its copied below (also attached to
&lt;br&gt;this email as text file). Now N=50, Only 2 years, Only 2 Cities. I tried:
&lt;br&gt;&lt;br&gt;foo&amp;lt;-read.table(&amp;quot;SampleData.txt&amp;quot;, header=TRUE)
&lt;br&gt;boxplot(foo$admit ~ foo$city + foo$year, col=2:3)
&lt;br&gt;&lt;br&gt;I need some help with:
&lt;br&gt;1) Defining labels for x-axis (just &amp;quot;2000&amp;quot; and &amp;quot;2001&amp;quot;).
&lt;br&gt;2) Removing gap between cities boxplots (but leaving gap between years).
&lt;br&gt;3) Adding &amp;quot;MEAN&amp;quot; to the boxplots.
&lt;br&gt;4) Adding legend including &amp;quot;color&amp;quot; + &amp;quot;city name&amp;quot;.
&lt;br&gt;&lt;br&gt;city &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; year &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; admit
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&lt;br&gt;Sample: &lt;a href=&quot;http://www.imachordata.com/wp-content/uploads/2009/09/boxplot.png&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.imachordata.com/wp-content/uploads/2009/09/boxplot.png&lt;/a&gt;&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Wed, Nov 25, 2009 at 2:45 PM, David Winsemius &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519713&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dwinsemius@...&lt;/a&gt;&amp;gt;wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Nov 25, 2009, at 1:48 PM, Gary wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;Hi R Users,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I tried plotting a similar boxplot as it is on the FOLLOWING LINK:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.imachordata.com/wp-content/uploads/2009/09/boxplot.png&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.imachordata.com/wp-content/uploads/2009/09/boxplot.png&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Looks like a product of a function from ggplot2. In fact trimming that URL
&lt;br&gt;&amp;gt; brings you to a page with the code that created it!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Sample data is attached --
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; No, it's not. Read the Posting Guide for what file types are acceptable to
&lt;br&gt;&amp;gt; the server. I suspect you will get better success if the extension is
&lt;br&gt;&amp;gt; &amp;quot;.txt&amp;quot;, even if it is comma separated.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Or better yet follow the directions there for posting data in a form that
&lt;br&gt;&amp;gt; can be enclosed in your posting and &amp;nbsp;copy-pasted into the console session.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;there are 9 years and 5 cities. In my case I'm
&lt;br&gt;&amp;gt;&amp;gt; looking to plot &amp;quot;Year&amp;quot; on x-axis and grouping boxplots by &amp;quot;City&amp;quot;. I tried
&lt;br&gt;&amp;gt;&amp;gt; the following code.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; foo&amp;lt;-read.table(&amp;quot;SampleData.csv&amp;quot;, sep=&amp;quot;,&amp;quot;, header=TRUE)
&lt;br&gt;&amp;gt;&amp;gt; attach(foo)
&lt;br&gt;&amp;gt;&amp;gt; boxplot(Admit ~ City + Year, range=0.5, col=2:6) # its not solving the
&lt;br&gt;&amp;gt;&amp;gt; purpose
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I need some help with:
&lt;br&gt;&amp;gt;&amp;gt; 1) Plotting only 9 labels on x-axis (1996-2004).
&lt;br&gt;&amp;gt;&amp;gt; 2) For each &amp;quot;Year&amp;quot;, I need to plot FIVE boxplots -- one for each &amp;quot;City&amp;quot;.
&lt;br&gt;&amp;gt;&amp;gt; [so
&lt;br&gt;&amp;gt;&amp;gt; it will look like nine clusters with five boxplots each (with no gap
&lt;br&gt;&amp;gt;&amp;gt; between
&lt;br&gt;&amp;gt;&amp;gt; them, but with gaps between year labels].
&lt;br&gt;&amp;gt;&amp;gt; 3) Adding &amp;quot;MEAN&amp;quot; to the boxplots.
&lt;br&gt;&amp;gt;&amp;gt; 4) And, legend including &amp;quot;color&amp;quot; + &amp;quot;city name&amp;quot;.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Any help would be greatly appreciated!
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; David Winsemius, MD
&lt;br&gt;&amp;gt; Heritage Laboratories
&lt;br&gt;&amp;gt; West Hartford, CT
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;city &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; year &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; admit
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Asheville &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4
&lt;br&gt;Charlotte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&lt;br /&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519713&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Grouped-Barplot-tp26518433p26519713.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26519298</id>
	<title>Re: Feature request for as.Date() function</title>
	<published>2009-11-25T11:56:56Z</published>
	<updated>2009-11-25T11:56:56Z</updated>
	<author>
		<name>jholtman</name>
	</author>
	<content type="html">Seems to work fine in my testing:
&lt;br&gt;&lt;br&gt;&amp;gt; x &amp;lt;- read.csv(textConnection(&amp;quot;date,value
&lt;br&gt;+ 2009-01-01,10
&lt;br&gt;+ 2009-02-01,1
&lt;br&gt;+ 'NA', 3&amp;quot;), colClasses=c(&amp;quot;Date&amp;quot;, 'integer'))
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; str(x)
&lt;br&gt;'data.frame': &amp;nbsp; 3 obs. of &amp;nbsp;2 variables:
&lt;br&gt;&amp;nbsp;$ date :Class 'Date' &amp;nbsp;num [1:3] 14245 14276 NA
&lt;br&gt;&amp;nbsp;$ value: int &amp;nbsp;10 1 3
&lt;br&gt;&amp;gt; x &amp;lt;- read.csv(textConnection(&amp;quot;date,value
&lt;br&gt;+ 2009-01-01,10
&lt;br&gt;+ 2009-02-01,1
&lt;br&gt;+ NA, 3&amp;quot;), colClasses=c(&amp;quot;Date&amp;quot;, 'integer'))
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; str(x)
&lt;br&gt;'data.frame': &amp;nbsp; 3 obs. of &amp;nbsp;2 variables:
&lt;br&gt;&amp;nbsp;$ date :Class 'Date' &amp;nbsp;num [1:3] 14245 14276 NA
&lt;br&gt;&amp;nbsp;$ value: int &amp;nbsp;10 1 3
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;br&gt;On Wed, Nov 25, 2009 at 12:38 PM,
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519298&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;nabble.30.miller_2555@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello -
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have a csv file with a few date columns. Some of the records have an
&lt;br&gt;&amp;gt; &amp;quot;NA&amp;quot; character string instead of the date. When I attempt to use
&lt;br&gt;&amp;gt; read.csv() and typecast the columns using colClasses, I receive the
&lt;br&gt;&amp;gt; following error:
&lt;br&gt;&amp;gt;    Error in charToDate(x) :
&lt;br&gt;&amp;gt;      character string is not in a standard unambiguous format
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Similarly, the following command produces the same error:
&lt;br&gt;&amp;gt;    as.Date(&amp;quot;NA&amp;quot;)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; However, as.Date(NA) performs as documented.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Can we enhance the as.Date() function to convert &amp;quot;NA&amp;quot; strings into NA
&lt;br&gt;&amp;gt; value prior to type conversion?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519298&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;&amp;gt; PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;&amp;gt; and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Jim Holtman
&lt;br&gt;Cincinnati, OH
&lt;br&gt;+1 513 646 9390
&lt;br&gt;&lt;br&gt;What is the problem that you are trying to solve?
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519298&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Feature-request-for-as.Date%28%29-function-tp26518807p26519298.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26519121</id>
	<title>Re: Grouped Barplot</title>
	<published>2009-11-25T11:45:30Z</published>
	<updated>2009-11-25T11:45:30Z</updated>
	<author>
		<name>David Winsemius</name>
	</author>
	<content type="html">&lt;br&gt;On Nov 25, 2009, at 1:48 PM, Gary wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Hi R Users,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I tried plotting a similar boxplot as it is on the FOLLOWING LINK:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.imachordata.com/wp-content/uploads/2009/09/boxplot.png&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.imachordata.com/wp-content/uploads/2009/09/boxplot.png&lt;/a&gt;&lt;br&gt;&lt;br&gt;Looks like a product of a function from ggplot2. In fact trimming that &amp;nbsp;
&lt;br&gt;URL brings you to a page with the code that created it!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Sample data is attached --
&lt;br&gt;&lt;br&gt;No, it's not. Read the Posting Guide for what file types are &amp;nbsp;
&lt;br&gt;acceptable to the server. I suspect you will get better success if the &amp;nbsp;
&lt;br&gt;extension is &amp;quot;.txt&amp;quot;, even if it is comma separated.
&lt;br&gt;&lt;br&gt;Or better yet follow the directions there for posting data in a form &amp;nbsp;
&lt;br&gt;that can be enclosed in your posting and &amp;nbsp;copy-pasted into the console &amp;nbsp;
&lt;br&gt;session.
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; there are 9 years and 5 cities. In my case I'm
&lt;br&gt;&amp;gt; looking to plot &amp;quot;Year&amp;quot; on x-axis and grouping boxplots by &amp;quot;City&amp;quot;. I &amp;nbsp;
&lt;br&gt;&amp;gt; tried
&lt;br&gt;&amp;gt; the following code.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; foo&amp;lt;-read.table(&amp;quot;SampleData.csv&amp;quot;, sep=&amp;quot;,&amp;quot;, header=TRUE)
&lt;br&gt;&amp;gt; attach(foo)
&lt;br&gt;&amp;gt; boxplot(Admit ~ City + Year, range=0.5, col=2:6) # its not solving the
&lt;br&gt;&amp;gt; purpose
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I need some help with:
&lt;br&gt;&amp;gt; 1) Plotting only 9 labels on x-axis (1996-2004).
&lt;br&gt;&amp;gt; 2) For each &amp;quot;Year&amp;quot;, I need to plot FIVE boxplots -- one for each &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;quot;City&amp;quot;. [so
&lt;br&gt;&amp;gt; it will look like nine clusters with five boxplots each (with no gap &amp;nbsp;
&lt;br&gt;&amp;gt; between
&lt;br&gt;&amp;gt; them, but with gaps between year labels].
&lt;br&gt;&amp;gt; 3) Adding &amp;quot;MEAN&amp;quot; to the boxplots.
&lt;br&gt;&amp;gt; 4) And, legend including &amp;quot;color&amp;quot; + &amp;quot;city name&amp;quot;.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Any help would be greatly appreciated!
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;David Winsemius, MD
&lt;br&gt;Heritage Laboratories
&lt;br&gt;West Hartford, CT
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519121&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Grouped-Barplot-tp26518433p26519121.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26519108</id>
	<title>Re: Reading from Google Docs</title>
	<published>2009-11-25T11:44:44Z</published>
	<updated>2009-11-25T11:44:44Z</updated>
	<author>
		<name>cls59</name>
	</author>
	<content type="html">On Wed, Nov 25, 2009 at 5:39 AM, Farrel Buchinsky &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519108&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fjbuch@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I recently installed R 2.10
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Now I get
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; library(RGoogleDocs)
&lt;br&gt;&amp;gt; Loading required package: RCurl
&lt;br&gt;&amp;gt; Loading required package: bitops
&lt;br&gt;&amp;gt; Loading required package: XML
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Attaching package: 'RGoogleDocs'
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;        The following object(s) are masked from package:methods :
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;         getAccess
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Warning message:
&lt;br&gt;&amp;gt; package 'RGoogleDocs' was built under R version 2.9.1 and help will not work
&lt;br&gt;&amp;gt; correctly
&lt;br&gt;&amp;gt; Please re-install it
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; But alas reinstalling it does not take away the error message.
&lt;br&gt;&amp;gt; Farrel Buchinsky
&lt;/div&gt;&lt;br&gt;How did you try reinstalling it? &amp;nbsp;It sounds like you are using a
&lt;br&gt;binary distribution that was built under 2.9.1-- you probably have to
&lt;br&gt;build and install from a source distribution of the package.
&lt;br&gt;&lt;br&gt;-Charlie
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519108&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;div class=&quot;signature&quot;&gt;Charlie Sharpsteen
&lt;br&gt;Undergraduate
&lt;br&gt;Environmental Resources Engineering
&lt;br&gt;Humboldt State University&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reading-from-Google-Docs-tp21023112p26519108.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26519087</id>
	<title>Re: help writing for loop</title>
	<published>2009-11-25T11:40:07Z</published>
	<updated>2009-11-25T11:40:07Z</updated>
	<author>
		<name>Steven McKinney</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;The great thing about the S language is that it is 'vectorized',
&lt;br&gt;so you can do a lot of matrix manipulations without loops.
&lt;br&gt;&lt;br&gt;Here's a smaller example of what you describe.
&lt;br&gt;matrix A with 3 columns and 10 rows (instead of 100)
&lt;br&gt;matrix B with 3 columns and 15 rows (instead of 1500)
&lt;br&gt;&lt;br&gt;&amp;gt; set.seed(123)
&lt;br&gt;&amp;gt; mA &amp;lt;- matrix(runif(30), ncol = 3)
&lt;br&gt;&amp;gt; mA
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[,1] &amp;nbsp; &amp;nbsp; &amp;nbsp; [,2] &amp;nbsp; &amp;nbsp; &amp;nbsp;[,3]
&lt;br&gt;&amp;nbsp;[1,] 0.2875775 0.95683335 0.8895393
&lt;br&gt;&amp;nbsp;[2,] 0.7883051 0.45333416 0.6928034
&lt;br&gt;&amp;nbsp;[3,] 0.4089769 0.67757064 0.6405068
&lt;br&gt;&amp;nbsp;[4,] 0.8830174 0.57263340 0.9942698
&lt;br&gt;&amp;nbsp;[5,] 0.9404673 0.10292468 0.6557058
&lt;br&gt;&amp;nbsp;[6,] 0.0455565 0.89982497 0.7085305
&lt;br&gt;&amp;nbsp;[7,] 0.5281055 0.24608773 0.5440660
&lt;br&gt;&amp;nbsp;[8,] 0.8924190 0.04205953 0.5941420
&lt;br&gt;&amp;nbsp;[9,] 0.5514350 0.32792072 0.2891597
&lt;br&gt;[10,] 0.4566147 0.95450365 0.1471136
&lt;br&gt;&lt;br&gt;&amp;gt; x &amp;lt;- seq(15)
&lt;br&gt;&amp;gt; mB &amp;lt;- cbind(1, x, x^2)
&lt;br&gt;&amp;gt; mB
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;x &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp;[1,] 1 &amp;nbsp;1 &amp;nbsp; 1
&lt;br&gt;&amp;nbsp;[2,] 1 &amp;nbsp;2 &amp;nbsp; 4
&lt;br&gt;&amp;nbsp;[3,] 1 &amp;nbsp;3 &amp;nbsp; 9
&lt;br&gt;&amp;nbsp;[4,] 1 &amp;nbsp;4 &amp;nbsp;16
&lt;br&gt;&amp;nbsp;[5,] 1 &amp;nbsp;5 &amp;nbsp;25
&lt;br&gt;&amp;nbsp;[6,] 1 &amp;nbsp;6 &amp;nbsp;36
&lt;br&gt;&amp;nbsp;[7,] 1 &amp;nbsp;7 &amp;nbsp;49
&lt;br&gt;&amp;nbsp;[8,] 1 &amp;nbsp;8 &amp;nbsp;64
&lt;br&gt;&amp;nbsp;[9,] 1 &amp;nbsp;9 &amp;nbsp;81
&lt;br&gt;[10,] 1 10 100
&lt;br&gt;[11,] 1 11 121
&lt;br&gt;[12,] 1 12 144
&lt;br&gt;[13,] 1 13 169
&lt;br&gt;[14,] 1 14 196
&lt;br&gt;[15,] 1 15 225
&lt;br&gt;&lt;br&gt;&amp;gt; mR &amp;lt;- apply(mB, 1, function(x){mA %*% x})
&lt;br&gt;&amp;gt; mR
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [,1] &amp;nbsp; &amp;nbsp; [,2] &amp;nbsp; &amp;nbsp; &amp;nbsp;[,3] &amp;nbsp; &amp;nbsp; &amp;nbsp;[,4] &amp;nbsp; &amp;nbsp; &amp;nbsp;[,5] &amp;nbsp; &amp;nbsp; [,6] &amp;nbsp; &amp;nbsp; [,7]
&lt;br&gt;&amp;nbsp;[1,] 2.133950 5.759401 11.163931 18.347540 27.310227 38.05199 50.57284
&lt;br&gt;&amp;nbsp;[2,] 1.934443 4.466187 &amp;nbsp;8.383538 13.686496 20.375061 28.44923 37.90901
&lt;br&gt;&amp;nbsp;[3,] 1.727054 4.326145 &amp;nbsp;8.206250 13.367368 19.809500 27.53265 36.53681
&lt;br&gt;&amp;nbsp;[4,] 2.449921 6.005363 11.549346 19.081867 28.602929 40.11253 53.61067
&lt;br&gt;&amp;nbsp;[5,] 1.699098 3.769140 &amp;nbsp;7.150594 11.843459 17.847736 25.16342 33.79052
&lt;br&gt;&amp;nbsp;[6,] 1.653912 4.679328 &amp;nbsp;9.121806 14.981344 22.257943 30.95160 41.06232
&lt;br&gt;&amp;nbsp;[7,] 1.318259 3.196545 &amp;nbsp;6.162963 10.217513 15.360195 21.59101 28.90995
&lt;br&gt;&amp;nbsp;[8,] 1.528621 3.353106 &amp;nbsp;6.365876 10.566930 15.956267 22.53389 30.29979
&lt;br&gt;&amp;nbsp;[9,] 1.168515 2.363915 &amp;nbsp;4.137635 &amp;nbsp;6.489674 &amp;nbsp;9.420032 12.92871 17.01571
&lt;br&gt;[10,] 1.558232 2.954077 &amp;nbsp;4.644149 &amp;nbsp;6.628448 &amp;nbsp;8.906974 11.47973 14.34671
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [,8] &amp;nbsp; &amp;nbsp; [,9] &amp;nbsp; &amp;nbsp; [,10] &amp;nbsp; &amp;nbsp; [,11] &amp;nbsp; &amp;nbsp; [,12] &amp;nbsp; &amp;nbsp; [,13] &amp;nbsp; &amp;nbsp; [,14]
&lt;br&gt;&amp;nbsp;[1,] 64.87276 80.95176 &amp;nbsp;98.80984 118.44700 139.86324 163.05856 188.03295
&lt;br&gt;&amp;nbsp;[2,] 48.75440 60.98539 &amp;nbsp;74.60199 &amp;nbsp;89.60419 105.99201 123.76542 142.92445
&lt;br&gt;&amp;nbsp;[3,] 46.82198 58.38816 &amp;nbsp;71.23536 &amp;nbsp;85.36358 100.77281 117.46305 135.43430
&lt;br&gt;&amp;nbsp;[4,] 69.09735 86.57257 106.03633 127.48863 150.92947 176.35884 203.77676
&lt;br&gt;&amp;nbsp;[5,] 43.72904 54.97896 &amp;nbsp;67.54029 &amp;nbsp;81.41304 &amp;nbsp;96.59720 113.09277 130.89975
&lt;br&gt;&amp;nbsp;[6,] 52.59011 65.53495 &amp;nbsp;79.89685 &amp;nbsp;95.67582 112.87184 131.48493 151.51508
&lt;br&gt;&amp;nbsp;[7,] 37.31703 46.81224 &amp;nbsp;57.39559 &amp;nbsp;69.06706 &amp;nbsp;81.82667 &amp;nbsp;95.67440 110.61027
&lt;br&gt;&amp;nbsp;[8,] 39.25398 49.39646 &amp;nbsp;60.72722 &amp;nbsp;73.24626 &amp;nbsp;86.95358 101.84919 117.93309
&lt;br&gt;&amp;nbsp;[9,] 21.68102 26.92466 &amp;nbsp;32.74662 &amp;nbsp;39.14689 &amp;nbsp;46.12549 &amp;nbsp;53.68240 &amp;nbsp;61.81763
&lt;br&gt;[10,] 17.50792 20.96335 &amp;nbsp;24.71302 &amp;nbsp;28.75691 &amp;nbsp;33.09502 &amp;nbsp;37.72737 &amp;nbsp;42.65394
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [,15]
&lt;br&gt;&amp;nbsp;[1,] 214.78642
&lt;br&gt;&amp;nbsp;[2,] 163.46908
&lt;br&gt;&amp;nbsp;[3,] 154.68657
&lt;br&gt;&amp;nbsp;[4,] 233.18322
&lt;br&gt;&amp;nbsp;[5,] 150.01814
&lt;br&gt;&amp;nbsp;[6,] 172.96229
&lt;br&gt;&amp;nbsp;[7,] 126.63428
&lt;br&gt;&amp;nbsp;[8,] 135.20527
&lt;br&gt;&amp;nbsp;[9,] &amp;nbsp;70.53119
&lt;br&gt;[10,] &amp;nbsp;47.87474
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;so the results matrix mR has one column for each element of x,
&lt;br&gt;and the i-th row element is the solution for
&lt;br&gt;y = a + bx + cx^2
&lt;br&gt;for the i-th row of coefficients in the parameter estimates matrix mA
&lt;br&gt;&lt;br&gt;You can spot check with e.g. 
&lt;br&gt;&lt;br&gt;&amp;gt; mA[1,] %*% mB[15,]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[,1]
&lt;br&gt;[1,] 214.7864
&lt;br&gt;&amp;gt; mA[1,] %*% mB[5,]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[,1]
&lt;br&gt;[1,] 27.31023
&lt;br&gt;&amp;gt; mA[1,]
&lt;br&gt;[1] 0.2875775 0.9568333 0.8895393
&lt;br&gt;&amp;gt; mB[5,]
&lt;br&gt;&amp;nbsp; &amp;nbsp; x &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp;1 &amp;nbsp;5 25 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;HTH
&lt;br&gt;&lt;br&gt;Steven McKinney, Ph.D.
&lt;br&gt;&lt;br&gt;Statistician
&lt;br&gt;Molecular Oncology and Breast Cancer Program
&lt;br&gt;British Columbia Cancer Research Centre
&lt;br&gt;&lt;br&gt;email: smckinney +at+ bccrc +dot+ ca
&lt;br&gt;&lt;br&gt;tel: 604-675-8000 x7561
&lt;br&gt;&lt;br&gt;BCCRC
&lt;br&gt;Molecular Oncology
&lt;br&gt;675 West 10th Ave, Floor 4
&lt;br&gt;Vancouver B.C.
&lt;br&gt;V5Z 1L3
&lt;br&gt;Canada
&lt;br&gt;&lt;br&gt;________________________________________
&lt;br&gt;From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519087&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help-bounces@...&lt;/a&gt; [&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519087&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help-bounces@...&lt;/a&gt;] On Behalf Of Jessica Schedlbauer [&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519087&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jschedlb@...&lt;/a&gt;]
&lt;br&gt;Sent: November 25, 2009 10:43 AM
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519087&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help@...&lt;/a&gt;
&lt;br&gt;Subject: [R] help writing for loop
&lt;br&gt;&lt;br&gt;Hi,
&lt;br&gt;&lt;br&gt;I’d like to ask for some help in writing a loop. &amp;nbsp;My situation is the following:
&lt;br&gt;&lt;br&gt;I have a matrix (matrix.A) containing 3 columns and 100 rows. &amp;nbsp;The columns represent parameter estimates a, b, and c. &amp;nbsp;The rows contain different values for these parameter estimates. &amp;nbsp;Each row is unique.
&lt;br&gt;&lt;br&gt;I want to insert these parameter estimates into a model (say, y = a + bx + cx^2) and solve for y given a separate matrix (matrix.B) of x values (where x has a length of 1500).
&lt;br&gt;&lt;br&gt;I want to solve for y 100 times using each set of the parameter estimates in matrix.A once.
&lt;br&gt;&lt;br&gt;At present my code looks like this and it only performs the first iteration.
&lt;br&gt;&lt;br&gt;For (i in 1:length(matrix.A)) { y &amp;lt;- matrix.A$a[[i]] + matrixA$b[[i]] * matrix.B$x + matrixA$c[[i]] * matrix.B$x^2)
&lt;br&gt;&lt;br&gt;I have not been able to figure out how to loop through the rows of parameter estimates in matrix.A. &amp;nbsp;I am new to writing loops, so any assistance would be much appreciated.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Jessica Schedlbauer
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519087&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519087&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/help-writing-for-loop-tp26518318p26519087.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26518815</id>
	<title>Re: Grouped Barplot</title>
	<published>2009-11-25T11:23:53Z</published>
	<updated>2009-11-25T11:23:53Z</updated>
	<author>
		<name>Stephan Devriese</name>
	</author>
	<content type="html">On 11/25/2009 07:48 PM, Gary wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi R Users,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I tried plotting a similar boxplot as it is on the FOLLOWING LINK:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.imachordata.com/wp-content/uploads/2009/09/boxplot.png&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.imachordata.com/wp-content/uploads/2009/09/boxplot.png&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Sample data is attached -- there are 9 years and 5 cities. In my case I'm
&lt;br&gt;&amp;gt; looking to plot &amp;quot;Year&amp;quot; on x-axis and grouping boxplots by &amp;quot;City&amp;quot;. I tried
&lt;br&gt;&amp;gt; the following code.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; foo&amp;lt;-read.table(&amp;quot;SampleData.csv&amp;quot;, sep=&amp;quot;,&amp;quot;, header=TRUE)
&lt;br&gt;&amp;gt; attach(foo)
&lt;br&gt;&amp;gt; boxplot(Admit ~ City + Year, range=0.5, col=2:6) # its not solving the
&lt;br&gt;&amp;gt; purpose
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I need some help with:
&lt;br&gt;&amp;gt; 1) Plotting only 9 labels on x-axis (1996-2004).
&lt;br&gt;&amp;gt; 2) For each &amp;quot;Year&amp;quot;, I need to plot FIVE boxplots -- one for each &amp;quot;City&amp;quot;. [so
&lt;br&gt;&amp;gt; it will look like nine clusters with five boxplots each (with no gap between
&lt;br&gt;&amp;gt; them, but with gaps between year labels].
&lt;br&gt;&amp;gt; 3) Adding &amp;quot;MEAN&amp;quot; to the boxplots.
&lt;br&gt;&amp;gt; 4) And, legend including &amp;quot;color&amp;quot; + &amp;quot;city name&amp;quot;.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Any help would be greatly appreciated!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ~Gary
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26518815&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;&amp;gt; PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;&amp;gt; and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;Have a look at
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/pipermail/r-help/2000-November/009191.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/pipermail/r-help/2000-November/009191.html&lt;/a&gt;. Might
&lt;br&gt;be what you're looking for.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [[alternative HTML version deleted]]
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26518815&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Grouped-Barplot-tp26518433p26518815.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26519191</id>
	<title>Re: predict: remove columns with new levels automatically</title>
	<published>2009-11-25T11:20:30Z</published>
	<updated>2009-11-25T11:20:30Z</updated>
	<author>
		<name>Andreas Wittmann-2</name>
	</author>
	<content type="html">Thank you all for the good advice.
&lt;br&gt;&lt;br&gt;Now i did a fast hack, which does want i was looking for, maybe anyone 
&lt;br&gt;else finds this usefull
&lt;br&gt;&lt;br&gt;&lt;br&gt;set.seed(0)
&lt;br&gt;x &amp;lt;- rnorm(9)
&lt;br&gt;y &amp;lt;- x + rnorm(9)
&lt;br&gt;&lt;br&gt;training &amp;lt;- data.frame(x=x, y=y,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;z1=c(rep(&amp;quot;A&amp;quot;, 3), rep(&amp;quot;B&amp;quot;, 3), rep(&amp;quot;C&amp;quot;, 3)),
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;z2=c(rep(&amp;quot;F&amp;quot;, 4), rep(&amp;quot;G&amp;quot;, 5)))
&lt;br&gt;test &amp;lt;- data.frame(x=t&amp;lt;-rnorm(1), y=t+rnorm(1), z1=&amp;quot;D&amp;quot;, z2=&amp;quot;F&amp;quot;)
&lt;br&gt;&lt;br&gt;&lt;br&gt;`predict.drop` &amp;lt;- function(f, dat, newdat)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; datlev &amp;lt;- vector(&amp;quot;list&amp;quot;, ncol(dat))
&lt;br&gt;&amp;nbsp; newdatlev &amp;lt;- vector(&amp;quot;list&amp;quot;, ncol(newdat))
&lt;br&gt;&lt;br&gt;&amp;nbsp; `filllevs` &amp;lt;- function(dat, veclev)
&lt;br&gt;&amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; for (j in 1:ncol(dat))
&lt;br&gt;&amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (is.factor(dat[,j]))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; veclev[[j]] &amp;lt;- levels(dat[,j])
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; veclev[[j]] &amp;lt;- NULL
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; return(veclev)
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; datlev &amp;lt;- filllevs(dat, datlev)
&lt;br&gt;&amp;nbsp; newdatlev &amp;lt;- filllevs(newdat, newdatlev)
&lt;br&gt;&lt;br&gt;&amp;nbsp; if (ncol(dat) == ncol(newdat))
&lt;br&gt;&amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; drop &amp;lt;- logical(ncol(dat))
&lt;br&gt;&amp;nbsp; &amp;nbsp; names(drop) &amp;lt;- colnames(dat)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; for (j in 1:ncol(dat))
&lt;br&gt;&amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (!is.null(datlev[[j]]))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!(newdatlev[[j]] %in% datlev[[j]]))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; drop[j] &amp;lt;- TRUE
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;&amp;nbsp; else
&lt;br&gt;&amp;nbsp; &amp;nbsp; stop(&amp;quot;dat and newdat must have the same column length!&amp;quot;)
&lt;br&gt;&lt;br&gt;&amp;nbsp; m &amp;lt;- lm(formula(f), data=dat[,(1:ncol(dat))[!drop]])
&lt;br&gt;&amp;nbsp; p &amp;lt;- predict(m, newdat)
&lt;br&gt;&lt;br&gt;&amp;nbsp; return(list(drop=drop, p=p))
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;predict.drop(x ~ ., training, test)
&lt;br&gt;&lt;br&gt;&lt;br&gt;best regards
&lt;br&gt;&lt;br&gt;Andreas
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;David Winsemius wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Nov 25, 2009, at 1:48 AM, Andreas Wittmann wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Sorry for my bad description, i don't want get a constructed 
&lt;br&gt;&amp;gt;&amp;gt; algorithm without own work. i only hoped to get some advice how to do 
&lt;br&gt;&amp;gt;&amp;gt; this. i don't want to predict any sort of data, i reference only to 
&lt;br&gt;&amp;gt;&amp;gt; newdata which variables are the same as in the model data. But if 
&lt;br&gt;&amp;gt;&amp;gt; factors in the data than i can by possibly that the newdata has a 
&lt;br&gt;&amp;gt;&amp;gt; level which doesn't exist in the original data.
&lt;br&gt;&amp;gt;&amp;gt; So i have to compare each factor in the data and in the newdata and 
&lt;br&gt;&amp;gt;&amp;gt; if the newdata has a levels which is not in the original data and 
&lt;br&gt;&amp;gt;&amp;gt; drop this variable and do compute the model and prediction again.
&lt;br&gt;&amp;gt;&amp;gt; I thought this problem is quite common and i can use an algorithm 
&lt;br&gt;&amp;gt;&amp;gt; somebody has already implemented.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; best regards
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Andreas
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; If you use str to look at the lm1 object you will find at the bottom a 
&lt;br&gt;&amp;gt; list called &amp;quot;x&amp;quot;:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; lm1$x will show you the factors that were present in variables at the 
&lt;br&gt;&amp;gt; time of the model creation
&lt;br&gt;&amp;gt; &amp;gt; lm1$x
&lt;br&gt;&amp;gt; $z
&lt;br&gt;&amp;gt; [1] &amp;quot;A&amp;quot; &amp;quot;B&amp;quot; &amp;quot;C&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; New testing scenario good level and bad level:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; test &amp;lt;- data.frame(x=t&amp;lt;-rnorm(2), y=t+rnorm(2), z=c(&amp;quot;B&amp;quot;, &amp;quot;D&amp;quot;) )
&lt;br&gt;&amp;gt; &amp;nbsp;lm1 &amp;lt;- lm(x ~ ., data=training)
&lt;br&gt;&amp;gt; &amp;nbsp;predict(lm1, subset(test, z %in% lm1$x$z) ) &amp;nbsp;# get prediction for 
&lt;br&gt;&amp;gt; good level only
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&amp;gt; 0.4225204
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; -------- Original-Nachricht --------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Datum: Wed, 25 Nov 2009 00:48:59 -0500
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Von: David Winsemius &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519191&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dwinsemius@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; An: Andreas Wittmann &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519191&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;andreas_wittmann@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; CC: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519191&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Betreff: Re: [R] predict: remove columns with new levels automatically
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On Nov 24, 2009, at 2:24 PM, Andreas Wittmann wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Dear R-users,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; in the follwing thread
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://tolstoy.newcastle.edu.au/R/help/03b/3322.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://tolstoy.newcastle.edu.au/R/help/03b/3322.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the problem how to remove rows for predict that contain levels which
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; are not in the model.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; now i try to do this the other way round and want to remove columns
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; (variables) in the model which will be later problematic with new
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; levels for prediction.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ## example:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; set.seed(0)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; x &amp;lt;- rnorm(9)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; y &amp;lt;- x + rnorm(9)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; training &amp;lt;- data.frame(x=x, y=y, z=c(rep(&amp;quot;A&amp;quot;, 3), rep(&amp;quot;B&amp;quot;, 3),
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; rep(&amp;quot;C&amp;quot;, 3)))
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; test &amp;lt;- data.frame(x=t&amp;lt;-rnorm(1), y=t+rnorm(1), z=&amp;quot;D&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; lm1 &amp;lt;- lm(x ~ ., data=training)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ## prediction does not work because the variable z has the new level
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;quot;D&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; predict(lm1, test)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ## solution: the variable z is removed from the model
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ## the prediction happens without using the information of variable z
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; lm2 &amp;lt;- lm(x ~ y, data=training)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; predict(lm2, test)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; How can i autmatically recognice this and calculate according to this?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Let me get this straight. You want us to predict in advance (or more
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; accurately design an algorithm that can see into the future and work
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; around) any sort of newdata you might later construct????
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; -- 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; David Winsemius, MD
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Heritage Laboratories
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; West Hartford, CT
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; -- 
&lt;br&gt;&amp;gt;&amp;gt; Preisknaller: GMX DSL Flatrate für nur 16,99 Euro/mtl.!
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://portal.gmx.net/de/go/dsl02&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://portal.gmx.net/de/go/dsl02&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; David Winsemius, MD
&lt;br&gt;&amp;gt; Heritage Laboratories
&lt;br&gt;&amp;gt; West Hartford, CT
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519191&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/predict%3A-remove-columns-with-new-levels-automatically-tp26501871p26519191.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26518736</id>
	<title>Re: Is there a package for generating standardized R script command	line options?</title>
	<published>2009-11-25T11:04:00Z</published>
	<updated>2009-11-25T11:04:00Z</updated>
	<author>
		<name>Trevor Davis-2</name>
	</author>
	<content type="html">&lt;div class='shrinkable-quote'&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In python, there is a package that helps generating command line
&lt;br&gt;&amp;gt; options. I am wondering if there is such a package in R that helps
&lt;br&gt;&amp;gt; generating the command options for a R script?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://docs.python.org/library/optparse.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.python.org/library/optparse.html&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; Peng
&lt;/div&gt;&lt;br&gt;I recently put a package on CRAN that tries to implement much of the 
&lt;br&gt;functionality and approach of python's &amp;quot;optparse&amp;quot; library:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://cran.r-project.org/web/packages/optparse/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cran.r-project.org/web/packages/optparse/&lt;/a&gt;&lt;br&gt;&lt;br&gt;It contains a package vignette (use vignette(&amp;quot;optparse&amp;quot;) after installing 
&lt;br&gt;the package) that illustrates an example program using optparse and trying 
&lt;br&gt;it with various options on the command line.
&lt;br&gt;&lt;br&gt;The &amp;quot;getopt&amp;quot; package or manually parsing the command line remain good 
&lt;br&gt;approaches too.
&lt;br&gt;&lt;br&gt;----------------------------------------------------------------------------
&lt;br&gt;Trevor Davis
&lt;br&gt;Research Assistant
&lt;br&gt;Division of Research &amp; Statistics
&lt;br&gt;Federal Reserve Board of Governors
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26518736&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Is-there-a-package-for-generating-standardized-R-script-command%09line-options--tp26518736p26518736.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26518401</id>
	<title>Re: order of panels in xyplots</title>
	<published>2009-11-25T10:50:15Z</published>
	<updated>2009-11-25T10:50:15Z</updated>
	<author>
		<name>Stephan Devriese</name>
	</author>
	<content type="html">On 11/25/2009 07:33 PM, Titus Malsburg wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Wed, Nov 25, 2009 at 7:03 PM, Titus Malsburg &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26518401&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;malsburg@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;I was expecting
&lt;br&gt;&amp;gt;&amp;gt; that this should plot the panels in the order in which the levels
&lt;br&gt;&amp;gt;&amp;gt; occur in the data frame:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;xyplot(dur~roi|trial, data, index.cond=unique(as.integer(data$trial)))
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; The answer is apparently:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; xyplot(dur~roi|trial, data, index.cond=rank(unique(data$trial)))
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (Strange phenomenon, that I very often find the solution myself
&lt;br&gt;&amp;gt; minutes after posting to the mailing list.)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Best,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Titus
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26518401&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;&amp;gt; PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;&amp;gt; and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;An alternative could be to reorder the levels of &amp;quot;trial&amp;quot; prior to
&lt;br&gt;calling xyplot or in the xyplot call itself (useful if you want to order
&lt;br&gt;the levels on some other criterion like the mean or median of another
&lt;br&gt;variable). See ?reorder
&lt;br&gt;&lt;br&gt;Just a thought
&lt;br&gt;&lt;br&gt;S
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26518401&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/order-of-panels-in-xyplots-tp26517646p26518401.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26518433</id>
	<title>Grouped Barplot</title>
	<published>2009-11-25T10:48:23Z</published>
	<updated>2009-11-25T10:48:23Z</updated>
	<author>
		<name>Gary-144</name>
	</author>
	<content type="html">Hi R Users,
&lt;br&gt;&lt;br&gt;I tried plotting a similar boxplot as it is on the FOLLOWING LINK:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.imachordata.com/wp-content/uploads/2009/09/boxplot.png&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.imachordata.com/wp-content/uploads/2009/09/boxplot.png&lt;/a&gt;&lt;br&gt;&lt;br&gt;Sample data is attached -- there are 9 years and 5 cities. In my case I'm
&lt;br&gt;looking to plot &amp;quot;Year&amp;quot; on x-axis and grouping boxplots by &amp;quot;City&amp;quot;. I tried
&lt;br&gt;the following code.
&lt;br&gt;&lt;br&gt;foo&amp;lt;-read.table(&amp;quot;SampleData.csv&amp;quot;, sep=&amp;quot;,&amp;quot;, header=TRUE)
&lt;br&gt;attach(foo)
&lt;br&gt;boxplot(Admit ~ City + Year, range=0.5, col=2:6) # its not solving the
&lt;br&gt;purpose
&lt;br&gt;&lt;br&gt;I need some help with:
&lt;br&gt;1) Plotting only 9 labels on x-axis (1996-2004).
&lt;br&gt;2) For each &amp;quot;Year&amp;quot;, I need to plot FIVE boxplots -- one for each &amp;quot;City&amp;quot;. [so
&lt;br&gt;it will look like nine clusters with five boxplots each (with no gap between
&lt;br&gt;them, but with gaps between year labels].
&lt;br&gt;3) Adding &amp;quot;MEAN&amp;quot; to the boxplots.
&lt;br&gt;4) And, legend including &amp;quot;color&amp;quot; + &amp;quot;city name&amp;quot;.
&lt;br&gt;&lt;br&gt;Any help would be greatly appreciated!
&lt;br&gt;&lt;br&gt;~Gary
&lt;br&gt;&lt;br /&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26518433&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Grouped-Barplot-tp26518433p26518433.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26518318</id>
	<title>help writing for loop</title>
	<published>2009-11-25T10:43:59Z</published>
	<updated>2009-11-25T10:43:59Z</updated>
	<author>
		<name>Jessica Schedlbauer</name>
	</author>
	<content type="html">Hi, 
&lt;br&gt;&lt;br&gt;I’d like to ask for some help in writing a loop. &amp;nbsp;My situation is the following:
&lt;br&gt;&lt;br&gt;I have a matrix (matrix.A) containing 3 columns and 100 rows. &amp;nbsp;The columns represent parameter estimates a, b, and c. &amp;nbsp;The rows contain different values for these parameter estimates. &amp;nbsp;Each row is unique.
&lt;br&gt;&lt;br&gt;I want to insert these parameter estimates into a model (say, y = a + bx + cx^2) and solve for y given a separate matrix (matrix.B) of x values (where x has a length of 1500).
&lt;br&gt;&lt;br&gt;I want to solve for y 100 times using each set of the parameter estimates in matrix.A once.
&lt;br&gt;&lt;br&gt;At present my code looks like this and it only performs the first iteration. &amp;nbsp;
&lt;br&gt;&lt;br&gt;For (i in 1:length(matrix.A)) { y &amp;lt;- matrix.A$a[[i]] + matrixA$b[[i]] * matrix.B$x + matrixA$c[[i]] * matrix.B$x^2)
&lt;br&gt;&lt;br&gt;I have not been able to figure out how to loop through the rows of parameter estimates in matrix.A. &amp;nbsp;I am new to writing loops, so any assistance would be much appreciated.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Jessica Schedlbauer
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26518318&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/help-writing-for-loop-tp26518318p26518318.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26519826</id>
	<title>Re: order of panels in xyplots</title>
	<published>2009-11-25T10:39:26Z</published>
	<updated>2009-11-25T10:39:26Z</updated>
	<author>
		<name>Titus Malsburg</name>
	</author>
	<content type="html">The documentation of xyplot could be improved here. &amp;nbsp;It says:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;quot;If 'index.cond' is a list, it has to be as long as the number of conditioning
&lt;br&gt;&amp;nbsp; &amp;nbsp;variables, and the 'i'-th component has to be a valid indexing vector for the
&lt;br&gt;&amp;nbsp; &amp;nbsp;integer vector '1:nlevels(g_i)' (which can, among other things, repeat some
&lt;br&gt;&amp;nbsp; &amp;nbsp;of the levels or drop some altogether).&amp;quot;
&lt;br&gt;&lt;br&gt;It should make explicit that nlevels is the number of levels actually
&lt;br&gt;used in the data and not length(levels(f)).
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Titus
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519826&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/order-of-panels-in-xyplots-tp26517646p26519826.html" />
</entry>

</feed>
