ismayc / reedtemplates

(DEPRECATED - Please don't use this!) A template for creating Reed College senior theses using R and Markdown.
Other
27 stars 13 forks source link

Naming issue #3

Closed csrvermaak closed 8 years ago

csrvermaak commented 8 years ago

Hi Chester - many thanks for what I can see will be an immensely useful package.

I am however having some issues getting the example to work. I'm following the instructions here

I am able to create the "MyReedThesis.Rmd" file from the Template, and the folder structure is created correctly.

However, when I click "knit", I get the following message in the RMarkdown console:

Error in loadNamespace(name) : there is no package called 'rticles'
Calls: <Anonymous> ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted

I've downloaded the package using both

devtools::install_github("ismayc/reedtemplates")

devtools::install_github("ismayc/rticles")

Please advise?

csrvermaak commented 8 years ago

This is the content of the default template Rmd file:

---
author: 'Your R. Name'
date: 'May 20xx'
division: 'Mathematics and Natural Sciences'
advisor: 'Advisor F. Name'
department: 'Mathematics'
title: 'My Final College Paper'
abstract: >
  `r paste(readLines('abstract.Rmd'), collapse = '\n')`
# If you'd rather include the preliminary content in files instead of inline
# like below, use a command like that for the abstract above.  Note that a tab is # needed on the line after the >.
acknowledgements: >
  I want to thank a few people.
dedication: >
  You can have a dedication here if you wish. 
preface: >
  This is an example of a thesis setup to use the reed thesis document class.
bibliography: bib/thesis.bib
# Download your specific bibliography database file and refer to it in the line above.
csl: csl/apa.csl
# Download your specific csl file and refer to it in the line above.
output: 
  rticles::reed_thesis:
    toc: true
lot: true
lof: true
#header-includes:
#- \usepackage{tikz}
---

<!--
Above is the YAML (YAML Ain't Markup Language) header that includes a lot of metadata used to produce the document.  Be careful with spacing in this header!

If you'd prefer to not include a Dedication, for example, simply delete lines 12 and 13 above or add a # before them to comment them out.  If you have other LaTeX packages you would like to include, delete the # before header-includes and list the packages after hyphens on new lines.

If you'd like to include a comment that won't be produced in your resulting PDF file enclose it in a block like this.
-->

```{r include_packages, include = FALSE}
# This chunk ensures that the rticles package is
# installed and loaded
# This rticles package includes the template files for the thesis
# and also two functions used for labeling and referencing
if(!require(devtools))
  install.packages("devtools", repos = "http://cran.rstudio.com")
if(!require(rticles)){
  library(devtools)
  devtools::install_github("ismayc/rticles")
}
library(rticles)
``` r chapter2, child = 'chap2.Rmd' ``` ``` r chapter3, child = 'chap3.Rmd' ```
csrvermaak commented 8 years ago

It would seem that perhaps the default Rmd from template still refers to 'rticles'. When I did a find/replace on rticles to reedtemplates, I get the following error:

Error: Couldn't find template file /resources/template.tex
Execution halted

I do have LaTex installed, not sure what the error relates to?

ismayc commented 8 years ago

Hi Rademeyer,

The errors you were receiving were because I missed a couple rticles references in my documents that have now been switched over to reedtemplates. You should be able to get the template working now.

You can install via devtools::install_github("ismayc/reedtemplates"). (The devtools::install_github("ismayc/rticles") code mentioned on the R-bloggers post will also work since GitHub automatically redirects to the new reedtemplates name.)

Let me know if you have any other troubles.

csrvermaak commented 8 years ago

Worked like a charm! Thanks Chester for a great package. :+1:

ismayc commented 8 years ago

Excellent! Please do let me know if you'd like any other features or if you have any other troubles.