home.social

#knitr — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #knitr, aggregated by home.social.

  1. #AcademicChatter Hello, fellow academic chatters. I'm an experimental scientist. And I regularly have the problem of how to organize acquired data by different participants to a same experiment. I'd like to have some feedback of how other people do this. Not necessarily specific computer programmes (such as digital labbooks), but rather how-tos based on robust, basic things, such as text and csv files, folder structures etc. I'm often battling with the workflow which is including handwritten measurements, their digital counterparts, metadata for the measurements, codes for samples, all of these done by different people, but all will have to end in one final dataset, where I would like to be able to trace data back to the paper files, and their metadata. And all of this with not too much additional effort by everybody ;-) Have done this usually with some shared server space, but usually it ends up as something a bit difficult to get through. I'm now rather thinking about a system involving perhaps something based on #MarkDown or even #RMarkdown or #knitr etc. Any feedback much welcome 😁
    #ReproducibleResearch

  2. Performing some quick statistical analyses in classic #RStats and neatly “knitting” them into a PDF using #RMarkdown, #knitr, and #MacTeX #texLaTeX.

    Call me old-fashioned, but I really enjoy this workflow. :awesome:

    #OpenSource #FOSS #statistics

  3. Performing some quick statistical analyses in classic #RStats and neatly “knitting” them into a PDF using #RMarkdown, #knitr, and #MacTeX #texLaTeX.

    Call me old-fashioned, but I really enjoy this workflow. :awesome:

    #OpenSource #FOSS #statistics

  4. Performing some quick statistical analyses in classic #RStats and neatly “knitting” them into a PDF using #RMarkdown, #knitr, and #MacTeX #texLaTeX.

    Call me old-fashioned, but I really enjoy this workflow. :awesome:

    #OpenSource #FOSS #statistics

  5. Performing some quick statistical analyses in classic #RStats and neatly “knitting” them into a PDF using #RMarkdown, #knitr, and #MacTeX #texLaTeX.

    Call me old-fashioned, but I really enjoy this workflow. :awesome:

    #OpenSource #FOSS #statistics

  6. Performing some quick statistical analyses in classic #RStats and neatly “knitting” them into a PDF using #RMarkdown, #knitr, and #MacTeX #texLaTeX.

    Call me old-fashioned, but I really enjoy this workflow. :awesome:

    #OpenSource #FOSS #statistics

  7. Dear experts, do you see the culprit in this problem and how it can be avoided/fixed?

    I get an unclosed sink() after I

    - set a time limit
    - run with timeout in chunk
    - open a new plot afterwards

    Details on SO, tagging @yihui

    stackoverflow.com/questions/79

  8. Any way in to do arbitrary (i.e., regex) string replacement in the output - e.g., there's a known account id you don't want showing up in the output

  9. I posted a new introduction to surface #gifti and volume #NIfTI #fMRI data at mvpa.blogspot.com/2025/01/intr.

    The material is mostly general, with all examples using #baseR #rstats code; it's accompanied by a major update to my gifti #knitr tutorial.

    I hope these will be useful to folks getting started with #neuroimaging datasets, as well as anyone looking for example scripts for reading, plotting, and manipulating (human fMRI) brain data files.

  10. I posted a new introduction to surface #gifti and volume #NIfTI #fMRI data at mvpa.blogspot.com/2025/01/intr.

    The material is mostly general, with all examples using #baseR #rstats code; it's accompanied by a major update to my gifti #knitr tutorial.

    I hope these will be useful to folks getting started with #neuroimaging datasets, as well as anyone looking for example scripts for reading, plotting, and manipulating (human fMRI) brain data files.

  11. I posted a new introduction to surface #gifti and volume #NIfTI #fMRI data at mvpa.blogspot.com/2025/01/intr.

    The material is mostly general, with all examples using #baseR #rstats code; it's accompanied by a major update to my gifti #knitr tutorial.

    I hope these will be useful to folks getting started with #neuroimaging datasets, as well as anyone looking for example scripts for reading, plotting, and manipulating (human fMRI) brain data files.

  12. I posted a new introduction to surface #gifti and volume #NIfTI #fMRI data at mvpa.blogspot.com/2025/01/intr.

    The material is mostly general, with all examples using #baseR #rstats code; it's accompanied by a major update to my gifti #knitr tutorial.

    I hope these will be useful to folks getting started with #neuroimaging datasets, as well as anyone looking for example scripts for reading, plotting, and manipulating (human fMRI) brain data files.

  13. I posted a new introduction to surface #gifti and volume #NIfTI #fMRI data at mvpa.blogspot.com/2025/01/intr.

    The material is mostly general, with all examples using #baseR #rstats code; it's accompanied by a major update to my gifti #knitr tutorial.

    I hope these will be useful to folks getting started with #neuroimaging datasets, as well as anyone looking for example scripts for reading, plotting, and manipulating (human fMRI) brain data files.

  14. Why call it #knitr and #R #Markdown when they could have called it R-TeX? 🦖

  15. CW: R bashing / rant

    Holy cow is inferior to . 😠

    - WHY does it need to rerun EVERYTHING for hours when making a HTML/PDF?
    - WHY is the apparent solution (caching) so weird? No clear instructions, only blog posts with broken formatting everywhere.
    - WHY don't you at least see where it hangs during the process? No indication which line is currently executed?
    - WHY does making a PDF silently fail after hours?

    [/rant]

  16. @lwpembleton it was gradual for me. Grad school used it for stats classes and my advisor suggested to rewrite a standalone population genetics program in R. He then suggested to make it into a package and sent me to one of Hadley Wickham’s trainings (pre-RStudio). I then found out about #knitr and stated making websites in R and was hooked.

  17. Hello #R or #Postgresql specialists. I have a few hundred views in a database schema, that I need to transform in a pdf (with ajusted size of the table since the number of rows and columns is highly variable). #knitR seems to be the relevant tool but I do not really know how to use it efficiently, I'm taking any advice !

  18. 🙏 I'm trying to get rid of an ugly hack that I used because of my #rmarkdown / #knitr / #quarto tech debt. Can you help ? github.com/tadascience/link/is

  19. Absolutely devastating news. I would not have accomplished what I have accomplished in the last decade without Yihui's work on #knitr. If you've ever encountered a website, report, or book built with #RStats in recent memory, you have Yihui to thank.

    yihui.org/en/2024/01/bye-rstud

    Until he gets a new position, he's looking for sponsorship: github.com/sponsors/yihui

  20. Using #RMarkdown and #knitr after a long break. When did everything become so buggy? Several commands from the official R Markdown cheat sheet and R Markdown reference produce errors. 😒

  21. Phew, had a really productive but exhausting #Rstats day today. It's a report that works with #quarto and #knitr and I created something like a "create_graph()" function, because the graphs a very similar and it saves a lot of copy paste.

    I really want to make one thing clear: Without #Rstudio and #ggplot and #dplyr and all things #R I could not do my job. Neither Excel, nor Stata, nor SPSS could help in that specific way. I wouldn't get anything of the non-data tasks done...

  22. This is how I usually set up the beginning of my #knitr / #quarto scripts to download data from #osf that I then use for analysis in the rest of the script.

    This way I only need to share the script, and anybody who wants to #reproduce the results will always get the right datafile.

    Let me know if there is a better way to do this!

    #R #reproducibility
    #ReproducibiliTea #OpenScienceFramework #OpenScience

  23. This is how I usually set up the beginning of my #knitr / #quarto scripts to download data from #osf that I then use for analysis in the rest of the script.

    This way I only need to share the script, and anybody who wants to #reproduce the results will always get the right datafile.

    Let me know if there is a better way to do this!

    #R #reproducibility
    #ReproducibiliTea #OpenScienceFramework #OpenScience

  24. This is how I usually set up the beginning of my #knitr / #quarto scripts to download data from #osf that I then use for analysis in the rest of the script.

    This way I only need to share the script, and anybody who wants to #reproduce the results will always get the right datafile.

    Let me know if there is a better way to do this!

    #R #reproducibility
    #ReproducibiliTea #OpenScienceFramework #OpenScience

  25. This is how I usually set up the beginning of my #knitr / #quarto scripts to download data from #osf that I then use for analysis in the rest of the script.

    This way I only need to share the script, and anybody who wants to #reproduce the results will always get the right datafile.

    Let me know if there is a better way to do this!

    #R #reproducibility
    #ReproducibiliTea #OpenScienceFramework #OpenScience

  26. This is how I usually set up the beginning of my #knitr / #quarto scripts to download data from #osf that I then use for analysis in the rest of the script.

    This way I only need to share the script, and anybody who wants to #reproduce the results will always get the right datafile.

    Let me know if there is a better way to do this!

    #R #reproducibility
    #ReproducibiliTea #OpenScienceFramework #OpenScience

  27. I have a #Quarto question: Is there any main advantage over using plain #pandoc if you don't use #knitr style code execution? Like for regular academic writing without dynamic computation?

  28. I think I've had a breakthrough on the "portable vignette" problem. The core of it is that knitr has an output.dir option which knitr makes everything relative to (e.g. image paths). The confusing part is that neither rmarkdown::render(output_dir=) nor rmarkdown::render(knit_root_dir=) actually sets this option (?!)

    However, if you can find a way to set it, either using parameters or other options, it seems to work?

    Full example here: github.com/multimeric/KnitrPor

    #RStats #knitr #RMarkdown

  29. Major thanks to @tannguyen for spotting and reporting a bug in my niftiPlottingFunctions.R plot.volume() function!

    The code at osf.io/k8u2c is updated; see mvpa.blogspot.com/2023/03/bugf for info and examples.

    (This #baseR #rstats function is for plotting #fMRI #nifti images in #knitr documents.)

    ... it is painful to find out there was a bug, but so much better to fix it than to continue its propagation! I am grateful to @tannguyen and hope anyone else seeing something odd lets me know.

  30. Major thanks to @tannguyen for spotting and reporting a bug in my niftiPlottingFunctions.R plot.volume() function!

    The code at osf.io/k8u2c is updated; see mvpa.blogspot.com/2023/03/bugf for info and examples.

    (This #baseR #rstats function is for plotting #fMRI #nifti images in #knitr documents.)

    ... it is painful to find out there was a bug, but so much better to fix it than to continue its propagation! I am grateful to @tannguyen and hope anyone else seeing something odd lets me know.

  31. Major thanks to @tannguyen for spotting and reporting a bug in my niftiPlottingFunctions.R plot.volume() function!

    The code at osf.io/k8u2c is updated; see mvpa.blogspot.com/2023/03/bugf for info and examples.

    (This #baseR #rstats function is for plotting #fMRI #nifti images in #knitr documents.)

    ... it is painful to find out there was a bug, but so much better to fix it than to continue its propagation! I am grateful to @tannguyen and hope anyone else seeing something odd lets me know.

  32. Major thanks to @tannguyen for spotting and reporting a bug in my niftiPlottingFunctions.R plot.volume() function!

    The code at osf.io/k8u2c is updated; see mvpa.blogspot.com/2023/03/bugf for info and examples.

    (This #baseR #rstats function is for plotting #fMRI #nifti images in #knitr documents.)

    ... it is painful to find out there was a bug, but so much better to fix it than to continue its propagation! I am grateful to @tannguyen and hope anyone else seeing something odd lets me know.

  33. Can anyone help me setting figure options in :python: when calling it via in :rstats: using ?

    I'm probably overlooking something obvious because I don't know enough about

    Details:

    stackoverflow.com/questions/75

  34. Can anyone help me setting figure options in :python: when calling it via #knitr in :rstats: using #reticulate? #rstats

    I'm probably overlooking something obvious because I don't know enough about #python

    Details:

    stackoverflow.com/questions/75

  35. Can anyone help me setting figure options in :python: when calling it via #knitr in :rstats: using #reticulate? #rstats

    I'm probably overlooking something obvious because I don't know enough about #python

    Details:

    stackoverflow.com/questions/75

  36. Can anyone help me setting figure options in :python: when calling it via #knitr in :rstats: using #reticulate? #rstats

    I'm probably overlooking something obvious because I don't know enough about #python

    Details:

    stackoverflow.com/questions/75

  37. Can anyone help me setting figure options in :python: when calling it via #knitr in :rstats: using #reticulate? #rstats

    I'm probably overlooking something obvious because I don't know enough about #python

    Details:

    stackoverflow.com/questions/75

  38. A methods paper of mine is now at doi.org/10.3389/fnimg.2023.107 . This little #NewNeuroPaper demonstrates human task #fMRI quality control, as part of the FMRI Open QC Project (which I hope to discuss at #OHBM and elsewhere as it wraps up).

    Its supplemental (doi.org/10.17605/OSF.IO/HT543) may be of interest to #rstats folks, particularly if looking for examples of #baseR #knitr #graphics and/or scripts aiming to minimize dependencies and maximize long-term usability.

  39. How can I get #ggplot plots that expand when clicked on web pages generated from #quarto documents? #knitr #rstudio

  40. @ERDonnachie @tgtads @datamaps

    I can't resist a #tidyverse vs. #baseR #rstats thread. 😅

    It is totally possible to work without tidyverse, and base R graphics can be incredibly flexible. If you'd like some examples, just this morning I uploaded yet another set of all-base #knitr supplemental files (osf.io/ht543), with very pretty (and highly useful) graphics, if I say so myself. (Tidyverse can be ok, but it's not at all required.)

  41. #papaja, #rstats and #knitr people: Can you change line spacing and font when knitting to PDF? Been collaborating on a paper, and we've knitted to PDF by default. Ended up just below 40 pages - perfect! But a submission deadline is nearing, and we needed a word version. Turns out it is at 45 pages! Done side-by side comp. Seems the PDF is not Times New Roman. Also, line spacing is different. We get around 27 lines on a PDF page, but 24 in the Word version. Ideas? @FrederikAust

  42. Some news about for : Next version will have a revisited, clean progress bar!

    Going to a single-line progress bar when knitting a document, which will only show the progress and the chunk label by default.

    Learn more at yihui.org/en/2023/01/knitr-pro and give it a spin already with dev version!

  43. Some news about for : Next version will have a revisited progress bar!
    Learn more at yihui.org/en/2023/01/knitr-pro and give it a spin already with dev version!

  44. Phew, it was a lot of tinkering, but my #flowchart|s for my #thesis came out really nice. Made with the #rstats library #DiagrammeR and #graphviz and rendered with #knitr, #bookdown and #latex via #rstudio .

    The #mermaid integration is just broken for latex-based pdfs, which is sad because mermaid is just really nice with its easy syntax. graphviz has at least more power and is embeddable as a vector pdf file.

  45. @SchnepfUwe Maybe adjust the resolution in the #knitr code chunk, or print via rasterImage()?

    My #rstats #gifti plotting tutorial (osf.io/jftuz) has examples of changing resolution (see chunk "code4").

    Here's a snippet of the other strategy:
    <<code1, fig.height=4.8, fig.width=7.5, fig.align='center'>>=

    plot(0:1, 0:1, type="n", ann=FALSE, axes=FALSE);

    rasterImage(readPNG(fname, native=TRUE), 0,0,1,1);
    @

  46. #introduction

    I'm a staff scientist at Washington U in St Louis (#WashU #wustl #Missouri, USA), mostly working with human task fMRI datasets. I'm a big fan of #baseR and #knitr #rstats, #QC, and very extensive #supplementary materials. I insist on looking at data early and often; some #tutorials and examples on my blog. (#GotBrains?)

    I'm a #FirstGen college grad, #IowaStateU; BS in #forestry. I also occasionally share cats, #knitting, and #crochet. Promoting abortion rights, not book bans.

  47. #introduction

    I'm a staff scientist at Washington U in St Louis (#WashU #wustl #Missouri, USA), mostly working with human task fMRI datasets. I'm a big fan of #baseR and #knitr #rstats, #QC, and very extensive #supplementary materials. I insist on looking at data early and often; some #tutorials and examples on my blog. (#GotBrains?)

    I'm a #FirstGen college grad, #IowaStateU; BS in #forestry. I also occasionally share cats, #knitting, and #crochet. Promoting abortion rights, not book bans.

  48. #introduction

    I'm a staff scientist at Washington U in St Louis (#WashU #wustl #Missouri, USA), mostly working with human task fMRI datasets. I'm a big fan of #baseR and #knitr #rstats, #QC, and very extensive #supplementary materials. I insist on looking at data early and often; some #tutorials and examples on my blog. (#GotBrains?)

    I'm a #FirstGen college grad, #IowaStateU; BS in #forestry. I also occasionally share cats, #knitting, and #crochet. Promoting abortion rights, not book bans.

  49. #introduction

    I'm a staff scientist at Washington U in St Louis (#WashU #wustl #Missouri, USA), mostly working with human task fMRI datasets. I'm a big fan of #baseR and #knitr #rstats, #QC, and very extensive #supplementary materials. I insist on looking at data early and often; some #tutorials and examples on my blog. (#GotBrains?)

    I'm a #FirstGen college grad, #IowaStateU; BS in #forestry. I also occasionally share cats, #knitting, and #crochet. Promoting abortion rights, not book bans.