R - document () crashes. Error in if (pkg $ package == "devtools") {: argument is 0

UPDATE

I have completed the package and posted it online at https://github.com/iembry-USGS/ie2misc .

Since the error message in the original message did not help, I tried to perform the oxygenation of the package to make sure that it would work or not. Following are the commands and error message.

library(roxygen2)
roxygenize(".", roclets = "rd")

# First time using roxygen2. Upgrading automatically...
# Error in parse(n = -1, file = file, srcfile = NULL,
# keep.source = FALSE) : 
# 1:1: unexpected input
# 1:  
^

I assume that unexpected input refers to a character, but I don't know which file has the corresponding character.

Any help would be helpful.

Thanks.

UPDATE End

I am working on creating a package containing 3 functions. I managed to create 3 other packages using 1 function, but not with this package.

DESCRIPTION . - , .

.

Package: ie2misc
Title: Irucka Embry Miscellaneous functions created while he was a
CNTS USGS Contractor.
Version: 1.0.0
Authors@R: person("Irucka", "Embry", , "", c("aut", "cre"))
Depends: R (>= 3.0.0), tcltk, data.table (>= 1.9.4)
Imports: openxlsx, gWidgets2, gWidgets2tcltk, stringi, qdap
Suggests: Rcpp (>= 0.11.5)
Maintainer: Irucka Embry <iembry@usgs.gov>
Description: Irucka Embry Miscellaneous functions (processing exp files,
psf files, etc.) created while he was a Cherokee Nation Technology Solutions
(CNTS) USGS Contractor.
URL: https://gitlab.com/iembry/ie2misc
BugReports: https://gitlab.com/iembry/ie2misc/issues
License: CC0
Collate:
    'ie2misc.R'
    'psfFileChangeBATCH.R'
    'psfFileChange.R'
    'expFileOutput.R'
LazyData: true
Encoding: UTF-8

:

setwd("ie2misc"); library(devtools); document();
Updating  documentation
Loading 
Error in if (pkg$package == "devtools") { : argument is of length zero
+4
1

, , library(devtools). ie2misc . DESCRIPTION RStudio. ( Kate R.) , , , .

0

Source: https://habr.com/ru/post/1614648/


All Articles