Package 'pafdR'

Title: Book Companion for Processing and Analyzing Financial Data with R
Description: Provides access to material from the book "Processing and Analyzing Financial Data with R" by Marcelo Perlin (2017) available at <https://sites.google.com/view/pafdr/home>.
Authors: Marcelo Perlin [aut, cre]
Maintainer: Marcelo Perlin <[email protected]>
License: GPL-2
Version: 1.0
Built: 2025-02-21 02:59:58 UTC
Source: https://github.com/cran/pafdR

Help Index


Generates random vector for numerical answer (internal)

Description

Generates random vector for numerical answer (internal)

Usage

gen.rnd.vec()

Value

A vector with random weights, including value 1 for first element

Examples

library(pafdR)
my.sol <- 1 #assume solution to exercise is 1

 my.answers <- gen.rnd.vec()*my.sol
 my.answers

Builds exercises using package exams

Description

This function build a pdf file and a solution sheet from R exercises available at github.

Usage

pafdR_build.exercise(lan = "en", exercise.folder = "pafdR-exercises",
  pdf.folder = "pdf out")

Arguments

lan

Language of exercises ('en' or 'pt-br')

exercise.folder

Folder with exercise files (if not found, will download from github)

pdf.folder

Folder to output pdf file and solutions

Value

TRUE, if sucessful

Examples

## Not run: 
pafdR_build.exercise()

## End(Not run)

Function to check if system has pdflatex.exe available

Description

Function to check if system has pdflatex.exe available

Usage

pafdR_check.pdflatex()

Value

TRUE if the pdflatex is available, FALSE if not

Examples

pafdR_check.pdflatex()

Downloads code and data from the book

Description

Downloads a zip file from the github repository and unzip it to a folder within the working directory

Usage

pafdR_download.code.and.data(lan = "en")

Arguments

lan

Language of book/files ('en' or 'pt-br')

Value

TRUE, if successful

Examples

## Not run: 
pafdR_download.code.and.data()

## End(Not run)

Downloads Book exercises from github

Description

This function downloads exercise files from github and unzips it to a chosen directory

Usage

pafdR_download.exercises(exercise.folder = "pafdR-exercises")

Arguments

exercise.folder

folder to copy exercise files

Value

TRUE, if sucessful

Examples

## Not run: 
exercise.folder <- pafdR_download.exercises()

## End(Not run)