pampicloud / cma-week1

Solving Exercise 2
0 stars 0 forks source link

implicit package installation #2

Open ratnanil opened 3 years ago

ratnanil commented 3 years ago

https://github.com/pampicloud/cma-week1/blob/def2cf6735745bf0b540d558590c630858781f2f/assignment/assignment_2.Rmd#L44-L51

I see this function used very often in students submission and alway wonder where it comes from. I am not a big fan of the function, since an unwary user might install many packages without explicit content when running your code. I think installing packages should require explicit user consent.

pampicloud commented 3 years ago

Hi nils

This function only installs if the package is needed. So no packages are installed, if not needed.

Cheers oli

On 11 May 2021, at 10:50, Nils @.***> wrote:

https://github.com/pampicloud/cma-week1/blob/def2cf6735745bf0b540d558590c630858781f2f/assignment_2.Rmd#L44-L51 https://github.com/pampicloud/cma-week1/blob/def2cf6735745bf0b540d558590c630858781f2f/assignment_2.Rmd#L44-L51

I see this function used very often in students submission and alway wonder where it comes from. I am not a big fan of the function, since an unwary user might install many packages without explicit content when running your code. I think installing packages should require explicit user consent.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pampicloud/cma-week1/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMBP66NXDGUIWGWOGY5AGKDTNDVUDANCNFSM44UZBHVQ.

ratnanil commented 3 years ago

Yes and that's my point. I want to decide myself if I want to install a missing package. Using require() on each library makes missing libraries very explicit.