Code Monkey home page Code Monkey logo

prob-stats's Introduction

Probability and Statistics: a simulation-based introduction

A reproducible, open-access book (BSD-3 code, CC-BY ND 4.0 text).

Building the Book

  • Prerequisite: pandoc and pandoc-citeproc must be installed on the operating system and available on the PATH.

Building the HTML

From either the shell script or R commands, HTML output will be generated in directory _book, with top-level page

prob-stats/_book/index.html

Building HTML from unix

From the shell, first change to the directory for the repo, then run the build shell script.

$ cd prob-stats
$ ./build.sh

Building HTML from R

Load the bookdown library, set the working directory to the directory for the repo, then render the book.

$ library(bookdown)
$ setwd('prob-stats')
$ bookdown::render_book('index.Rmd')

Rendering with just index.Rmd as an argument defers the style to the index.Rmd yaml header.

Building the PDF

Pre-requisite: Building the pdf requires pdflatex to be installed on the operating system and available on the PATH.

From either the shell script or R commands, PDF output will be generated in

prob-stats/_main.pdf

Building PDF from unix

From the shell, first change to the directory for the repo, then run the build shell script.

$ cd prob-stats
$ ./build-pdf.sh

Building PDF from R

Load the bookdown library, set the working directory to the directory for the repo, then render the book.

$ library(bookdown)
$ setwd('prob-stats')
$ bookdown::render_book('index.Rmd', 'tufte_book2')

In this case, we specified the tufte_book2 format in the call to render, which will override the default specification in index.Rmd. The PDF file will be in file _book/_main.pdf.

Note on RStudio

If you try to build using the knit button in RStudio from the index.Rmd file, you will get the default HTML output because that is what is specified in the YAML header at the top of index.Rmd.

prob-stats's People

Contributors

mitzimorris avatar jsta avatar

Watchers

 avatar

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.