Skip to content
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

[traits.build workflow] austraits$sources, bug in viewing individual references #160

Open
ehwenk opened this issue Oct 7, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@ehwenk
Copy link
Collaborator

ehwenk commented Oct 7, 2021

This correctly gives a list of all references, formatted:

austraits$sources

This correctly gives a list of all dataset_ids:

View(austraits$sources)

However, if you try and explore individual dataset_ids, you get a never-ending nesting of all dataset_ids, but never the actual bibtex information. For instance, try

View(austraits$sources$Falster_2003)

or

austraits$sources$Falster_2003
@ehwenk ehwenk added the bug Something isn't working label Oct 7, 2021
@GaryTruong
Copy link

It is really strange that there seems to be an endless list created for the sources. I tried to work out why it was doing this and I suspect it has something to do with lapply and how it interacts with convert_list_to_bib. I removed the lapply and it seemed to have fixed the endless listing for some studies but then errors out for other studies when I remake austraits.

Alternatively if you want to see the bib info for a specific study you can use [ ] rather than $ to see the reference info.
e.g.

austraits$sources["Falster_2003"]

@ehwenk
Copy link
Collaborator Author

ehwenk commented Nov 22, 2021

I know there are work-arounds for viewing the information. Daniel asked that I post the issue, since it is a "bug", but also not a high priority one, since it doesn't actually lead to any downstream problems. (Why neither of us found it until I was checking every component of every table one day.)

@dfalster
Copy link
Member

I think culprit is RefManger::as.BibEntry. The same problem happens when you use the example from the package:

bib <- c(bibtype = "article", key = "mclean2014", title = "My New Article",
  author = "Mathew W. McLean", journaltitle = "The Journal", date = "2014-01")
y <- as.BibEntry(bib)
View(y)

image

@GaryTruong Perhaps check issues to see if this one has already been mentioned? https://github.com/ropensci/RefManageR

I wonder what alternative exist? I went with RefManageR as the standard bibtex was throwing some issues. But we could consider going back to bibtex

@GaryTruong
Copy link

Yeah you are right, the bug does appear to be from as.BibEntry. I've had a look at the issues page including closed issues and there doesnt seem to be any mention of this bug there.

@GaryTruong
Copy link

On further inspection and going down bit of a rabbit hole it looks like the source of the bug stems from RefManageR::BibEntry which builds on utils::bibentry. Both of them generate the same problem

RefManageR::BibEntry(bibtype = "article", key = "mclean2014", title = "My New Article",
         journal = "The Journal", year = 2014, author = "Mathew W. McLean") %>% View

utils::bibentry(bibtype = "article", key = "mclean2014", title = "My New Article",
         journal = "The Journal", year = 2014, author = "Mathew W. McLean") %>% View

We could try bibtex. Do you remember what issues were caused when bibtex was used previously?

@dfalster
Copy link
Member

It was a while ago so I'm a bit hazy. But I think I was finding it hard to create a bib entry from a list with bibtex, as only option is to read.bib, which requires file input. Hence RefManager seemed like a good solution.

@ehwenk ehwenk transferred this issue from traitecoevo/austraits.build Jul 31, 2024
@ehwenk ehwenk changed the title austraits$sources, bug in viewing individual references [traits.build minor bug] austraits$sources, bug in viewing individual references Jul 31, 2024
@ehwenk ehwenk added this to AusTraits Jul 31, 2024
@ehwenk ehwenk moved this to Backlog in AusTraits Jul 31, 2024
@ehwenk ehwenk changed the title [traits.build minor bug] austraits$sources, bug in viewing individual references [traits.build workflow] austraits$sources, bug in viewing individual references Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

3 participants