Skip to contents

Row-binds x and y (both coerced to pkg_index). If duplicate keys (same Package and Version) are found, keeps the first occurrence and warns. Row names in a pkg_index are always "Package (Version)" and are used to detect duplicates.

Usage

pkg_index_bind(x, y)

Arguments

x, y

pkg_index objects.

Value

A pkg_index containing all unique rows from x and y.

Examples

a <- as_pkg_index(data.frame(Package="foo", Version="1.0"))
b <- as_pkg_index(data.frame(Package="bar", Version="2.0"))
pkg_index_bind(a, b)
#>           Package Version Priority Depends Imports LinkingTo Suggests Enhances
#> foo (1.0)     foo     1.0     <NA>    <NA>    <NA>      <NA>     <NA>     <NA>
#> bar (2.0)     bar     2.0     <NA>    <NA>    <NA>      <NA>     <NA>     <NA>
#>           License License_is_FOSS License_restricts_use OS_type Archs MD5sum
#> foo (1.0)    <NA>            <NA>                  <NA>    <NA>  <NA>   <NA>
#> bar (2.0)    <NA>            <NA>                  <NA>    <NA>  <NA>   <NA>
#>           NeedsCompilation
#> foo (1.0)             <NA>
#> bar (2.0)             <NA>