A very basic regex-based Markdown parser. Supports the
following elements (and can be extended via Slimdown::add_rule()
):
- Headers
- Links
- Bold
- Emphasis
- Deletions
#assume you have a data set represented by an object called BOD (BOD is actually a dataset internal to R). then run dput with that data object | |
dput(BOD) | |
#the ouput of this function will be the representation of that data set: structure(list(Time = c(1, 2, 3, 4, 5, 7), demand = c(8.3, 10.3, 19, 16, 15.6, 19.8)), .Names = c("Time", "demand"), row.names = c(NA, -6L), class = "data.frame", reference = "A1.4, p. 270") | |
#when you want to request help, just start the reproducible example by throwing the output of dput into a data object: | |
BOD <- structure(list(Time = c(1, 2, 3, 4, 5, 7), demand = c(8.3, 10.3, 19, 16, 15.6, 19.8)), .Names = c("Time", "demand"), row.names = c(NA, -6L), class = "data.frame", reference = "A1.4, p. 270") | |
#from here on then just write the code you wrote and the corresponding error message |
rm(list = ls(all = TRUE)) #CLEAR WORKSPACE | |
library(quantmod) | |
#Scrape data from the website | |
library(XML) | |
rawPMI <- readHTMLTable('http://www.ism.ws/ISMReport/content.cfm?ItemNumber=10752') | |
rawPMI | |
PMI <- data.frame(rawPMI[[1]]) | |
PMI | |
names(PMI)[1] <- 'Year' |
require.install <- function(pkg, github=""){ | |
req <- suppressWarnings( | |
suppressMessages( | |
require(package=paste(pkg), character.only=TRUE) | |
) | |
); | |
#print(github); | |
if(!req){ | |
installOk <- FALSE; | |
if(length(github)<=0){ |
# Tab completion | |
a<Tab> # first car and hit tab | |
# Instropection | |
a = 'Foo says hello' | |
a? # shows info about variable, docstrings if it is function/instance method | |
aa?? # shows source code | |
# Unix Commands | |
!git # normal git command inside Ipython. Most of the Unix commands can be used this way |
ArXiV is a place for publishing scientific technical reports and drafts which is tightly tied to LaTeX. That is why if you generate a PDF from your RMarkdown article it will tell you, hey, this has been generated using LaTeX, I want the LaTeX source. In principle, RStudio does not admit LaTeX as a final format, only .doc, .pdf or HTML. But it is no big deal.
You only need to add this to the metadata in the RMarkdown document
output:
pdf_document:
keep_tex: true
nnoremap <silent> <leader>e :call Fzf_dev()<CR> | |
" ripgrep | |
if executable('rg') | |
let $FZF_DEFAULT_COMMAND = 'rg --files --hidden --follow --glob "!.git/*"' | |
set grepprg=rg\ --vimgrep | |
command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --hidden --follow --glob "!.git/*" --color "always" '.shellescape(<q-args>).'| tr -d "\017"', 1, <bang>0) | |
endif | |
" Files + devicons |