pacman icon indicating copy to clipboard operation
pacman copied to clipboard

p_set_cranrepo not exported

Open jdossgollin opened this issue 9 years ago • 11 comments
trafficstars

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

jdossgollin avatar Sep 23 '16 01:09 jdossgollin

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

trinker avatar Sep 23 '16 01:09 trinker

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

jdossgollin avatar Sep 23 '16 02:09 jdossgollin

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

Dasonk avatar Feb 24 '17 18:02 Dasonk

@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.

Dasonk avatar Feb 24 '17 19:02 Dasonk

@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

jdossgollin avatar Feb 24 '17 19:02 jdossgollin

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.

Dasonk avatar Feb 24 '17 19:02 Dasonk

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

jdossgollin avatar Feb 24 '17 19:02 jdossgollin

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).

Dasonk avatar Mar 06 '17 20:03 Dasonk

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

jdossgollin avatar Mar 06 '17 20:03 jdossgollin

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

verajosemanuel avatar Nov 16 '20 09:11 verajosemanuel

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!!

Fredo-XVII avatar Sep 15 '22 15:09 Fredo-XVII