-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does knitcitations work outside of the RStudio Enviroment? e.g. build and check? #96
Comments
Thanks for the report -- the system should be doing the same thing regardless of whether or not you are using RStudio. My guess is that you might have a path problem in your non-rstudio instance. Does the above work for you fine in RStudio? |
Thanks Carl. I'm not exactly sure how to run this in RStudio (though I have colleague I can consult). In the meantime, here is the top of the vignette and the
And build says:
The .bib file is present in the directory and the bib entry is valid. bibtype seems clear:
I found a rather different approach here which suggests that you can have yaml in there and still make it through CRAN but my first stab at that approach gave a different error, which I haven't had time to work on yet. |
Just trying to make sure we can isolate the issue: does everything work fine when you run interactively in R, and fail only on building as a vignette when building the package? Or has the above never worked in any way for you? (i.e. I can't really trouble-shoot without a minimal reproducible example of the error). As a side note, while it should work fine in principle in vignette building, I don't actually recommend having vignettes that require calls to external APIs of any kind, including citation databases used by knitcitations, in packages going to CRAN. CRAN's test servers can have slow responses sometimes that will cause external network queries to time out sometimes, leading to random package build & test failures. |
I’m attaching a minimal failing example. From the command line R CMD BUILD minPkg throws the error mentioned. On your side note: This should be stand alone and not ask knitcitations to search for anything. This is no doubt going to be something foolish on my part; thanks for bearing with me. Bryan
|
I don't think you can attach examples to issues in that way. A minimal example that did not involve building a package would be ideal (unless that's the only case in which you see the error). Note that the knitcitations package includes a vignette (though it may not demo the particular pattern you want), but perhaps you can try cloning and building |
Sorry, I forgot to check that the files made it through. But, even simpler is better, and as it turns out, more informative. I'm attaching 2 files, an .Rmd and a .bib (had to add .txt as Github won't accept .bib and .Rmd). If I knit the .Rmd, I get the following error (this is in the Mac R GUI app):
Looks like it may be coming from an Thanks, Bryan |
I'd like to use
knitcitation
outside RStudio, specifically in the CRAN build and check process, using an .Rmd file. I have the vignetteEngine set to knitr. In the vignette I'm doing:and then where I want an inline citation I'm doing
r citep("SomeAuthor2011")
But the system doesn't see my .bib file doing this (I don't think
read.bibtex
was really intended for use this way). Since it is the CRAN system I don't think I can do any yaml.Is this possible? Or is another package the better way to go? Thanks.
The text was updated successfully, but these errors were encountered: