我已经在R包中编写了S4类。我用roxygen2的文档: #' A timeframe class represents a start date, end date and frequency
#'
#' @slot start_date First date in the timespan
#' @slot end_date Last date in the timespan
#' @
我迷失在文档中,真的失去了做什么的轨道。我认为解决方案是使用环境,但即使我觉得它不那么复杂,我也无法弄清楚。 下面是使用两个类一个简单的例子: Person <- setClass(
Class = "Person",
slots = c(name = "character",
id = "numeric",
age = "numeric"));