jacobbien/litr-project

LitrVersionUsed

Closed this issue · 2 comments

For some reason, I get a duplicated LitrVersionUsed field in my description file. This happens when rendering the code in this repository: flowsmooth, commit number (46e6b7).

Package: flowsmooth
Title: flowsmooth
Version: 0.0.0.9000
Authors@R: 
    person("Sangwon", "Hyun", , "sangwonh@ucsc.edu", role = c("aut", "cre"))
Description: Time-smooth mixture modeling for flow cytometry data.
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Depends: 
    tidyverse
Imports: 
    clue,
    ggplot2
Suggests: 
    testthat (>= 3.0.0)
Config/testthat/edition: 3
LitrVersionUsed: 0.8.0
LitrId: 3a5afc674f9159547c7072524f7ec9ee
LitrVersionUsed: 0.8.0

Any idea what I'm doing wrong?

I tried cloning your repo and then running the following:

litr::render("index.Rmd", minimal_eval = TRUE)

When I do so, I do not get the duplicated LitrVersionUsed line. I wasn't able to run this with minimal_eval=FALSE because of some of the code chunks have devtools::load_all() calls to repos I do not have access to.

Can you first make sure you have the latest development version of litr by running

remotes::install_github("jacobbien/litr-project", subdir = "litr")

then restart your R session, and then run the render command that I have above? If that makes the problem go away then I suspect there is some code chunk that when evaluated leads this to happen. I see you have a call to

litr::load_all("~/repos/flowsmooth/index.Rmd")

within the document that creates the package. This function is intended to be called in the console for interactive use and calling it here might be leading to funny behavior.

This issue went away (not sure why)!