Login or Register
Log in with
Forums
FAQ
Search in titles only
Search in General only
Advanced Search
Search
Home
Forums
Forums for Discussing Stata
General
You are not logged in. You can browse but not post. Login or
Register
by clicking 'Login or Register' at the top-right of this page. For more information on Statalist, see the
FAQ
.
Announcement
Collapse
No announcement yet.
X
Collapse
Posts
Latest Activity
Search
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Filtered by:
Clear All
new posts
Yves Amevoin
Join Date:
Jul 2017
Posts:
2
#1
Convert memory data to markdown table
19 Aug 2021, 13:29
Please, is there a way to convert data (Not result from commands) in stata memory to a markdown table, preferably pandoc table?
Yves Amevoin
Join Date:
Jul 2017
Posts:
2
#2
05 Nov 2021, 10:27
I finally came up with a kable command for stata available on this gist:
https://gist.github.com/f0226f009b9d...d218dab1630da0
There is no documentation though.
The kable program is applied to in memory dataset, and you can export the result either to a md/txt file or just print it on the console.
An interesting work arround is to use the kable program within a dyntex file and convert the dyntex using pandoc to any desired format.
The tables are hard coded in pandoc grid tables
Here are simple examples (after executing/loading the kable program)
sysuse auto, clear
kable
or
sysuse auto, clear
kable, usevarnames
or
sysuse auto, clear
kable, usevarlabels out("temp.md")
I know the code needs probably to be improved, but a least it gives something to start with.
Hope this helps.
Comment
Post
Cancel
Previous
Next
Working...
Yes
No
OK
OK
Cancel
X
Comment