This is inconsistent with what the American Statistical Association has outlined for good statistical practice.īut, if you insist on poor statistical decisions (he says snarkily) you can also use indexing to add the stars. I would not personally add the significance stars to the correlations in the table. To alleviate the off-diagonal hyphens in the correlation part of the table we need to set the “-” value to blank text. $^b$Tuition is measured in thousands of dollars.", General = "$^a$0 = private schools and 1 = public schools.
I also employ similar kableExtra function from those introduced in Part 1 and and Part 2 to make the table the full page width, include the footnote, center the header names, and increase the width of the first column. (Since the first column is text we set this to NA.) The digits= argument is included to round the values in each column. I will then pipe this into the kable() function to set the column names, column alignment, and table caption. I will inlcude these in the footnote to define these variables. Note the use of $^a$ and $^b$ to produce superscripts of “a” and “b” respectively. The next thing I will do is to change the text in the rowname column to correspond to similar rownames in Table 7.10. Tab_03 # rowname n M SD grad public sat tuition
Then I will combine these two into a single data frame to use with kable(). I will compute these and store them in a second data frame.
We will also need the correlations between each set of variables. I will compute these and store them in a data frame. We need to compute the sample size, mean, and standard deviation for each of the four variables. The data in were collected from and contain 2011 institutional data for n=33 Minnesota colleges and universities. # 4 Bethel University, Saint Paul, MN 73.3 0 1145 39.4 In the RMarkdown body, I will load a few packages and also import a data set that I will use to create the summary values akin to those in Table 7.10.
These are just a small example of the many applications that superscripts have.īecause this feature of the plotting function is so intuitive to seasoned programmers it is easy to learn and understand how to use it.I will again render to PDF and set up the YAML to import the caption package (LaTeX) and set up the APA caption formatting.
There are other label based applications, such as numerical labeling of plots that otherwise have the same name. The trademark symbol is a special character used to indicate that the title is trademarked. One especially Important application is the inclusion of the registered trademark symbol. There are many applications to using a superscript in the plotting function. All these examples show how flexible the superscript feature of the plotting function is. In this case, we use the carat character to produce a mathematical formula with a superscript. Furthermore, additional text is added to the title after it. In this example, we use the carat character to produce a character string superscript. > plot(x, main = expression(“Example”^”CC”* “title”)) In this example, we use the carat character to produce a single character superscript. > plot(x, main = expression(“Example”^”B”))