The R Project SVN R

Rev

Rev 59039 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 59039 Rev 62062
Line 1... Line 1...
1
% File src/library/methods/man/getPackageName.Rd
1
% File src/library/methods/man/getPackageName.Rd
2
% Part of the R package, http://www.R-project.org
2
% Part of the R package, http://www.R-project.org
3
% Copyright 1995-2007 R Core Team
3
% Copyright 1995-2013 R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{getPackageName}
6
\name{getPackageName}
7
\alias{getPackageName}
7
\alias{getPackageName}
8
\alias{setPackageName}
8
\alias{setPackageName}
Line 42... Line 42...
42
  by the \link{INSTALL} script or by the \code{\link{library}}
42
  by the \link{INSTALL} script or by the \code{\link{library}}
43
  function.  (Currently, the name is stored as the object
43
  function.  (Currently, the name is stored as the object
44
  \code{.packageName} but don't trust this for the future.)
44
  \code{.packageName} but don't trust this for the future.)
45
}
45
}
46
\value{
46
\value{
47
  \code{packageName} returns the character-string name of the package
47
  \code{getPackageName} returns the character-string name of the package
48
  (without the extraneous \code{"package:"} found in the search list).
48
  (without the extraneous \code{"package:"} found in the search list).
49
 
49
 
50
  \code{packageSlot} returns or sets the package name slot (currently
50
  \code{packageSlot} returns or sets the package name slot (currently
51
  an attribute, not a formal slot, but this may change someday).
51
  an attribute, not a formal slot, but this may change someday).
52
 
52
 
Line 55... Line 55...
55
  allows you to create classes and/or methods in an arbitrary
55
  allows you to create classes and/or methods in an arbitrary
56
  environment, but it is usually preferable to create packages by the
56
  environment, but it is usually preferable to create packages by the
57
  standard \R programming tools (\code{\link{package.skeleton}}, etc.)
57
  standard \R programming tools (\code{\link{package.skeleton}}, etc.)
58
}
58
}
59
 
59
 
60
\seealso{ \code{\link{search}} }
60
\seealso{ \code{\link{search}}, \code{\link{packageName}} }
61
 
61
 
62
\examples{
62
\examples{
63
## all the following usually return "base"
63
## all the following usually return "base"
64
getPackageName(length(search()))
64
getPackageName(length(search()))
65
getPackageName(baseenv())
65
getPackageName(baseenv())