We can use enframe/deframe
library(tibble)
enframe(y) %>%
select(2:1) %>%
deframe
# Apple Banana
# "a" "b"
It is possible to install the package from the archive. Download the tar file in working directory, use install.packages
with local = TRUE
install.packages("searchable_0.3.3.1.tar.gz", local = TRUE)
#inferring 'repos = NULL' from 'pkgs'
#* installing *source* package ‘searchable’ ...
#** package ‘searchable’ successfully unpacked and MD5 sums checked
#** using staged installation
#** R
#** byte-compile and prepare package for lazy loading
#** help
#*** installing help indices
#** building package indices
#** testing if installed package can be loaded from temporary location
#** testing if installed package can be loaded from final location
#** testing if installed package keeps a record of temporary installation path
#* DONE (searchable)
Now, we can test it
library(searchable)
invert(y)
# Apple Banana
# "a" "b"