classS4Creator: 'classS4Creator' generate S4 class

Description Usage Arguments Value Examples

View source: R/classS4Creator.R

Description

classS4Creator is a class S4 generator which produces R code for setter/getter/show/constructor methods for an S4 object.

Usage

1
classS4Creator(name, field, type, path = getwd())

Arguments

name

["character"]: Name of the class S4.

field

["character"]: Name of the slots in the S4 object.

type

["character"]: Type of the slots in the S4 object. (e.g. numeric, character, ...).

path

["character"]: A character vector of full path names; the default corresponds to the working directory, getwd(). Tilde expansion (see path.expand) is performed.

Value

Return a R file with all R code to generate an S4 class.

Examples

1
2
3
4
5
6
classS4Creator(name = "myClass",
               field = c("fieldName1", "fieldName2", "fieldName3", "fieldName4"),
               type = c("numeric", "list", "matrix", "data.frame"), path = "")
classS4Creator(name = "myClass",
               field = c("fieldName1", "fieldName2", "fieldName3", "fieldName4"),
               type = c("numeric", "list", "matrix", "data.frame"), path = getwd())

mcanouil/myScriptsMickael documentation built on May 22, 2017, 1:08 a.m.