Nipesh Bajaj
2011-Mar-06 14:32 UTC
[R] Seeking guidance in package creation when it contains s4 class
Dear all, I am having problem to create a package when this package is supposed to have some newly created s4 class. Here is my workout:> #rm(list = ls()) > setClass("aClass", sealed=T, representation(slot1 = "vector", slot2 = "character"))[1] "aClass"> fn1 <- function(x, y, z) {+ x <- x[1] + y <- y[1] + z <- as.character(z[1]) + new("aClass", slot1 = x+y, slot2 = z) + }> #fn1(1,2,3) > package.skeleton("trial11")Creating directories ... Creating DESCRIPTION ... Creating Read-and-delete-me ... Saving functions and data ... Making help files ... Done. Further steps are described in './trial11/Read-and-delete-me'. Warning message: In dump(internalObjs, file = file.path(code_dir, sprintf("%s-internal.R", : deparse of an S4 object will not be source()able While running package.skeleton, I got this warning message, then when I run R CMD INSTALL trial11, I got an error saying: ERROR: unable to collate files for package 'trial11' It would be really helpful if somebody can point me how different the package creation will be if it contains s4 class? Thanks,
Nipesh Bajaj
2011-Mar-08 16:57 UTC
[R] Fwd: Seeking guidance in package creation when it contains s4 class
Any suggestion please how I can do this? Dear all, I am having problem to create a package when this package is supposed to have some newly created s4 class. Here is my workout:> #rm(list = ls()) > setClass("aClass", sealed=T, ?representation(slot1 = "vector", slot2 = "character"))[1] "aClass"> fn1 <- function(x, y, z) {+ x <- x[1] + y <- y[1] + z <- as.character(z[1]) + new("aClass", slot1 = x+y, slot2 = z) + }> #fn1(1,2,3) > package.skeleton("trial11")Creating directories ... Creating DESCRIPTION ... Creating Read-and-delete-me ... Saving functions and data ... Making help files ... Done. Further steps are described in './trial11/Read-and-delete-me'. Warning message: In dump(internalObjs, file = file.path(code_dir, sprintf("%s-internal.R", ?: ?deparse of an S4 object will not be source()able While running package.skeleton, I got this warning message, then when I run R CMD INSTALL trial11, I got an error saying: ERROR: unable to collate files for package 'trial11' It would be really helpful if somebody can point me how different the package creation will be if it contains s4 class? Thanks,
Reasonably Related Threads
- Unexpected failure when calling new() with unnamed arg and
- Unexpected failure when calling new() with unnamed arg and
- Unexpected failure when calling new() with unnamed arg and
- Seeking help to define method for show() for an S4 object
- Help need to define method of an s4 class