Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.5%) to scientific vocabulary
Keywords
Repository
Convert 'sjPlot' HTML-Tables to R 'data.frame'
Basic Info
- Host: GitHub
- Owner: kapsner
- License: gpl-3.0
- Language: R
- Default Branch: main
- Homepage: https://cran.r-project.org/web/packages/sjtable2df/vignettes/Overview.html
- Size: 90.8 KB
Statistics
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 1
- Releases: 1
Topics
Metadata Files
README.md
sjtable2df
The sjPlot R package is a
great package for visualizing results.
However, the tables created using the functions
sjPlot::tab_model
or
sjPlot::tab_xtab
return HTML tables and are not straightforward to use in R, especially
when trying to integrate them into pdf- or word-documents using
Rmarkdown.
The sjtable2df R package’s goal is to overcome this and to provide an
easy interface for converting sjPlot’s HTML tables to data.frame,
data.table, or kable objects for further usage in R or Rmarkdown.
Currently, sjtable2df provides two functions to convert tables created
from sjPlot’s functions
tab_model
and
tab_xtab:
sjtable2df::mtab2df and sjtable2df::xtab2df.
Install
r
install.packages("sjtable2df")
The development version is available from GitHub:
r
install.packages("remotes")
remotes::install_github("kapsner/sjtable2df")
Example
Further details and examples are given in the package’s vignette.
``` r library(sjtable2df) set.seed(1) dataset <- data.table::data.table( "var1" = sample( x = c("yes", "no"), size = 100, replace = TRUE, prob = c(.3, .7) ), "var2" = sample( x = c("yes", "no"), size = 100, replace = TRUE ) )
xtab <- sjPlot::tab_xtab( var.row = dataset$var1, var.col = dataset$var2, show.summary = TRUE, use.viewer = FALSE )
sjtable2df::xtab2df(xtab = xtab, output = "data.table")
> var1 var2 no var2 yes Total
> 1: no 29 39 68
> 2: yes 18 14 32
> 3: Total 47 53 100
> 4: χ2=1.116 · df=1 · φ=0.127 · p=0.291
sjtable2df::xtab2df(xtab = xtab, output = "kable", format = "latex")
> \begin{tabular}[t]{l|l|l|l}
> \hline
> var1 & var2 no & var2 yes & Total\
> \hline
> no & 29 & 39 & 68\
> \hline
> yes & 18 & 14 & 32\
> \hline
> Total & 47 & 53 & 100\
> \hline
> \multicolumn{4}{l}{\textsuperscript{} $χ2=1.116 · df=1 · φ=0.127 · p=0.291$}\
> \end{tabular}
```
More Information
Owner
- Login: kapsner
- Kind: user
- Location: Erlangen, Germany
- Website: https://orcid.org/0000-0003-1866-860X
- Repositories: 19
- Profile: https://github.com/kapsner
Medical Data Scientist.
GitHub Events
Total
- Push event: 4
- Create event: 1
Last Year
- Push event: 4
- Create event: 1
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| kapsner | l****r@w****e | 55 |
| Jonathan Mang | 5****o | 1 |
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 1
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 3 days
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 1.0
- Average comments per pull request: 2.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- gidonc (1)
Pull Request Authors
- joundso (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 300 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 3
- Total maintainers: 1
cran.r-project.org: sjtable2df
Convert 'sjPlot' HTML-Tables to R 'data.frame'
- Homepage: https://github.com/kapsner/sjtable2df
- Documentation: http://cran.r-project.org/web/packages/sjtable2df/sjtable2df.pdf
- License: GPL (≥ 3)
-
Latest release: 0.0.4
published 11 months ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v2 composite
- actions/setup-java v1 composite
- pat-s/always-upload-cache main composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-tinytex v2 composite
- actions/checkout v2 composite
- actions/setup-java v1 composite
- pat-s/always-upload-cache main composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-tinytex v2 composite
- actions/checkout v2 composite
- actions/setup-java v1 composite
- actions/upload-artifact main composite
- pat-s/always-upload-cache main composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-tinytex v2 composite
- R >= 2.10 depends
- data.table * imports
- kableExtra * imports
- magrittr * imports
- rlang * imports
- rvest * imports
- stats * imports
- xml2 * imports
- knitr * suggests
- lintr * suggests
- lme4 * suggests
- mlbench * suggests
- rmarkdown * suggests
- sjPlot * suggests
- testthat >= 3.0.1 suggests