4

UPDATE

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

Since the error message in the original post was not helpful, I attempted to roxygenize the package to see if that would work or not. Below are the commands and the 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 am assuming that the unexpected input is referring to a character, but I don't know which file has the character in question.

Any assistance would be helpful.

Thank you.

UPDATE End

I am working on creating a package that contains 3 functions. I've been successful at creating 3 other packages using 1 function, but not with this package.

I have included the contents of the DESCRIPTION file below. Below that content is the code and the error that I am receiving when attempting to document this package.

Thank you.

Package: ie2misc
Title: Irucka Embry's 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's 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

Then I run:

setwd("ie2misc"); library(devtools); document();
Updating  documentation
Loading 
Error in if (pkg$package == "devtools") { : argument is of length zero
iembry
  • 962
  • 1
  • 7
  • 23

1 Answers1

0

I still don't know what the problem is, but I created an empty package with library(devtools). Then, I copied most of the ie2misc files into the newly created package. I also rewrote the DESCRIPTION file in RStudio. (Usually I use the Kate text editor for working on all files for R packages.) Once those steps were completed, I was able to document, check, and build the package.

iembry
  • 962
  • 1
  • 7
  • 23