Alright, first attempt at writing an R package and I\'m stuck. Here\'s how I create the package:
package.skeleton(\"pkg\",code_files=some.filenames)
roxygeni
The warnings are because data.table and lubridate both define a symbol hour
, etc; see data.table::hour
and lubridate::hour
. You could avoid this by importing just the functions from lubridate / data.table that you want, rather than the whole package; a standard NAMESPACE file would contain
importFrom(lubridate, hour)
for instance. In roxygen2 you would use the tag:
@importFrom lubridate hour
The MATCH problem is probably because merge
is dispatching incorrectly, probably because zoo should have in its name space S3method(merge, zoo)
rather than export(merge.zoo)
, as described in Writing R Extensions, 1.6.2. The solution here is to contact the maintainer of zoo
, packageDescription('zoo')$Maintainer
(the maintainer is sufficiently versed in R that I feel like I've mis-diagnosed...).
As a temporary workaround for the MATCH error, I've had success listing the zoo
package under the Depends:
section of the package's DESCRIPTION
file.