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 |
Generates random vector for numerical answer (internal)
gen.rnd.vec()
gen.rnd.vec()
A vector with random weights, including value 1 for first element
library(pafdR) my.sol <- 1 #assume solution to exercise is 1 my.answers <- gen.rnd.vec()*my.sol my.answers
library(pafdR) my.sol <- 1 #assume solution to exercise is 1 my.answers <- gen.rnd.vec()*my.sol my.answers
This function build a pdf file and a solution sheet from R exercises available at github.
pafdR_build.exercise(lan = "en", exercise.folder = "pafdR-exercises", pdf.folder = "pdf out")
pafdR_build.exercise(lan = "en", exercise.folder = "pafdR-exercises", pdf.folder = "pdf out")
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 |
TRUE, if sucessful
## Not run: pafdR_build.exercise() ## End(Not run)
## Not run: pafdR_build.exercise() ## End(Not run)
Function to check if system has pdflatex.exe available
pafdR_check.pdflatex()
pafdR_check.pdflatex()
TRUE if the pdflatex is available, FALSE if not
pafdR_check.pdflatex()
pafdR_check.pdflatex()
Downloads a zip file from the github repository and unzip it to a folder within the working directory
pafdR_download.code.and.data(lan = "en")
pafdR_download.code.and.data(lan = "en")
lan |
Language of book/files ('en' or 'pt-br') |
TRUE, if successful
## Not run: pafdR_download.code.and.data() ## End(Not run)
## Not run: pafdR_download.code.and.data() ## End(Not run)
This function downloads exercise files from github and unzips it to a chosen directory
pafdR_download.exercises(exercise.folder = "pafdR-exercises")
pafdR_download.exercises(exercise.folder = "pafdR-exercises")
exercise.folder |
folder to copy exercise files |
TRUE, if sucessful
## Not run: exercise.folder <- pafdR_download.exercises() ## End(Not run)
## Not run: exercise.folder <- pafdR_download.exercises() ## End(Not run)