Skip to content

Commit

Permalink
changes in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
AlissonRP committed May 2, 2022
1 parent 5581c76 commit b29965b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R/freq-table.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @param var Variable that you want the table (not written in string format)
#' @param sort_by Variable you want to sort the `tibble`
#' @param desc if you want decreasing order put `FALSE`
#' @note By default the `sort_by` is in alphabetical order of `{{var}}`
#' @note By default the `sort_by` is in alphabetical order of `{{ var }}`
#' @examples
#' iris %>%
#' mypdf1::pdf1_tbl_freq(Species) %>%
Expand Down
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,33 @@ test coverage](https://codecov.io/gh/AlissonRP/mypdf1/branch/main/graph/badge.sv


## Overview
Whenever I created a file in Rmarkdown (mainly for [Sigma JR](https://www.instagram.com/_sigmajr/)), there was a pattern of necessary packages and functions that I almost always used
Whenever I created a file in Rmarkdown, there was a pattern of necessary packages and functions that I almost always used.
So this package provides a template for pdf reports in Rmarkdown and quite usual functions, note that it is a package more *aggregator* than creator.

## Instalation
```r
devtools::install_github("https://github.com/AlissonRP/mypdf1")
```
### Recommendation
To generate a pdf in Rmarkdown is recommended to use [`tinytex`](https://cran.r-project.org/web/packages/tinytex/index.html). If you don't have, use:

```r
tinytex::install_tinytex()
```

## Use of default template
```r
rmarkdown::draft("namefile.Rmd", template = "pdf1", package = "mypdf1")
```
## Use of paper template

```r
rmarkdown::draft("namefile.Rmd", template = "pdf1 - paper", package = "mypdf1", create_dir = FALSE)
rmarkdown::draft("namefile.Rmd", template = "pdf1-paper", package = "mypdf1", create_dir = FALSE)
```

## Some functions already available
* `pdf1_tbl`: This function is used to generate tables
* `pdf1_freq_tbl`: This function assists in creating frequency tables (`tibble`)
* `pdf1_freq_tbl2`: 2x2 table, values can be absolute or marginal rows using argument `marg=TRUE`
* `pdf1_freq_tbl2`: 2x2 table, values can be absolute or marginal rows using argument `marg = TRUE`
* `pdf1_na`: Inform the amount of `NA` per variable
* `pdf1_summary`: Summarize the `data.frame` outputting a `tibble`
2 changes: 1 addition & 1 deletion man/pdf1_tbl_freq.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b29965b

Please sign in to comment.