From 35e1abc2f3378ca21bf000251c419b71886750a1 Mon Sep 17 00:00:00 2001 From: Rainer Walke Date: Wed, 9 Oct 2019 14:31:32 +0200 Subject: [PATCH] remove not needed slot setters --- NAMESPACE | 4 ---- R/AllGeneric.R | 9 --------- R/GENESISClasses.R | 8 -------- R/HMDClasses.R | 17 ----------------- man/LT1-class.Rd | 9 --------- 5 files changed, 47 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 431e76e..0f8b637 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -13,10 +13,6 @@ exportClasses(EX1) exportClasses(LT1) exportClasses(RD1) exportClasses(RE1) -exportMethods("ex1<-") -exportMethods("lt1<-") -exportMethods("rd1<-") -exportMethods("re1<-") exportMethods(content) exportMethods(ex1) exportMethods(footer) diff --git a/R/AllGeneric.R b/R/AllGeneric.R index b2f3e11..f9f3b17 100644 --- a/R/AllGeneric.R +++ b/R/AllGeneric.R @@ -12,26 +12,17 @@ setGeneric("region", function(object) standardGeneric("region")) setGeneric("protocol", function(object) standardGeneric("protocol")) -setGeneric("lt1<-", function(object, value) standardGeneric("lt1<-")) - setGeneric("selectYears", function(object, selectYears) standardGeneric("selectYears")) setGeneric("ex1", function(object) standardGeneric("ex1")) -setGeneric("ex1<-", function(object, value) standardGeneric("ex1<-")) - - setGeneric("rd1", function(object) standardGeneric("rd1")) setGeneric("rd1total", function(object) standardGeneric("rd1total")) -setGeneric("rd1<-", function(object, value) standardGeneric("rd1<-")) - setGeneric("selectRegion", function(object, selectRegion) standardGeneric("selectRegion")) setGeneric("re1", function(object) standardGeneric("re1")) setGeneric("re1total", function(object) standardGeneric("re1total")) -setGeneric("re1<-", function(object, value) standardGeneric("re1<-")) - diff --git a/R/GENESISClasses.R b/R/GENESISClasses.R index 0ad2983..d380911 100644 --- a/R/GENESISClasses.R +++ b/R/GENESISClasses.R @@ -38,10 +38,6 @@ setMethod("region", "RD1", function(object) object@region) #' @export setMethod("protocol", "RD1", function(object) object@protocol) -# slot setters -#' @export -setReplaceMethod("rd1", "RD1", function(object, value) {object@rd1 <- value; validObject(object); object}) - # constructor #' @export RegDeath1 <- function(header, footer, rd1, rd1total, content, region, protocol) @@ -126,10 +122,6 @@ setMethod("region", "RE1", function(object) object@region) #' @export setMethod("protocol", "RE1", function(object) object@protocol) -# slot setters -#' @export -setReplaceMethod("re1", "RE1", function(object, value) {object@re1 <- value; validObject(object); object}) - # constructor #' @export RegExp1 <- function(header, footer, re1, re1total, content, region, protocol) diff --git a/R/HMDClasses.R b/R/HMDClasses.R index 5af034c..587da20 100644 --- a/R/HMDClasses.R +++ b/R/HMDClasses.R @@ -85,19 +85,6 @@ setMethod("region", "LT1", function(object) object@region) #' @rdname LT1-class setMethod("protocol", "LT1", function(object) object@protocol) -## slot setters - -#' LT1 lt1<- -#' -#' The \code{lt1<-}-method allows to modify the life table information in a LT1 object -#' -#' @param value data.table -#' @return The \code{lt1<-}-method changes the life table information -#' @export -#' @rdname LT1-class -setReplaceMethod("lt1", "LT1", function(object, value) {object@lt1 <- value; validObject(object); object}) - - ## constructor #' LT1 constructor @@ -204,10 +191,6 @@ setMethod("region", "EX1", function(object) object@region) #' @export setMethod("protocol", "EX1", function(object) object@protocol) -# slot setters -#' @export -setReplaceMethod("ex1", "EX1", function(object, value) {object@ex1 <- value; validObject(object); object}) - # constructor #' @export Exposure1 <- function(header, ex1, content, region, protocol) diff --git a/man/LT1-class.Rd b/man/LT1-class.Rd index 57825b4..a21e1e2 100644 --- a/man/LT1-class.Rd +++ b/man/LT1-class.Rd @@ -8,7 +8,6 @@ \alias{content,LT1-method} \alias{region,LT1-method} \alias{protocol,LT1-method} -\alias{lt1<-,LT1-method} \alias{LTable1} \alias{length,LT1-method} \alias{show,LT1-method} @@ -25,8 +24,6 @@ \S4method{protocol}{LT1}(object) -\S4method{lt1}{LT1}(object) <- value - LTable1(header, lt1, content, region, protocol) \S4method{length}{LT1}(x) @@ -38,8 +35,6 @@ LTable1(header, lt1, content, region, protocol) \arguments{ \item{object}{LT1-object} -\item{value}{data.table} - \item{header}{vector} \item{lt1}{data.table} @@ -65,8 +60,6 @@ The \code{region}-method returns the regional information The \code{protocol}-method returns the protocol information -The \code{lt1<-}-method changes the life table information - The \code{LTable1}-constructor returns an LT1 object The \code{length}-method returns the number of rows @@ -86,8 +79,6 @@ The \code{region}-method gets the regional information of an LT1 object The \code{protocol}-method gets the protocol information of an LT1 object -The \code{lt1<-}-method allows to modify the life table information in a LT1 object - The \code{LTable1}-constructor creates an LT1 object The \code{length}-method gets the number of rows int the LT1 lt1 data.table