Learn R Programming

Nmisc (version 0.3.7)

generate_install_file: Generates an R file to install packages used by the project.

Description

The function takes the output of get_packages and writes in a file the commands needed to install and update package used throughout the project.

Usage

generate_install_file(
  file,
  package_df = get_packages(),
  include_core_package = FALSE
)

Arguments

file

The name of the file to be created.

package_df

A data frame obtained with get_packages that contains information regarding the name, version and source of the package.

include_core_package

Logical, whether to include in the generated install file package which come with R by default

Value

Nothing

See Also

get_packages

Examples

Run this code
# NOT RUN {
package_df <- get_packages(package_options = c("library"))
generate_install_file("install_packages.R", package_df)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab