trinker / pacman

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

p_set_cranrepo not exported #80

Open jdossgollin opened 7 years ago

jdossgollin commented 7 years ago

If I type

pacman::p_set_cranrepo

I get

Error: 'p_set_cranrepo' is not an exported object from 'namespace:pacman'

should be straightforward to fix -- it comes up if I run its help page

trinker commented 7 years ago

We had not thought it would be useful to export widely. Thank you for opeing this issue. My coauthor and I will discuss what you have brought forward. In the meantime you can use:

pacman:::p_set_cranrepo
jdossgollin commented 7 years ago

Thanks, forgot about the ::: trick -- just :: wasn't working.

Dasonk commented 7 years ago

I guess I don't see a reason why we couldn't export this.

Dasonk commented 7 years ago

@jdossgollin Are you planning on using this to specifically set your repository to one that you want to specify? Right now the function is programmed to check if there is a default set and if not then it sets it to the rstudio's cran repo. Technically we allow the function to specify this default repository but if a repository is already set then it won't modify it (we don't want to change the repo if the user already has one set but if nothing has been set and they go to install a package we default to cran.rstudio.com to give the user less headaches).

So I guess I'm wondering if you plan on using this to actually set the repository. If so then I might modify the function a little bit instead of just exporting it directly.

jdossgollin commented 7 years ago

@Dasonk thanks for getting back on this! It would be great to be able to use it for that -- have been running code on a cluster that doesn't play nicely with https, but pacman is a great tool and would love to be able to use it. I also can't remember if there's a way to set the package directory using p_load -- it was a while back that I was playing with this

Dasonk commented 7 years ago

Ok I'll see if I can make that change and get it pushed to the repository. If I don't do it today it should be up by Monday.

As far as the p_load issue I don't think there is a way to specify the package directory (I'm assuming you're talking about the location to install/load from on the local machine). If you want to open up a new issue for that we could tag it as a feature request and that would provide a nice place to have discussion on what might make sense to do in that case.

jdossgollin commented 7 years ago

Sorry about close/re-open clicked the wrong button Thanks!

Dasonk commented 7 years ago

Sorry for taking so long. I've been thinking about the best way to actually implement this. I don't think our original approach was ideal. It seems like some of the functionality we have right now could be replaced by calls to some base functions. Either way I'll try to get this implemented soon but my original estimate was a little off (obviously).

jdossgollin commented 7 years ago

Thanks for the update! No rush on my end :)

verajosemanuel commented 3 years ago

Any update on this? I would use it to set my local corporative repo

Fredo-XVII commented 2 years ago

I found this function and found it very useful. I also ran into the export issue, but fixing with :::. It does not look like it has many dependencies so should be easy to export. Not so sure how it will impact the other functions that use this once it is export.

Thanks! Great Package!!