Skip to contents

This function coerces statquote objects to strings suitable for rendering in markdown. Quotes and sources are placed within output formatted via the sprintf function.

This function formats a statquote object to the tagged key:value format used for maintaining the statquotes database. The key names are:


  quo: This is a quotation.
  src: Person or persons who said or wrote the quote.
  cit: Citation for the original quote.
  url: URL where the quote can be found (such as journal articles).
  tag: Comma-separated tags to categorize the quote.
  tex: TeX-formatted citation

Usage

as.markdown(quotes, form = "> *%s* -- %s\n\n", cite = TRUE)

as.tagged(quotes, qid = TRUE)

Arguments

quotes

an object of class statquote returned from functions such as search_quotes or statquote

form

structure of the markdown output for the text (first argument) and source (second argument) passed to sprintf

cite

logical; should the cite field be included in the source output?

qid

logical. Should the quote id number `qid` be included in the output?

Value

character vector of formatted markdown quotes

A character vector of lines

Examples


ll <- search_quotes("Tukey")
as.markdown(ll)
#>  [1] "> *The greatest value of a picture is when it forces us to notice what we never expected to see.* -- John W. Tukey, Exploratory Data Analysis, 1977\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
#>  [2] "> *If data analysis is to be well done, much of it must be a matter of judgment, and 'theory' whether statistical or non-statistical, will have to guide, not command.* -- John W. Tukey, The Future of Data Analysis, Annals of Mathematical Statistics, Vol. 33 (1), 1962.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
#>  [3] "> *The physical sciences are used to 'praying over' their data, examining the same data from a variety of points of view. This process has been very rewarding, and has led to many extremely valuable insights. Without this sort of flexibility, progress in physical science would have been much slower. Flexibility in analysis is often to be had honestly at the price of a willingness not to demand that what has already been observed shall establish, or prove, what analysis suggests. In physical science generally, the results of praying over the data are thought of as something to be put to further test in another experiment, as indications rather than conclusions.* -- John W. Tukey, The Future of Data Analysis, Annals of Mathematical Statistics, Vol. 33 (1), 1962.\n\n"
#>  [4] "> *If one technique of data analysis were to be exalted above all others for its ability to be revealing to the mind in connection with each of many different models, there is little doubt which one would be chosen. The simple graph has brought more information to the data analyst's mind than any other device. It specializes in providing indications of unexpected phenomena.* -- John W. Tukey, The Future of Data Analysis,  The Annals of Mathematical Statistics, Vol. 33, No. 1 (Mar., 1962), pp. 1-67.\n\n"                                                                                                                                                                                                                                                                           
#>  [5] "> *The greatest possibilities of visual display lie in vividness and inescapability of the intended message. A visual display can stop your mental flow in its tracks and make you think. A visual display can force you to notice what you never expected to see.* -- John W. Tukey\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
#>  [6] "> *The purpose of [data] display is comparison (recognition of phenomena), not numbers ... The phenomena are the main actors, numbers are the supporting cast.* -- John W. Tukey\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
#>  [7] "> *...But it is not always clear *which* 1000 words.* -- John W. Tukey, 1973\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
#>  [8] "> *Exploratory data analysis can never be the whole story, but nothing else can serve as the foundation stone -- as the first step.* -- John W. Tukey, Exploratory Data Analysis, 1977, p.3.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
#>  [9] "> *The best thing about being a statistician is that you get to play in everyone's backyard.* -- John W. Tukey\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
#> [10] "> *Far better an approximate answer to the right question, which is often vague, than an exact answer to the wrong question, which can always be made precise.* -- John W. Tukey, The Future of Data Analysis,  The Annals of Mathematical Statistics, Vol. 33, No. 1 (Mar., 1962), pp. 1-67.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
#> [11] "> *The worst, i.e., most dangerous, feature of 'accepting the null hypothesis' is the giving up of explicit uncertainty ... Mathematics can sometimes be put in such black-and-white terms, but our knowledge or belief about the external world never can.* -- John W. Tukey, The Philosophy of Multiple Comparisons, Statist. Sci. 6 (1) 100 - 116, February, 1991.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                             
#> [12] "> *Better to have an approximate answer to the right question than a precise answer to the wrong question.* -- John W. Tukey, Quoted by John Chambers\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
#> [13] "> *The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.* -- John W. Tukey, Sunset Salvo, The American Statistician Vol. 40 (1), 1986.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
#> [14] "> *The practical power of a statistical test is the product of its' statistical power and the probability of use.* -- John W. Tukey, A Quick, Compact, Two Sample Test to Duckworth's Specifications\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
#> [15] "> *Since the aim of exploratory data analysis is to learn what seems to be, it should be no surprise that pictures play a vital role in doing it well.* -- John W. Tukey, John W. Tukey's Works on Interactive Graphics.  The Annals of Statistics Vol. 30, No. 6 (Dec., 2002), pp. 1629-1639\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
#> [16] "> *There is nothing better than a picture for making you think of questions you had forgotten to ask (even mentally).* -- John W. Tukey & Paul Tukey, John W. Tukey's Works on Interactive Graphics.  The Annals of Statistics Vol. 30, No. 6 (Dec., 2002), pp. 1629-1639\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
#> [17] "> *Unless exploratory data analysis uncovers indications, usually quantitative ones, there is likely to nothing for confirmatory data analysis to consider.* -- John Tukey, Exploratory Data Analysis, p. 3.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
#> [18] "> *One thing the data analyst has to learn is how to expose himself to what his data are willing--or even anxious--to tell him. Finding clues requires looking in the right places and with the right magnifying glass.* -- John Tukey, Exploratory Data Analysis, p. 21.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
#> [19] "> *In data analysis, a plot of y against x may help us when we know nothing about the logical connection from x to y--even when we do not know whether or not there is one--even when we know that such a connection is impossible.* -- John Tukey, Exploratory Data Analysis, p. 131.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
#> [20] "> *Whatever the data, we can try to gain understanding by straightening or by flattening. When we succeed in doing one or both, we almost always see more clearly what is going on.* -- John Tukey, Exploratory Data Analysis, p. 148.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
#> [21] "> *A competent data analysis of an even moderately complex set of data is a thing of trials and retreats, of dead ends and branches.* -- John Tukey, Computer Science and Statistics: Proceedings of the 14th Symposium on the Interface, p. 4.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
#> [22] "> *The purpose of plotting is to convey phenomena to the viewer's cortex, not to provide a place to lookup observed numbers.* -- Kaye Basford, John Tukey, Graphical Analysis of Multi-Response Data, p. 373.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
#> [23] "> *Had we started with this [quantile] plot, noticed that it looks straight and not looked further, we would have missed the important features of the data.  The general lesson is important. Theoretical quantile-quantile plots are not a panacea and must be used in conjunction with other displays and analyses to get a full picture of the behavior of the data.* -- John M. Chambers, William S. Cleveland, Beat Kleiner, Paul A. Tukey, Graphical Methods for Data Analysis, p. 212.\n\n"                                                                                                                                                                                                                                                                                                    
#> [24] "> *Our conclusion about [choropleth] patch maps agrees with Tukey's (1979), who left little doubt about his opinions by stating, 'I am coming to be less and less satisfied with the set of maps that some dignify by the name *statistical map* and that I would gladly revile with the name *patch map*'.* -- William Cleveland & Robert McGill, Graphical Perception: Theory, Experimentation, and Application to the Development of Graphical Models, Journal of the American Statistical Association, 79, 531--554, 1984.\n\n"                                                                                                                                                                                                                                                                    
#> [25] "> *There is no more reason to expect one graph to 'tell all' than to expect one number to do the same.* -- John Tukey, Exploratory Data Analysis.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
#> [26] "> *There is no excuse for failing to plot and look.* -- John Tukey, Exploratory Data Analysis\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
#> [27] "> *Spatial patterns may be due to many sources of variation. In the context of seeking explanations, John Tukey said that, \"the unadjusted plot should not be made.\" In other words, our perceptual/cognitive abilities are poor in terms of adjusting for known source of variations and envisioning the resulting map. A better strategy is to control for known sources of variation and/or adjust the estimates before making the map.* -- Dan Carr, Survey Research Methods Section newsletter, July 2002.\n\n"                                                                                                                                                                                                                                                                                 
#> [28] "> *One is so much less than two. [John Tukey's eulogy of his wife.]* -- John Tukey, The life and professional contributions of John W. Tukey, The Annals of Statistics, 2001, Vol 30, p. 46.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
#> [29] "> *Statisticians classically asked the wrong question--and were willing to answer with a lie, one that was often a downright lie. They asked \"Are the effects of A and B different?\" and they were willing to answer \"no\". All we know about the world teaches us that the effects of A and B are always different--in some decimal place--for every A and B. Thus asking \"Are the effects different?\" is foolish. What we should be answering first is \"Can we tell the direction in which the effects of A differ from the effects of B?\" In other words, can we be confident about the direction from A to B? Is it \"up\", \"down\" or \"uncertain\"?* -- John Tukey, The Philosophy of Multiple Comparisons, Statistical Science, 6, 100-116.\n\n"                                        
#> [30] "> *No one has ever shown that he or she had a free lunch. Here, of course, \"free lunch\" means \"usefulness of a model that is locally easy to make inferences from\".* -- John Tukey, Issues relevant to an honest account of data-based inference, partially in the light of Laurie Davies' paper.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
#> [31] "> *If asymptotics are of any real value, it must be because they teach us something useful in finite samples. I wish I knew how to be sure when this happens.* -- John Tukey, Issues relevant to an honest account of data-based inference, partially in the light of Laurie Davies' paper.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
#> [32] "> *George Box: We don't need robust methods. A good statistician (particularly a Bayesian one) will model the data well and find the outliers.\nJohn Tukey: They ran over 2000 statistical analyses at Rothamsted last week and nobody noticed anything. A red light warning would be most helpful.* -- George Box vs. John Tukey, Douglas Martin, 1999 S-Plus Conference Proceedings.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                            
#> [33] "> *Statistics is a science in my opinion, and it is no more a branch of mathematics than are physics, chemistry, and economics; for if its methods fail the test of experience--not the test of logic--they will be discarded.* -- John Tukey, The life and professional contributions of John W. Tukey, by David Brillinger, The Annals of Statistics, 2001, Vol 30.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                             
#> [34] "> *One Christmas Tukey gave his students books of crossword puzzles as presents. Upon examining the books the students found that Tukey had removed the puzzle answers and had replaced them with words of the sense: \"Doing statistics is like doing crosswords except that one cannot know for sure whether one has found the solution.\"* -- John Tukey, The life and professional contributions of John W. Tukey, by David Brillinger, The Annals of Statistics, 2001, Vol 30, p. 22.\n\n"                                                                                                                                                                                                                                                                                                        
#> [35] "> *A sort of question that is inevitable is: \"Someone taught my students exploratory, and now (boo hoo) they want me to tell them how to assess significance or confidence for all these unusual functions of the data. Oh, what can we do?\" To this there is an easy answer: TEACH them the JACKKNIFE.* -- John Tukey, We Need Both Exploratory and Confirmatory, The American Statistician, Vol 34, No 1, p. 25.\n\n"                                                                                                                                                                                                                                                                                                                                                                              
#> [36] "> *John Tukey's eye for detail was amazing. When we were preparing some of the material for our book (which was published last year), it was most disconcerting to have him glance at the data and question one value out of several thousand points. Of course, he was correct and I had missed identifying this anomaly.* -- Kaye Basford\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                       
#> [37] "> *Many students are curious about the '1.5 x IQR Rule';, i.e. why do we use Q1 - 1.5 x IQR (or Q3 + 1.5 x IQR) as the value for deciding if a data value is classified as an outlier? Paul Velleman, a statistician at Cornell University, was a student of John Tukey, who invented the boxplot and the 1.5 x IQR Rule. When he asked Tukey, 'Why 1.5?', Tukey answered, 'Because 1 is too small and 2 is too large.' [Assuming a Gaussian distribution, about 1 value in 100 would be an outlier. Using 2 x IQR would lead to 1 value in 1000 being an outlier.]* -- Unknown\n\n"                                                                                                                                                                                                                   
#> [38] "> *It is a rare thing that a specific body of data tells us as clearly as we would wish how it itself should be analyzed.* -- John Tukey, Exploratory Data Analysis, p. 397.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
#> [39] "> *Just which robust/resistant methods you use is not important--what is important is that you use some. It is perfectly proper to use both classical and robust/resistant methods routinely, and only worry when they differ enough to matter. But, when they differ, you should think hard.* -- John Tukey, Quoted by Doug Martin\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                               
#> [40] "> *I believe that there are many classes of problems where Bayesian analyses are reasonable, mainly classes with which I have little acquaintance.* -- John Tukey, The life and professional contributions of John W. Tukey, The Annals of Statistics, 2001, Vol 30, p. 45.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
#> [41] "> *The twin assumptions of normality of distribution and homogeneity of variance are not ever exactly fulfilled in practice, and often they do not even hold to a good approximation.* -- John W. Tukey, The problem of multiple comparisons. 1973. Unpublished manuscript, Dept. of Statistics, Princeton University.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
#> [42] "> *[A]sking 'Are the effects different?' is foolish.* -- John W. Tukey, The philosophy of multiple comparisons. 1991. Statistical Science 6 : 100-116.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
#> [43] "> *Empirical knowledge is always fuzzy! And theoretical knowledge, like all the laws of physics, as of today's date, is always wrong-in detail, though possibly providing some very good approximations indeed.* -- John W. Tukey, The philosophy of multiple comparisons. 1991. Statistical Science 6 : 100-116.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
#> [44] "> *If significance tests are required for still larger samples, graphical accuracy is insufficient, and arithmetical methods are advised. A word to the wise is in order here, however. Almost never does it make sense to use exact binomial significance tests on such data - for the inevitable small deviations from the mathematical model of independence and constant split have piled up to such an extent that the binomial variability is deeply buried and unnoticeable. Graphical treatment of such large samples may still be worthwhile because it brings the results more vividly to the eye.* -- Frederick Mosteller & John W Tukey, The Uses and Usefulness of Binomial Probability Paper, Journal of the American Statistical Association 44, 1949.\n\n"                             
#> [45] "> *If we need a short suggestion of what exploratory data analysis is, I would suggest that: 1. it is an attitude, AND 2. a flexibility, AND 3. some graph paper (or transparencies, or both).* -- John W. Tukey, Jones, L. V. (Ed.). (1986). The collected works of John W. Tukey: Philosophy and principles of data analysis 1949-1964 (Vols. III & IV). London: Chapman & Hall.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                                
#> [46] "> *Three of the main strategies of data analysis are: 1. graphical presentation. 2. provision of flexibility in viewpoint and in facilities,  3. intensive search for parsimony and simplicity.* -- John W. Tukey, Jones, L. V. (Ed.). (1986). The collected works of John W. Tukey: Philosophy and principles of data analysis 1949-1964 (Vols. III & IV). London: Chapman & Hall.\n\n"                                                                                                                                                                                                                                                                                                                                                                                                               

