Skip to content

Commit

Permalink
export names.CELL_META
Browse files Browse the repository at this point in the history
  • Loading branch information
jokergoo committed Feb 18, 2019
1 parent 9c5311d commit 0ec5f38
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 3 deletions.
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
S3method("$", "CELL_META")
export("$.CELL_META")
S3method("names", "CELL_META")
export("names.CELL_META")
S3method("print", "CELL_META")
export("print.CELL_META")
export("CELL_META")
Expand Down
11 changes: 10 additions & 1 deletion R/global.R
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ get.cell.meta.data = function(name, sector.index = get.current.sector.index(),
}

# == title (variable:CELL_META)
# Easy to way to get meta data in the current cell
# Easy way to get meta data in the current cell
#
# == details
# The variable `CELL_META` can only be used to get meta data of the "current" cell.
Expand All @@ -812,6 +812,15 @@ get.cell.meta.data = function(name, sector.index = get.current.sector.index(),
# dev.off()
CELL_META = "don't use me directly"
class(CELL_META) = "CELL_META"

# == title
# Names of all meta data in the current cell
#
# == param
# -x use `CELL_META`.
#
# == example
# names(CELL_META)
names.CELL_META = function(x) {
c("xlim", "ylim", "xrange", "yrange", "xcenter", "ycenter", "cell.xlim", "cell.ylim",
"sector.numeric.index", "sector.index", "track.index", "xplot", "yplot", "track.margin", "cell.padding",
Expand Down
4 changes: 2 additions & 2 deletions man/CELL_META.rd
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
\docType{data}
\alias{CELL_META}
\title{
Easy to way to get meta data in the current cell
Easy way to get meta data in the current cell
}
\description{
Easy to way to get meta data in the current cell
Easy way to get meta data in the current cell
}
\usage{
CELL_META
Expand Down
28 changes: 28 additions & 0 deletions man/names.CELL_META.rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
\name{names.CELL_META}
\alias{names.CELL_META}
\title{
Names of all meta data in the current cell
}
\description{
Names of all meta data in the current cell
}
\usage{
\method{names}{CELL_META}(x)
}
\arguments{

\item{x}{use \code{\link{CELL_META}}.}

}
\details{
The variable \code{\link{CELL_META}} can only be used to get meta data of the "current" cell.
Basically you can simply replace e.g. \code{get.cell.meta.data("sector.index")} to \code{CELL_META$sector.index}.

}
\seealso{
\code{\link{get.cell.meta.data}}

}
\examples{
names(CELL_META)
}
Expand Down

0 comments on commit 0ec5f38

Please sign in to comment.