質問

Every time I try to roxygenize a package I get this error:

Error: is.call(call) is not TRUE

The results of a traceback():

11: stop(sprintf(ngettext(length(r), "%s is not TRUE", "%s are not all TRUE"), 
        ch), call. = FALSE, domain = NA)
10: stopifnot(is.call(call))
9: standardise_call(call, env)
8: object_from_call(call, env, preref)
7: (function (call, ref, comment_ref) 
   {
       preref <- parse.preref(as.character(comment_ref))
       if (is.null(preref)) 
           return()
       preref$object <- object_from_call(call, env, preref)
       preref$srcref <- list(filename = file, lloc = as.vector(ref))
       add_defaults(preref)
   })(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]])
6: mapply(FUN = f, ..., SIMPLIFY = FALSE)
5: Map(extract, parsed, refs, comment_refs)
4: FUN(c("/home/path/to/package/file1.r", 
   "/home/path/to/package/file2.r", 
   .... # list of files truncated 
   "/home/path/to/package/doc.file.r")[[25L]], 
       ...)
3: lapply(r_files(base_path), parse_file, env = env)
2: parse_package(base_path, load_code)
1: roxygenize("~/Current/r/path/to/package/")

Has anyone experienced this problem before? I'm not even sure how to debug it further.

役に立ちましたか?

解決

This error occurs if, instead of the typical NULL value that one puts at the end of the documentation for the package, one uses NA. Simply updating to NULL will remove the error.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top