qitems <- search_quotes("Yates")
cat(as.tagged(qitems[1:5,]))
#> qid:57
#>  quo:... to be a good theoretical statistician one must also compute, and must therefore have the best computing aids.
#>  src:Frank Yates
#>  cit:Sampling Methods for Censuses and Surveys 1949
#>  tag:computing
#>  
#>  qid:310
#>  quo:The six degrees of freedom for error provided by the 4x4 Latin square have long been recognized as inadequate, at least by Fisher.  Something of the order of 12 error degrees of freedom would appear desirable...unless the effects under investigation are large in comparison with their experimental errors.
#>  src:Frank Yates
#>  cit:Complex Experiments, Supplement to the Journal of the Royal Statistical Society, 1935, Vol 2, No. 1.
#>  tag:data,data analysis
#>  
#>  qid:552
#>  quo:the emphasis given to formal tests of significance ... has resulted in ... an undue concentration of effort by mathematical statisticians on investigations of tests of significance applicable to problems which are of little or no practical importance ... and ... it has caused scientific research workers to pay undue attention to the results of the tests of significance ... and too little to the estimates of the magnitude of the effects they are investigating.
#>  src:Frank Yates
#>  cit:The influence of Statistical Methods for Research Workers on the development of the science of statistics. 1951. Journal of the American Statistical Association 46: 19-34.
#>  url:The influence of Statistical Methods for Research Workers on the development of the science of statistics. 1951. Journal of the American Statistical Association 46: 19-34.
#>  tag:nhst
#>  
#>  qid:553
#>  quo:...the unfortunate consequence that scientific workers have often regarded the execution of a test of significance on an experiment as the ultimate objective.
#>  src:Frank Yates
#>  cit:The influence of Statistical Methods for Research Workers on the development of the science of statistics. 1951. Journal of the American Statistical Association 46: 19-34.
#>  url:The influence of Statistical Methods for Research Workers on the development of the science of statistics. 1951. Journal of the American Statistical Association 46: 19-34.
#>  tag:nhst
#>  
#>  qid:554
#>  quo:[Researchers] pay undue attention to the results of tests of significance they perform on their data, particularly data derived from experiments, and too little to the estimates of the magnitude of the effects which they are investigating.... The emphasis on tests of significance, and the consideration of the results of each experiment in isolation, have had the unfortunate consequence that scientific workers have often regarded the execution of a test of significance on an experiment as the ultimate objective. Results are significant or not and that is the end to it.
#>  src:Frank Yates
#>  cit:The influence of Statistical Methods for Research Workers on the development of the science of statistics. 1951. Journal of the American Statistical Association 46: 19-34.
#>  url:The influence of Statistical Methods for Research Workers on the development of the science of statistics. 1951. Journal of the American Statistical Association 46: 19-34.
#>  tag:nhst
#>