Biocinstall
1
0
Entering edit mode
@james-w-macdonald-5106
Last seen 5 hours ago
United States
Hi, I like the new version of biocLite() where it asks if I want to update outdated package versions. However, if I have say 30 outdated packages, hitting 'y' 30 times is going to get annoying. Can it be changed to something like Available updates for 'affy' 'AnnotationDbi' 'Biostrings' etc Update all (y/N/c hit 'N' to choose by package)? And hitting N then sends the end user into the existing process? Best, Jim -- James W. MacDonald, M.S. Biostatistician Douglas Lab University of Michigan Department of Human Genetics 5912 Buhl 1241 E. Catherine St. Ann Arbor MI 48109-5618 734-615-7826 ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues
• 652 views
ADD COMMENT
0
Entering edit mode
@vincent-j-carey-jr-4
Last seen 3 days ago
United States
set ask=F in the call? an exclude pattern might be nice to have. On Wed, Aug 24, 2011 at 9:26 AM, James W. MacDonald <jmacdon@med.umich.edu>wrote: > Hi, > > I like the new version of biocLite() where it asks if I want to update > outdated package versions. However, if I have say 30 outdated packages, > hitting 'y' 30 times is going to get annoying. > > Can it be changed to something like > > Available updates for 'affy' 'AnnotationDbi' 'Biostrings' etc > Update all (y/N/c hit 'N' to choose by package)? > > And hitting N then sends the end user into the existing process? > > Best, > > Jim > > > -- > James W. MacDonald, M.S. > Biostatistician > Douglas Lab > University of Michigan > Department of Human Genetics > 5912 Buhl > 1241 E. Catherine St. > Ann Arbor MI 48109-5618 > 734-615-7826 > ************************************************************ > Electronic Mail is not secure, may not be read every day, and should not be > used for urgent or sensitive issues > ______________________________**_________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: stat.et="" hz.ch="" mailman="" listinfo="" bioconductor=""> > Search the archives: http://news.gmane.org/gmane.** > science.biology.informatics.**conductor<http: news.gmane.org="" gmane.="" science.biology.informatics.conductor=""> > [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
On Wed, Aug 24, 2011 at 6:42 AM, Vincent Carey <stvjc at="" channing.harvard.edu=""> wrote: > set ask=F in the call? ?an exclude pattern might be nice to have. Yes, setting ask=FALSE will not prompt at all. The y/n/c prompt comes from R's update.packages(), so we can't change it. Dan > > On Wed, Aug 24, 2011 at 9:26 AM, James W. MacDonald > <jmacdon at="" med.umich.edu="">wrote: > >> Hi, >> >> I like the new version of biocLite() where it asks if I want to update >> outdated package versions. However, if I have say 30 outdated packages, >> hitting 'y' 30 times is going to get annoying. >> >> Can it be changed to something like >> >> Available updates for 'affy' 'AnnotationDbi' 'Biostrings' etc >> Update all (y/N/c hit 'N' to choose by package)? >> >> And hitting N then sends the end user into the existing process? >> >> Best, >> >> Jim >> >> >> -- >> James W. MacDonald, M.S. >> Biostatistician >> Douglas Lab >> University of Michigan >> Department of Human Genetics >> 5912 Buhl >> 1241 E. Catherine St. >> Ann Arbor MI 48109-5618 >> 734-615-7826 >> ************************************************************ >> Electronic Mail is not secure, may not be read every day, and should not be >> used for urgent or sensitive issues >> ______________________________**_________________ >> Bioconductor mailing list >> Bioconductor at r-project.org >> https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: stat.e="" thz.ch="" mailman="" listinfo="" bioconductor=""> >> Search the archives: http://news.gmane.org/gmane.** >> science.biology.informatics.**conductor<http: news.gmane.org="" gmane="" .science.biology.informatics.conductor=""> >> > > ? ? ? ?[[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD REPLY
0
Entering edit mode
Index: biocLite.R =================================================================== --- biocLite.R (revision 57640) +++ biocLite.R (working copy) @@ -90,10 +90,16 @@ suppressUpdates <- FALSE } oldPkgs <- getUpdatablePackages(pkgsToUpdate) + if (nrow(oldPkgs)) { pkgList <- paste(oldPkgs[,"Package"], collapse="' '") - .message("Updating packages '%s'", pkgList) - update.packages(repos=repos, oldPkgs=oldPkgs, ask=ask) + .message("The following packages are outdated: '%s'", pkgList) + answer <- getAnswer("Would you like to update all/some/none? [a/s/n]: ", + allowed = c("a", "A", "s", "S", "n", "N")) + switch(answer, + a = update.packages(repos=repos, oldPkgs=oldPkgs, ask=FALSE), + s = update.packages(repos=repos, oldPkgs=oldPkgs, ask=TRUE), + n = invisible(pkgs)) } invisible(pkgs) @@ -215,4 +221,14 @@ "weaver", "yeastExpData" ) -} \ No newline at end of file +} + +getAnswer <- function(msg, allowed){ + repeat { + cat(msg) + answer <- readLines(n = 1) + if (answer %in% allowed) + break + } + tolower(answer) +}
ADD REPLY
0
Entering edit mode
Hi Jim, On Wed, Aug 24, 2011 at 11:16 AM, James W. MacDonald <jmacdon at="" med.umich.edu=""> wrote: > > > On 8/24/2011 12:38 PM, Dan Tenenbaum wrote: >> >> On Wed, Aug 24, 2011 at 6:42 AM, Vincent Carey >> <stvjc at="" channing.harvard.edu=""> ?wrote: >>> >>> set ask=F in the call? ?an exclude pattern might be nice to have. >> >> Yes, setting ask=FALSE will not prompt at all. >> >> The y/n/c prompt comes from R's update.packages(), so we can't change it. > > Right. But that isn't what I asked. > > To me the issue is that new functionality has been added to biocLite(), > where the default is to update packages. This is good, and is something that > some people have been asking about for years (Hi HB). > > However, the default is to just dump people into update.packages() with ask > = TRUE. Which is fair enough. Some people would be off-put by having things > updated against their wishes. So I see the point of setting ask = TRUE as > the default. > > However, to me it is simpler to just tell people that there are some > packages that can be updated and ask them how they want to handle the > situation. Please see the attached patch. If you want, I can just increment > the version and commit. I added a modified version of your patch. If ask==TRUE, your prompting code is run, otherwise the value of ask is passed unchanged to update.packages(). Also added some code to avoid calling readLines() from a non-interactive session and in that case to behave as though the user pressed "n", as update.packages() does. This will auto-install starting tomorrow shortly after noon Seattle time. Thanks for the suggestion. Dan > > Best, > > Jim > > > > > >> >> Dan >> >>> >>> On Wed, Aug 24, 2011 at 9:26 AM, James W. MacDonald >>> <jmacdon at="" med.umich.edu="">wrote: >>> >>>> Hi, >>>> >>>> I like the new version of biocLite() where it asks if I want to update >>>> outdated package versions. However, if I have say 30 outdated packages, >>>> hitting 'y' 30 times is going to get annoying. >>>> >>>> Can it be changed to something like >>>> >>>> Available updates for 'affy' 'AnnotationDbi' 'Biostrings' etc >>>> Update all (y/N/c hit 'N' to choose by package)? >>>> >>>> And hitting N then sends the end user into the existing process? >>>> >>>> Best, >>>> >>>> Jim >>>> >>>> >>>> -- >>>> James W. MacDonald, M.S. >>>> Biostatistician >>>> Douglas Lab >>>> University of Michigan >>>> Department of Human Genetics >>>> 5912 Buhl >>>> 1241 E. Catherine St. >>>> Ann Arbor MI 48109-5618 >>>> 734-615-7826 >>>> ************************************************************ >>>> Electronic Mail is not secure, may not be read every day, and should not >>>> be >>>> used for urgent or sensitive issues >>>> ______________________________**_________________ >>>> Bioconductor mailing list >>>> Bioconductor at r-project.org >>>> >>>> https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: stat="" .ethz.ch="" mailman="" listinfo="" bioconductor=""> >>>> Search the archives: http://news.gmane.org/gmane.** >>>> >>>> science.biology.informatics.**conductor<http: news.gmane.org="" gma="" ne.science.biology.informatics.conductor=""> >>>> >>> >>> ? ? ? ?[[alternative HTML version deleted]] >>> >>> _______________________________________________ >>> Bioconductor mailing list >>> Bioconductor at r-project.org >>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>> Search the archives: >>> http://news.gmane.org/gmane.science.biology.informatics.conductor >>> > > -- > James W. MacDonald, M.S. > Biostatistician > Douglas Lab > University of Michigan > Department of Human Genetics > 5912 Buhl > 1241 E. Catherine St. > Ann Arbor MI 48109-5618 > 734-615-7826 > ********************************************************** > Electronic Mail is not secure, may not be read every day, and should not be > used for urgent or sensitive issues
ADD REPLY

Login before adding your answer.

Traffic: 487 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6