Comments (20)
Yes this is nicer way to work with the references.
However If i use my complete library (because I could) with 2207 references there seems to be an error like in the ohter refmanager:
Warning in RefManageR::ReadBib(file) :
totallibrary.bib:4952:0
syntax error, unexpected TOKEN_LITERAL, expecting TOKEN_COMMA
Dropping the entry `na` (starting at line 4952)
Warning in `reactive reactive({\n if (!yaml_found || is.null(yaml_bib_file)) {\n options(bibliography_path = input$bib_file)\n tryCatch(RefManageR::ReadBib(file = input$bib_file), \n error = function(e) NULL)\n }\n else if (yaml_found & !is.null(yaml_bib_file)) {\n if (length(yaml_bib_file) == 1) {\n tryCatch(RefManageR::ReadBib(file = yaml_bib_file), \n error = function(e) NULL)\n }\n else {\n bibs <- lapply(yaml_bib_file, function(file) tryCatch(RefManageR::ReadBib(file), \n error = function(e) NULL))\n not_found <- sapply(bibs, is.null)\n if (any(not_found)) \n warning("Unable to read bibliography file(s) ", \n paste(paste0("'", yaml_bib_file[not_found], \n "'"), collapse = ", "))\n do.call(c, bibs[!not_found])\n }\n }\n})`(...) :
Unable to read bibliography file(s) 'totallibrary.bib'
From line 4952:
@article{na;_abstracts_2014,
title = {Abstracts from the 2014 {{Annual Scientific Meeting}} of the {{American Psychosomatic Society}} are available online only with this issue at www.psychosomaticmedicine.org.:},
volume = {76},
issn = {0033-3174},
shorttitle = {Abstracts from the 2014 {{Annual Scientific Meeting}} of the {{American Psychosomatic Society}} are available online only with this issue at www.psychosomaticmedicine.org.},
doi = {10.1097/PSY.0000000000000057},
language = {en},
timestamp = {2014-12-19T08:38:45Z},
number = {3},
urldate = {2014-12-19},
journal = {Psychosomatic Medicine},
author = {{\&Na;}},
month = apr,
year = {2014},
pages = {1},
file = {&Na\; - 2014 - Abstracts from the 2014 Annual Scientific Meeting .pdf:C\:\\Users\\roel\\AppData\\Roaming\\Zotero\\Zotero\\Profiles\\aw40nx7l.default\\zotero\\storage\\DPPDSW4J\\&Na\; - 2014 - Abstracts from the 2014 Annual Scientific Meeting .pdf:application/pdf}
}
from citr.
It says : no bibtex file found: and in console:
references.BIB:7790:0
syntax error, unexpected TOKEN_LITERAL, expecting TOKEN_COMMA
Dropping the entry `de_bienestar_relaxation_` (starting at line 7790)
Warning in bibtex::read.bib(file = input$bib_file) :
references.BIB:7936:0
syntax error, unexpected TOKEN_LITERAL, expecting TOKEN_COMMA
Dropping the entry `fine_epidemiology_` (starting at line 7936)
Warning in bibtex::read.bib(file = input$bib_file) :
references.BIB:8017:0
syntax error, unexpected TOKEN_LITERAL, expecting TOKEN_COMMA
Dropping the entry `arroll_screening_` (starting at line 8017)
Warning in bibtex::read.bib(file = input$bib_file) :
references.BIB:8236:0
syntax error, unexpected TOKEN_LITERAL, expecting TOKEN_COMMA
Dropping the entry `bargh_substitutability_` (starting at line 8236)
from citr.
The syntax error is a bibtex problem in issue ropensci/bibtex#9
where apparently nothing has happened since 2015.
But I still see no references in my list
from citr.
Let me add some information: using windows 8.1 64bit r 3.3.0
from citr.
Hi @RMHogervorst, thanks for reporting this (and sorry for the late reply, I wasn't watching my own repository ?
, that is, when the year was missing in Zotero. Could you provide me with a copy of your bib-file for testing purposes?
from citr.
I have already asked about a resubmission of bibtex
to CRAN as the current development version on Github fixes some of the current problems. I'm a little reluctant to switch to RefManageR::ReadBib
as the package has many more dependencies...
from citr.
Great idea, you could also add some tests to the repo?
I personally love testthat.
I have tried several bibtex files from my zotero reference manager (also
without questionmarks) and none really worked, kept giving the message
that no file was found but when it checked with option(), the correct path
was saved.
Kind regards
Roel
Op 5 jul. 2016 16:40 schreef "Frederik Aust" [email protected]:
I have already asked for a resubmission of bibtex to CRAN as the current
development version on Github fixes some of the current problems. I'm a
little reluctant to switch to RefManageR::ReadBib as the package has many
more dependencies...—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AJGJ-ATIjXTocS2UwoIOaVjmp23X8Floks5qSmzCgaJpZM4JDFKE
.
from citr.
That's odd. I can't reproduce that problem. Is this problem related to the above mentioned issue or does this happen independently? Are you using an absolute or relative path to the bib-file? If it's relative, is your working directory set correctly?
from citr.
I use rstudio projects so the wd is set to that directory (confirmed with getwd() ). I will enclose a file that doesn't load. It was saved as test.bib and if I set test.bib under Path to [...] It says
in the top (search) bar : BibTex file not found
below in the gray bar: no reference selected
Using a absolute path doesn't work either
@article{drummond_reproducible_2012,
title = {Reproducible Research: a Dissenting Opinion},
url = {http://cogprints.org/8675/},
shorttitle = {Reproducible Research},
author = {Drummond, Chris},
urldate = {2016-02-15},
date = {2012},
note = {00001},
file = {Drummond - 2012 - Reproducible Research a Dissenting Opinion.pdf:C\:\\Users\\roel\\AppData\\Roaming\\Zotero\\Zotero\\Profiles\\aw40nx7l.default\\zotero\\storage\\MRQKSNKZ\\Drummond - 2012 - Reproducible Research a Dissenting Opinion.pdf:application/pdf}
}
@article{wilson_best_2014,
title = {Best Practices for Scientific Computing},
volume = {12},
issn = {1545-7885},
url = {http://dx.plos.org/10.1371/journal.pbio.1001745},
doi = {10.1371/journal.pbio.1001745},
pages = {e1001745},
number = {1},
journaltitle = {{PLoS} Biology},
author = {Wilson, Greg and Aruliah, D. A. and Brown, C. Titus and Chue Hong, Neil P. and Davis, Matt and Guy, Richard T. and Haddock, Steven H. D. and Huff, Kathryn D. and Mitchell, Ian M. and Plumbley, Mark D. and Waugh, Ben and White, Ethan P. and Wilson, Paul},
editor = {Eisen, Jonathan A.},
urldate = {2016-02-15},
date = {2014-01-07},
langid = {english},
note = {00109},
file = {Wilson et al. - 2014 - Best Practices for Scientific Computing.pdf:C\:\\Users\\roel\\AppData\\Roaming\\Zotero\\Zotero\\Profiles\\aw40nx7l.default\\zotero\\storage\\VZC52475\\Wilson et al. - 2014 - Best Practices for Scientific Computing.pdf:application/pdf;Wilson et al. - 2014 - Best Practices for Scientific Computing.PDF:C\:\\Users\\roel\\AppData\\Roaming\\Zotero\\Zotero\\Profiles\\aw40nx7l.default\\zotero\\storage\\PG56GMC6\\Wilson et al. - 2014 - Best Practices for Scientific Computing.PDF:application/pdf}
}
@article{baumer_r_2014,
title = {R Markdown: Integrating a reproducible analysis tool into introductory statistics},
url = {http://arxiv.org/abs/1402.1894},
shorttitle = {R Markdown},
journaltitle = {{arXiv} preprint {arXiv}:1402.1894},
author = {Baumer, Ben and Cetinkaya-Rundel, Mine and Bray, Andrew and Loi, Linda and Horton, Nicholas J.},
urldate = {2016-02-15},
date = {2014},
note = {00022},
file = {Baumer et al. - 2014 - R Markdown Integrating a reproducible analysis to.pdf:C\:\\Users\\roel\\AppData\\Roaming\\Zotero\\Zotero\\Profiles\\aw40nx7l.default\\zotero\\storage\\Q86U3MPD\\Baumer et al. - 2014 - R Markdown Integrating a reproducible analysis to.pdf:application/pdf}
}
from citr.
I found one problem, once there is a file called references.bib, it seems to ignore any other file. I renamed that file and I recieve the following errors in the console:
ignoring entry 'drummond_reproducible_2012' (line 1) because :
A bibentry of bibtype ‘Article’ has to specify the fields: journal, year
ignoring entry 'wilson_best_2014' (line 12) because :
A bibentry of bibtype ‘Article’ has to specify the fields: journal, year
ignoring entry 'baumer_r_2014' (line 30) because :
A bibentry of bibtype ‘Article’ has to specify the fields: journal, year
from citr.
Okay, thanks for digging into this. I'll take a closer look.
from citr.
oh this is weird, I tried several ways to output the same articles from zotero.
some create valid and other invalid bibtex files.
- better-bibtex
👍 - betterbiblatex
👎 - biblatex
👎 - bibtex
👍
So it does seem to work!
'better bibtex' in zotero:
@article{baumer_markdown_2014,
title = {R {{Markdown}}: {{Integrating}} a reproducible analysis tool into introductory statistics},
shorttitle = {R {{Markdown}}},
timestamp = {2016-02-15T09:16:13Z},
urldate = {2016-02-15},
journal = {arXiv preprint arXiv:1402.1894},
author = {Baumer, Ben and Cetinkaya-Rundel, Mine and Bray, Andrew and Loi, Linda and Horton, Nicholas J.},
year = {2014},
note = {00022},
file = {Baumer et al. - 2014 - R Markdown Integrating a reproducible analysis to.pdf:C\:\\Users\\roel\\AppData\\Roaming\\Zotero\\Zotero\\Profiles\\aw40nx7l.default\\zotero\\storage\\Q86U3MPD\\Baumer et al. - 2014 - R Markdown Integrating a reproducible analysis to.pdf:application/pdf}
}
from citr.
I see. I use better-bibtex myself. That explains why it was working for me. I think I'll try switching to RefManageR::ReadBib
to see if that works better.
from citr.
As of the latest commit I have switched from bibtex::read.bib
to RefManageR::ReadBib
. I tried all the above excerpts of your bibliography files and they work for me with the exception of drummond_reproducible_2012
, which is missing a required field for the journal title. Even RefManageR::ReadBib
doesn't accept that.
If you still have the other bibtex files generated by Zotero (betterbiblatex, etc.) handy, it would be really helpful if you could either pass them along to me for testing purposes or give them a quick try yourself. You should now be able to simply place them in the working directory and list all of them in the YAML header of your R Markdown like this:
bibliography:
- bib1.bib
- bib2.bib
citr
should read and import all references.
from citr.
Yes this is nicer way to work with the references.
Indeed, this is very handy for single file documents. I had originally decided to use the specified file path because I often work with R Markdown documents that are split into multiple files. The automatic use of bibliographies from the YAML header cannot work in this situation. So specifying a file path is still a possible fall back solution.
This reference is an interesting case. I tested adding the entry to my bibliography via the Zotero plug-in and it produced the same entry you have (including the author name with ;
that is causing the problem). Is there a reason that you keep author = {{\&Na;}}
or could you simply set it to {}
?
from citr.
If you do that you also have to use a different entry type (e.g., @misc
). author
is a required field for articles.
from citr.
I don't think it was intentional to give the name NA; It is also not necessary. strange thing
from citr.
Alternatively, you could use a different citation key format in better-bibtex.
from citr.
Unless there are any other difficulties I'll close this issue for now. Feel free to reopen it if you experience any other difficulties. And again thanks a lot for the detailed and helpful feedback!
from citr.
Yeah sure, I'll close it for you
from citr.
Related Issues (20)
- citr addin not working with absolute paths HOT 2
- Referencing from entire zotero library, rather then exported library-user problem HOT 5
- Citr Aborts session when accessing library HOT 9
- RStudio 1.4 to provide Zotero integration HOT 1
- citr crashes connecting to Zotero library HOT 11
- citr currently not available from CRAN HOT 13
- Error in callFun: argument "location" is missing HOT 4
- Allow for different types of citation key formats in tidy_bib_file() HOT 3
- Allow bibtype "Document" to be read by citr HOT 3
- Citr is not allowed to install in R ver. 4.0.2, Please update! HOT 2
- requires RStudio 0.99.796 or newer (your version is 1.3.1093) HOT 4
- later: interrupt occurred while executing callback. HOT 1
- Error loading Bibtex for second citation insert, citr crashes after inserting one citation
- Add ability for `tidy_bib_file()` to scan `_bookdown.yml` HOT 1
- Error when 2 citations have same author (without parenthesis)
- Error when using the addin: condition length > 1
- How do you implement server-side selectize? HOT 1
- Specific `knitr` and `citr` failure with out.width option
- Error in data.frame: arguments imply differing number of rows HOT 2
- Exporting bib file can successfully be useful and insert citation is ok, but once clicking "Connect and load libraries", it crashed. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from citr.