trinker / pacman

A package management tools for R
312 stars 37 forks source link

p_load with tar.gz #47

Open trinker opened 10 years ago

trinker commented 10 years ago

using p_load with a tar.gz results in a warning. So for instance using p_load(pacman_0.2.0.tar.gz) results inf:

Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
  there is no package called ‘pacman_0.2.0.tar.gz’

This results in another warning:

Warning message:
In p_load(pacman_0.2.0.tar.gz) : Failed to install/load:
pacman_0.2.0.tar.gz

This is caused by pacman:::p_load_single's:

return(suppressMessages(require(package, character.only = TRUE)))

This is sensible because here package would be called pacman_0.2.0.tar.gz. Not sure how we want to handle this. We'd need to detect the tar.gz or zip extension again here and strip it and the versioning off. The logic may be to break at the last underscore and take the first element. I don't want to approach this by myself and do something silly. Thoughts?

Dasonk commented 10 years ago

Honestly I think we should probably just focus on CRAN packages for the first release. We can get to installing/loading local packages, github packages, r-forge, bioconductor, ..., all those goodies later. But for a first release I think we should just focus on CRAN.

trinker commented 10 years ago

OK I'm cool with that.