Skip to content
Prev 30396 / 398513 Next

quotes within quotes

Thanks for all the suggestions.  
Some people asked why I'm bothering with all this.  This is just
the toy code I'm trying on the command-line, but the two errors below
are the same as I get in the real code.  

It's true that I could avoid the modularity, but it improves readability
and maintainability immensely.

Here are my results to three suggestions.  The pathnames below are all
abbreviated for readability.

1.  do.call seems to work.  

Both of the following successfully read the data in:
2.  quotes within quotes:

Correspondants suggested using single quotes or backslashes to escape 
the quotes.  It turns out R interprets both the same way.
Error in read.dta("file=\"C:/Documents and Settings/mexchn_gary.dta\"",  : 
        unable to open file

3.  Avoid using quotes within quotes

When we call read.dta and don't use "file=", it works (see #1), but not 
inside do.call.
Error in if (convert.dates) { : argument is not interpretable as
 logical


Thanks,

Janet
Message-ID: <200304091619.h39GJxKC000064@hcs.harvard.edu>
In-Reply-To: <Pine.GSO.4.10.10304081836370.21869-100000@quetelet.stat.ucla.edu> from "Roger Peng" at Apr 08, 2003 06:39:11 PM