使用citeRpackages按FEMS格式导入R工具至EndNote遇安装问题
Hey there, let's break down why you're hitting that installation error and how to get your R, RStudio, and package citations into EndNote in FEMS format.
Why isn't citeRpackages installing?
Your R version (3.4.2) is from 2017—pretty outdated at this point. The citeRpackages repo hasn't been updated in years, and it relies on newer versions of devtools and other dependencies that don't support such an old R release. That's why both install.packages() and the GitHub install are failing.
Alternative: Generate BibTeX Citations (Compatible with EndNote & FEMS)
Instead of fighting with an unmaintained package, use built-in R tools and a reliable older package to create citations that you can import into EndNote and format as FEMS.
1. Grab citations for R, RStudio, and your packages
For R itself
Run this in your R console:
citation()
Copy the full BibTeX block (starts with @Manual and ends with the closing }) — that's your R citation.
For RStudio
RStudio doesn't have a built-in citation() function, but you can use this pre-made BibTeX entry (adjust the year to match your RStudio version if needed):
@Manual{RStudio, title = {RStudio: Integrated Development Environment for R}, author = {{RStudio Team}}, organization = {RStudio, PBC}, address = {Boston, MA}, year = {2024}, url = {http://www.rstudio.com/}, }
For your R packages (batch method)
The bibtex package is compatible with R 3.4.2 and lets you generate citations for multiple packages at once:
- First install it:
install.packages("bibtex")
- Then list your packages and export to a BibTeX file:
library(bibtex) # Replace with your actual package names my_packages <- c("dplyr", "ggplot2", "tidyr", "lme4") # This creates a file called "r_package_citations.bib" in your working directory write.bib(my_packages, file = "r_package_citations.bib")
2. Import into EndNote and switch to FEMS format
- Open EndNote, go to File > Import > File.
- Select the
.bibfile you generated, set Import Option to "BibTeX", then click Import. - Once imported, select all your R-related citations. Go to Edit > Output Styles > Select Another Style and pick the FEMS style (if you don't see it, you can download the official FEMS style from the EndNote website and install it first).
Optional: Hail Mary for installing citeRpackages (not recommended)
If you really want to try getting citeRpackages to work, you'll need an older version of devtools that supports R 3.4.2:
- Install the compatible
devtoolsversion:
install.packages("devtools", version = "1.13.6")
- Then try the GitHub install again:
devtools::install_github("jrgant/citeRpackages", ref = "master")
But fair warning: even if it installs, it might not work correctly with your old R version, so the BibTeX method is way more reliable.
内容的提问来源于stack exchange,提问作者Yike Shen

