[R] When to quote a package name

From: Muenchen, Robert A (Bob) <muenchen_at_utk.edu>
Date: Mon, 10 Mar 2008 14:40:27 -0400


Dear HelpeRs,

I'm confused about the role of quotes around package names on the library and detach functions. Books on R use both approaches:

library(Hmisc)
describe(mydata)
detach(package:Hmisc)

and

library("Hmisc")
describe(mydata)
detach("package:Hmisc")

The help file for detach says "quoted or unquoted" and the help file for library says about the package, "the name of a package, given as a name or literal character string, or a character string, depending on whether character.only is FALSE (default) or TRUE)."

Are there conditions under which it matters? Which is best?

Thanks,
Bob



Bob Muenchen (pronounced Min'-chen),
Manager, Statistical Consulting Center
U of TN Office of Information Technology Stokely Management Center, Suite 200
916 Volunteer Blvd., Knoxville, TN 37996-0520 Voice: (865) 974-5230
FAX: (865) 974-4810
Email: muenchen_at_utk.edu
Web: http://oit.utk.edu/scc
Map: http://www.utk.edu/maps 

news: http://listserv.utk.edu/archives/statnews.html


R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 10 Mar 2008 - 18:45:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 10 Mar 2008 - 19:31:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive