Code Monkey home page Code Monkey logo

ipynb-to-rmd's Introduction

*Disclaimer:

The script is developed from RStudio Team's convert_ipynb code. This simple app is developed for my personal purpose to ease the process of converting multiple ipynb into a tidy pdf.

How to Use

Step 1: Convert .ipynb to .Rmd file

  1. Open the R project

  2. In your R console, run to_Rmd() function from R/converter.R script. You can define your prefered input/output directory but the default location is in /documents/ folder of this repository (input & output).

source('R/converter.R')
to_Rmd()

Step 2. Compile your pdf

  1. Make sure all files (including images attached, related script, etc.) related to the notebook are included in /documents (or, if you change the input/output directory, make sure it's in the same location of your Rmd).
  2. Open parent.Rmd
  3. Adjust YAML options & chunk titles
  4. Knit it to pdf

Note: Please make sure the formatting of your notebook has followed the formatting rules below:

Markdown Formatting

Please follow the formatting below:

  1. Heading
  • #: Indicates the Title of the document. DO NOT use this heading for sectioning.
  • ##, ###, ...: Marks the section heading

  1. Bullets
  • Please add breaks after paragraph and before bullet! Example:

  1. Others:
  • Do NOT use %matplotlib inline
  • Do NOT use space( ) before and after $ when creating latex equation:
# WRONG:
$ f(x) = x^2 $

# CORRECT:
$f(x) = x^2$

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.