table-render | 基于 FormRender 的中后台表格解决方案
kandi X-RAY | table-render Summary
kandi X-RAY | table-render Summary
基于 FormRender 的中后台表格解决方案
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of table-render
table-render Key Features
table-render Examples and Code Snippets
Community Discussions
Trending Discussions on table-render
QUESTION
my first SO question!
I am trying to order the result of a call to tabyl
from the janitor package. I can't work out how to sort the numbers appended in adorn_ns()
.
Using tabyl, I managed to create a table with frequencies, proportions and totals with the below code. What I would like to achieve is to sort the table in descending frequency of the "Total" column. Ultimately, I would like to pass the table on to knitr's kable() for reporting.
After I've called arrange
on the tabyl, adorn_ns() pastes the N's in the incorrect "original" position, instead of the sorted position. This has been noted in Github, and (as I understand it) is caused by the 'core'
not changing when the tabyl is sorted.
See: https://github.com/sfirke/janitor/issues/352
The comment on Github states: "This is not a critical problem, you can feed custom Ns to the adorn_ns() call where you do the sort there too." Unfortunately I can't figure out how to place these custom Ns.
Alternatively, I thought about changing the order by using factor, however I'm hoping for a more robust solution as this variable contains many categories in my real data, and I would like to be able to apply this (or an alternative) method of table-rendering to different variables in the future, without having to laboriously type out the levels by frequency.
SO, any help on custom Ns, alternative sorting methods or (if turns out to be necessary) alternative table methods is very much appreciated.
Here is some toy data and where I got stuck.
...ANSWER
Answered 2021-Aug-12 at 15:21Update to OP's request: see comments:
This is not as elegant but it brings you to your desired output:
QUESTION
I have used tidyr::nest
to run a series of logistic regression models with different dependent variables. I want to output the results as a single html table in RMarkdown with each model as a column and the rows as exponentiated coefficients with 99% CIs. I cannot figure out the workflow between nest
, tidy
, and a table-rendering package like stargazer
to get this to work. If I unnest
my tidy
output and pass it to stargazer
, or if I just try to pass the nest
ed output (the variable in the nested data frame called "model" below) to stargazer
directly, I get no output. I would prefer to use the tidy
output anyway because of the exponentiated coefficients and 99% CIs. I essentially need this vignette to go one step farther and explain how to use the output of nest
and tidy
to create formatted regression tables. I also looked at this SO post, but I find it hard to believe that there isn't an easier way to do this that I am just missing.
Sample data, along with my general approach to running the models:
...ANSWER
Answered 2021-Feb-13 at 10:18Hope I get it correct, essentially you pass the lm objects and the confidence interval separately into stargazer
, using this answer from your linked question.
You can read the stargazer help page for how to input for example custom ci would require:
ci.custom: a list of two-column numeric matrices that will replace the default confidence intervals for each model. The first and second columns represent the lower and the upper bounds, respectively. Matched by element names.
So in your case, it's a little bit more work, we store the results first.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install table-render
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page