How many females participated in the HELPrct study?.How many cases are in the HELPrct dataset, and what are they (about what or whom were data being collected)? The mosaic package contains a dataset called HELPrct.To answer the questions, you will need to use things you learned in the R Basics tutorial as well as this slide show. If you used a ? (help) command, explain how/why in the text (since its results will not appear in the PDF). Make sure it has an informative title, the names of everyone in your group, and the date.Īdd answers to the following questions in the text part of the file, as well as R code chunks containing all R code that you used to answer them. # can also set options( with the Rmd file you’ve been working with so far. # save the value x = kable(d2, format = "html" ) Kable(x, format.args = list (decimal.mark = ",", big.mark = "'" )) # format numbers using, as decimal point, and ' as thousands separator x = as.ame(matrix(rnorm( 60, 1e+06, 10000 ), 10 )) # Pandoc simple tables kable(d2, format = "simple", caption = "Title of the table" ) # no row names kable(d2, format = "rst", row.names = FALSE ) # add some table attributes kable(d1, format = "html", table.attr = "id=\"mytable\"" ) # change LaTeX default table environment kable(d1, format = "latex", caption = "My table", table.envir = "table*" ) # use the longtable package kable(matrix( 1000, ncol = 5 ), format = "latex", digits = 2, longtable = TRUE ) # use the booktabs package kable(mtcars, format = "latex", booktabs = TRUE ) Kable(d1, format = "html", caption = "Title of the table" ) Kable(d1, format = "latex", caption = "Title of the table" ) # more padding kable(d2, format = "pipe", padding = 2 ) # no inner padding kable(d2, format = "pipe", padding = 0 ) options( = '') toĮxamples about this function, including specific arguments according to the If you want to display them with other characters, you can set the Missing values ( NA) in the table are displayed as NA byĭefault. Other arguments (see Examples and References). That special characters will not trigger syntax errors in LaTeX or HTML. When escape = FALSE, you have to make sure list(big.mark = ',').īoolean whether to escape special characters when producing To disable the label,Ī list of arguments to be passed to format() By default, the label is obtainedįrom knitr::opts_current$get('label'). 'clc' becomesĬ('c', 'l', 'c'), unless the output format is LaTeX. If length(align) = 1L, the string will beĮxpanded to a vector of individual letters, e.g. By default or ifĪlign = NULL, numeric columns are right-aligned, and other columnsĪre left-aligned. By default, row namesĪre included if rownames(x) is neither NULL nor identical toĪ character vector of column names to be used in the table.Ĭolumn alignment: a character vector consisting of 'l' The number of digits for individual columns. This can also be a vector of length ncol(x), to set Maximum number of digits for numeric columns, passed to If format isĪ function, it must return a character string. The format value can alsoīe set in the global option. The value of this argument will be automatically determined if the function Simple tables), rst, jira, and org (Emacs Org-mode). Html, pipe (Pandoc's pipe tables), simple (Pandoc's For kables(), a list with each element being aĪ character string. For kable(), x is an R object, which is typically a
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |