Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9089505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:09:55+00:00 2026-06-16T22:09:55+00:00

Reproducible example (if you have rstudio): File | New | R Markdown Knit to

  • 0

Reproducible example (if you have rstudio):

  • File | New | R Markdown
  • Knit to html, saving as test :

knitr

Navigate to working directory

  • In a terminal (with pandoc installed) type

    pandoc -s test.md -t latex -o test.tex

(results pasted here)

  • Convert to pdf with pdflatex (see result here)

Or skip the tex stage by going directly to .pdf:

pandoc -s test.md -t latex -o test2.pdf

The results are good, but seem like a lot of steps given that knitr incorporates sweave. It should be able to convert from .Rmd to .tex or .pdf directly. Right?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T22:09:56+00:00Added an answer on June 16, 2026 at 10:09 pm

    This is documented in http://www.rstudio.com/ide/docs/authoring/markdown_custom_rendering; you should add an .Rprofile to your directory, for example:

    options(rstudio.markdownToHTML = 
      function(inputFile, outputFile) {      
        system(paste("pandoc", shQuote(inputFile), "-o", shQuote(outputFile)))
      }
    )  
    

    Some modifications might be necessary. Too bad the same does not work with spin because of a bug in RStudio.

    http://support.rstudio.org/help/discussions/problems/4128-spin-and-rprofile

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Reproducible example below. I have a simulation loop, within which I occasionally have rows
This problem is not readily reproducible in a simple example here but was wondering
I am working in R with the package smacof . I have a on
I have a completely blank .aspx file residing on an IIS6 web server. The
To provide a reproducible example of an approach, a data set must often be
This is a reproducible example: a <- 0.05 za.2 <- qnorm(1-a/2) b <- 0.20
please consider this reproducible example: from PIL import Image import numpy as np import
I started making a reproducible example to ask another question and can't even get
I've tried to write reproducable example below. It is a mix of .Rmd and
Given the stress toward reproducible science, I was wondering if my recent work warrants

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.