Using R to extract the citation of a scholarly article for export

I need R to:

  1. Visit THIS page.
  2. Choose "Bibtex" as the format and select "Citation and Abstract" for the "Export type".
  3. Click on "Submit" and save the citation file to a specific folder.

Is this achievable with R? How can I accomplish this task without JavaScript knowledge and difficulty understanding related previous discussions (1, 2, 3)?

In the end, my goal is to download all bibtex (and potentially Endnote) citations from a journal (such as THIS journal).

Answer №1

If you're looking for assistance, I recommend checking out the rcrossref library at https://github.com/ropensci/rcrossref#citation-search. Here is a quick example:

install.packages("rcrossref")
library("rcrossref")    

cat(cr_cn(dois = "10.1126/science.169.3946.635", format = "bibtex"))
#> @article{Frank_1970,
#>  doi = {10.1126/science.169.3946.635},
#>  url = {http://dx.doi.org/10.1126/science.169.3946.635},
#>  year = 1970,
#>  month = {aug},
#>  publisher = {American Association for the Advancement of Science ({AAAS})},
#>  volume = {169},
#>  number = {3946},
#>  pages = {635--641},
#>  author = {H. S. Frank},
#>  title = {The Structure of Ordinary Water: New data and interpretations are yielding new insights     into this fascinating substance},
#>  journal = {Science}
#> }

This library will require only DOI's to work effectively. Additionally, it offers other useful functions for article searches and getting DOIs by publisher.

I hope this information proves helpful!

Answer №2

One way to simulate a form submission is by using the httr package. To achieve this, you can follow these steps:

data <- list(
    doi = "10.1002%2Fasi.21577",
    fileFormat = "BIBTEX",
    hasAbstract = "CITATION_AND_ABSTRACT"
)

library(httr)
url <- "http://onlinelibrary.wiley.com/documentcitationdownloadformsubmit"
response <- POST(url=url, body=data, encode="form")
content(response, "text")
# [1] "@article {ASI:ASI21577,\nauthor = {Callahan, Ewa S. ...

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The TimeoutException from selenium.common.exceptions has occurred: Notification

https://i.stack.imgur.com/telGx.png Experiencing the following issue with the line pst_hldr. Identified the error: File "/home/PycharmProjects/reditt/redit1.py", line 44, in get_links pst_hldr = wait.until(cond.visibility_of_element_locate ...

Guide on exporting a submodule within a TypeScript package

My aspiration is to develop a Typescript library that emulates the structure of popular libraries like RxJS and Angular Material, which are divided into submodules. RxJS and Angular exhibit a way to import features using syntax like this: // RxJS import ...

Generate 2 configurations for webpack

Currently, I am facing a challenge while building a webpack file. The issue arose when I needed to incorporate the 'node' target due to conflicts with an 'fs' function that reads certain files. Subsequently, I decided to split my config ...

What could be causing my randomly generated value to be overwritten so quickly?

I'm encountering an issue with my code. I am attempting to generate objects in random locations using drawHyperBall(), getRandomIntX(), and getRandomIntY(). However, the random value seems to be constantly overwritten. How can I resolve this problem? ...

Learning how to improve tracking of mouse movement on Raycaster using React

In a React component, I have implemented a three js plane using raycasting for mouse effects within a useEffect hook. The functionality works perfectly when the plane occupies the entire screen. However, when I scroll down halfway and place my mouse in the ...

Tips for saving a value within a jQuery function for future use in a different function

I have a situation where I receive a value from a jQuery function that I need to pass to another function. How can I achieve this? jQuery.getJSON(url+"&startDate="+startDate+"&endDate="+endDate+"&jobId="+jobId+"&type="+type, function(data) ...

Tips for retrieving multiple independent response data in Express js app.get callback

What is the optimal way to send two independent MongoDB results in an Express application via HTTP Method? Check out this concise example to clarify: //app.js var express = require('express'); var app = express(); var testController = require(& ...

I receive a notification when I interact with a form in React on the internet

Encountering an error when a user fills out the form I'm constructing: react_devtools_backend.js:4026 Warning: A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined val ...

Train various regressions using the Caret R Package for model fitting

I am looking to apply various models to a single dataset using the Caret R Package. The dependent variable in my data is continuous and quantitative, while the independent variables are binary categorical (absent vs. present). Each row represents an indiv ...

Determine the presence of a JSON Value/Array in a web application using JavaScript and visualize the information in a dynamic

Utilizing the Ticketmaster API has provided me with a sample dataset from their platform, Data 1 - Including information on "presales." "sales": { "public": { "startDateTime": "2019-11 ...

Error message in Typescript: "Property cannot be assigned to because it is immutable, despite not being designated as read-only"

Here is the code snippet I am working with: type SetupProps = { defaults: string; } export class Setup extends React.Component<SetupProps, SetupState> { constructor(props: any) { super(props); this.props.defaults = "Whatever ...

combine the use of paste function in R with various other functions like transform for advanced data manipulation purposes

Whenever I utilize loop functions, I encounter an error message when attempting to paste content into another function. Upon investigation, I realized that the issue lies not with the loop itself, but with the specific function I am using. This inconsisten ...

Notes on using touch devices with Angular

My goal is to make my Angular application capable of displaying a footnote on mobile devices when text injected with nativeElement.innerHTML is clicked. I attempted to explain this before but feel that I didn't do it justice, so here's another sh ...

In React, the clearInterval() function does not effectively clear intervals

Currently, I am implementing the following code: startInterval = () => { this.interval = setInterval(this.intervalFunction, 10000) } stopInterval = () => { clearInterval(this.interval) } However, a problem arises when I invoke the stopInte ...

Ensure that every `then()` function either returns a value or throws an error

I've been encountering an issue while attempting to send push notifications through cloud functions for a group chat application. The error message that keeps popping up in my terminal says: Each then() should return a value or throw What could be ca ...

responding with a value of undefined for the get request

My current project involves URL shortening, but I keep encountering an 'undefined' result in my GET request. Additionally, sometimes I also receive a blank page as a result. Despite everything appearing to be correct based on my knowledge, I&apos ...

How can I integrate Apple remote support into a website with the use of Javascript?

One thing that I find interesting is the ability to use the Apple remote with Front Row, as well as other apps on Mac that support it. I'm curious about whether Web Apps could also be made compatible through Javascript. I have a concept for a TV-like ...

Pagination with React Material UI is a user-friendly and visually

Requirement Within the Material UI framework, I need to implement pagination functionality by clicking on the page numbers (e.g., 1, 2) to make an API call with a limit of 10 and an offset incrementing from 10 after the initial call. https://i.stack.imgur. ...

Input must be either a 12-byte string, a 24-character hexadecimal string, or an integer

As a beginner in coding, I am struggling to understand and fix this issue. If anyone could lend a helping hand, I would be truly grateful. Error Message: BSONTypeError - Argument passed in must be a string of 12 bytes or a string of 24 hex characters or a ...

Error in AngularJS when passing object to modal dialog

I'm facing a challenge with an AngularJS application I'm developing. It involves displaying a list of contacts, each accompanied by a button that triggers a modal containing a form for editing the contact information. The issue arises when attemp ...