[R] roxygen2

Brian Diggs brian.s.diggs at gmail.com
Mon Jul 21 23:07:30 CEST 2014

On 7/20/2014 12:50 AM, Kevin Kunzmann wrote:
> Hi,
> I have developed a package and would like to switch documentation to
> roxygen2 from manual :) However
>      >roxygen2::roxygenize()
>      First time using roxygen2 4.0. Upgrading automatically...
>      Loading required package: nleqnslv
>      Error in file(filename, "r", encoding = encoding) :
>         cannot open the connection
>      In addition:Warning messages:
>      1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
>         there is no package called 'nleqnslv'
>      2: In file(filename, "r", encoding = encoding) :
>         cannot open file 'R/misc.R': No such file or directory
> gives me this, any ideas? Running R 3.1.1 and the file R/misc.R DOES
> exist. working directory is package directory.

I'd focus on the other warning message first: "there is no package 
called 'nleqnslv'". I don't see a package by that name on CRAN, though 
google helpfully suggested 'nleqslv' as something that does exist.

Do you have a line `library("nleqnslv")` in `R/misc.R`? If so, that may 
be the problem (also, if you do, you should not in general have 
`library` calls in package code; package interdependencies are handled 
by the DEPENDS and IMPORTS fields of the DESCRIPTION file). Or do you 
have a reference to "nleqnslv" in the DESCRIPTION file?

I would get the first warning message cleared up first (especially since 
the second one doesn't make sense to you) and see if the other one goes 

> Best,
> Kevin

Brian S. Diggs, PhD
Senior Research Associate, Department of Surgery
Oregon Health & Science University

More information about the R-help mailing list