usethis icon indicating copy to clipboard operation
usethis copied to clipboard

how do i specify the list of packages in the DESCRIPTION file for a project?

Open ChristelSwift opened this issue 1 year ago • 0 comments

very basic question i'm afraid.. but i'm trying to create a DESCRIPTION file with usethis::use_description for a project (not a package) so that i can then use renv::settings$snapshot.type("explicit") and limit the list of packages that will end up in renv.lock to what i'm using in one of the files in my project.

I've tried something like this:

# create a DESCRIPTION FILE:
usethis::use_description(
  fields = list(
    Type = "project",
    Title = "my project",
    Depends = list("tidyverse", "duckdb", "RJDBC", "aws.s3", "aws.ec2metadata", "httr", "jsonlite", "stringr")
  )
)

but the output doesn't look right as all the package names come out as one concatenated string:

image

What is the correct syntax to include a list of packages needed for a project?

ChristelSwift avatar Jul 27 '22 15:07 ChristelSwift