Skip to content

Commit

Permalink
weird issues with dox on [
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan S Read committed Oct 3, 2015
1 parent 3958fe2 commit 3a6e1ad
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 26 deletions.
46 changes: 24 additions & 22 deletions R/07-datagroup-obj.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,34 +28,19 @@ setGeneric("datagroup", function(...) {
standardGeneric("datagroup")
})

#'@param ... additional arguments passed to initialize method
#'@rdname datagroup-methods
#'@aliases datagroup,datagroup-methods
setMethod("datagroup", signature(), function(...) {
## create new geojob object
datagroup <- new("datagroup",...)
return(datagroup)
})

#' @param x a datagroup object
#' @param i index specifying elements to extract or replace.
#' @param j not implemented
#' @param drop not implemented
#'@rdname datagroup-methods
#'@aliases datagroup,datagroup-methods
setMethod("[", signature(x='datagroup',i="ANY",j='ANY'), function(x, i, j, ..., drop = TRUE) {
if (is.character(i))
i = which(title(x) %in% i)
return(datagroup(x@group[i]))
#' @param ... additional arguments passed to initialize method
#' @rdname datagroup-methods
#' @aliases datagroup,datagroup-methods
setMethod("datagroup", signature(), function(...) {
## create new geojob object
datagroup <- new("datagroup",...)
return(datagroup)
})

#'@rdname datagroup-methods
#'@aliases datagroup,datagroup-methods
setMethod("[[", signature('datagroup',i="ANY",j='ANY'), function(x, i, j, ..., drop = TRUE) {


return(x@group[[i]])
})

setAs('datagroup', 'webdata', function(from){
if (length(from@group) > 1){
Expand Down Expand Up @@ -106,3 +91,20 @@ setMethod(f = "length",signature(x = "datagroup"),
definition = function(x){
return(length(x@group))
})


#'@rdname datagroup-methods
#'@aliases datagroup,datagroup-methods
setMethod("[", signature(x='datagroup',i="ANY",j='ANY'), function(x, i, j, ..., drop = TRUE) {
if (is.character(i))
i = which(title(x) %in% i)
return(datagroup(x@group[i]))
})

#'@rdname datagroup-methods
#'@aliases datagroup,datagroup-methods
setMethod("[[", signature('datagroup',i="ANY",j='ANY'), function(x, i, j, ..., drop = TRUE) {


return(x@group[[i]])
})
8 changes: 4 additions & 4 deletions man/datagroup-methods.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
% Please edit documentation in R/07-datagroup-obj.R
\docType{methods}
\name{datagroup}
\alias{[,datagroup-method}
\alias{[,datagroup,ANY,ANY-method}
\alias{[[,datagroup,ANY,ANY-method}
\alias{datagroup}
\alias{datagroup,ANY-method}
Expand All @@ -14,11 +14,11 @@ datagroup(...)

\S4method{datagroup}{ANY}(...)

\S4method{[}{datagroup}(x, i, j, ..., drop = TRUE)
\S4method{length}{datagroup}(x)

\S4method{[[}{datagroup,ANY,ANY}(x, i, j, ..., drop = TRUE)
\S4method{[}{datagroup,ANY,ANY}(x, i, j, ..., drop = TRUE)

\S4method{length}{datagroup}(x)
\S4method{[[}{datagroup,ANY,ANY}(x, i, j, ..., drop = TRUE)
}
\arguments{
\item{...}{additional arguments passed to initialize method}
Expand Down

0 comments on commit 3a6e1ad

Please sign in to comment.