An Intro to R Markdown

  Рет қаралды 72,706

Luke Smith

Luke Smith

Күн бұрын

Пікірлер: 118
@fms6306
@fms6306 6 жыл бұрын
Thanks very much Luke. You really inspired me to move from Word to LaTeX and not looking back. Now R markdown and eventually I'll be ditching Windows/Office for Linux/Open Source. Keep doing the great work you're doing. I really enjoy your videos.
@yash1152
@yash1152 Жыл бұрын
"Open Source" really?? zking open source?????
@freezejr2000
@freezejr2000 4 жыл бұрын
>linguistics degree >knows Latin >can't say “asterisks” >doesn't know what is called big kek
@KyleSwirl
@KyleSwirl 6 жыл бұрын
If you are using the latest LARBS, the compilation shortcut is c. In default LARBS, the leader is a single space (" "). To open the output file, the shortcut is p.
@0felex01
@0felex01 7 жыл бұрын
You will also need to install the package "tk" to install R packages.
@alphonsemarcus3650
@alphonsemarcus3650 4 жыл бұрын
thank you a lot this solved my problem
@dmtrrasljic9495
@dmtrrasljic9495 3 жыл бұрын
Thank you
@SY-me5rk
@SY-me5rk 6 жыл бұрын
I needed these 2 lines in vimrc. First line is for treating rmd/Rmd as markdown. autocmd BufNewFile,BufFilePre,BufRead *.rmd,*.Rmd set filetype=markdown autocmd Filetype markdown map :!Rscript -e "rmarkdown::render('%', 'pdf_document')"
@QmVuamFtaW4
@QmVuamFtaW4 2 жыл бұрын
zamn
@TheFakeVIP
@TheFakeVIP 5 жыл бұрын
Pandoc and RMarkdown are truely amazing tools.
@sk8sbest
@sk8sbest 5 жыл бұрын
Append "&&pkill-HUPmupdf" in your .vimrc command to have your pdf refresh automatically.
@finster101
@finster101 4 жыл бұрын
I realize this video is a couple years old now but I just found your channel and subscribed, cause I am enjoying your Vim usage videos and just generally love Vim. So I would like to start using R markdown now, but the link in your video description for your .vimrc gives me a 404 error. I searched around your github stuff but was unable to find it. Please help. Thanks!
@FKLinguista
@FKLinguista 7 жыл бұрын
Good video! I've been trying to learn more R for the statistic stuff that I have to run for my research. This is very helpful. However... > runs parabola to support free software > installs RStudio
@Riboflavaflav
@Riboflavaflav 7 жыл бұрын
FKLinguista RStudio is FOSS and uses AGPL v3 for its license according to their support page. What is the problem with using it from a free software standpoint?
@FKLinguista
@FKLinguista 7 жыл бұрын
RiboFlava Flav I realized that, haha. I was just making a light-hearted joke along the lines of "GPLv3 is not as free as GPLv2". RKward, for example, is GPLv2 but it's not as widely-used.
@Riboflavaflav
@Riboflavaflav 7 жыл бұрын
FKLinguista Ok, I thought it was something like that. Sorry for making you have to explain your joke, haha.
@FKLinguista
@FKLinguista 7 жыл бұрын
RiboFlava Flav In your defense, it was a crap joke. ;)
@ali-om4uv
@ali-om4uv 7 жыл бұрын
is there a way to install r markdown on windows without rstudio and run it from gvim? I'd like to use it on my work mashing wich runs.....ducks.......win7
@fermiLiquidDrinker
@fermiLiquidDrinker 7 жыл бұрын
There's one thing I've never understood is how to do-- theme i3. That would be a cool video
@channelnumber52
@channelnumber52 6 жыл бұрын
I also hate that R folder in my home directory. So I download the source for R, change a line in the config file, and then I custom compile it.
@iosifzota6314
@iosifzota6314 Жыл бұрын
Hello. For anyone who's looking for command line command to compile to pdf: Rscript -e "rmarkdown::render('', 'pdf_document')" (just paste in terminal, enter and it should work)
@husseinal-odwan4317
@husseinal-odwan4317 5 жыл бұрын
Thank you so much for the informative video. I have a data analysis and clustering assignment due and I have been dreading using LaTeX because of how arcane and outdated the commands and repositories are. Cheers!
@lucapham-trong6636
@lucapham-trong6636 4 жыл бұрын
I will create a G(roff) markdown probably. The main problem of (r)markdown is not the fact that it converts to multiple formats, but that it uses latex which is extremely bloated. Also, the debug isn't clear. We could implement a very simple debug script that tells which line in the markdown is wrong.
@safalpiya2903
@safalpiya2903 3 жыл бұрын
Absolutely do it!
@yash1152
@yash1152 2 жыл бұрын
hi, Luca, any updates or any news?
@peterjansen4826
@peterjansen4826 6 жыл бұрын
A linguist who could have studied computer science. :) Not like you have to be a master programmer to do these things but as somebody who did study something much closer to computer science I regocnize the 'type' of thinking and Luke Smith has got that more tham most of the people who actually study it. Then again, his field of linguistics (and a certain field of philosophy which involves logic) gets a lot closer to these kind of sciences with regard to anlytical thinking than that most people are aware of.
@Moonlight-pk2st
@Moonlight-pk2st 3 жыл бұрын
Sees Python code snippet. Me, a Haskell programmer: *internal screams for not using map*
@godsendify
@godsendify 5 жыл бұрын
Ey Luke, you should now about ctrl+x and ctrl+f to autocomplete paths in vim. Type /home in Insert Mode and while still in Insert Mode Hit the shortcuts.
@bepolymathe5123
@bepolymathe5123 6 жыл бұрын
Could you explain more in detail how you use rmarkdown in vim (LaTeX intégration, quotations of books, etc) ? Very usefull for students !
@humding3r
@humding3r 7 жыл бұрын
you like carpenter brut too? MY DUDE
@gorye8730
@gorye8730 5 жыл бұрын
Humding3r where is it apparrent? Timestamp pls
@c.h.7067
@c.h.7067 4 жыл бұрын
sleek beard dude
@0felex01
@0felex01 7 жыл бұрын
And you need "filetype plugin on" in your vimrc to use autocmd, for anyone else who struggled with it.
@rexevan6714
@rexevan6714 7 жыл бұрын
wait until you start putting external image and knit it to pdf documents.
@X1Zeth2X
@X1Zeth2X 7 жыл бұрын
Been waiting
@gz6616
@gz6616 7 жыл бұрын
But do the journals you submit to accept this format? And the images just follow standard markdown?
@TheAnimateor
@TheAnimateor 7 жыл бұрын
What we need!!!
@zanaris-falador
@zanaris-falador 7 жыл бұрын
About time this happened ;)
@skyhook6540
@skyhook6540 7 жыл бұрын
Notification Squad! Assemble!
@adam82s
@adam82s 7 жыл бұрын
:D just don't hit the "Like" button/link before watching the video. ;)
@apostleofazathoth7696
@apostleofazathoth7696 7 жыл бұрын
lol nerd
@adam82s
@adam82s 7 жыл бұрын
mov eax, [metr1xx-4]
@しげお-i1l
@しげお-i1l 6 жыл бұрын
Sadly, I'm getting errors when my RMD has non-ASCII characters, e.g. Introdução
@alexandrodisla6285
@alexandrodisla6285 6 жыл бұрын
you didnt put the f5 to actually do the compiling.
@M1America
@M1America 4 жыл бұрын
Was that a juicy fart at 8:58?!
@cprn.
@cprn. 2 жыл бұрын
`sudo pacman -S R` returns `error: target not found: R` nowadays. You need a lower case letter `r`.
@Sun-po4zv
@Sun-po4zv 7 жыл бұрын
Could you do a quick tutorial on how to setup/use Alpine?
@andrewgrimsley6471
@andrewgrimsley6471 6 жыл бұрын
Is there a way to add code without "##" being prefixed to the output? Or changing ## to >>?
@gorye8730
@gorye8730 5 жыл бұрын
Andrew Grimsley RTFM
@TheInfinityReaper
@TheInfinityReaper 6 жыл бұрын
Awesome video, can you do more on R Markdown?
@absolutraj
@absolutraj 4 жыл бұрын
When you have a video titled "Intro to R Markdown," you should probably start with an overview of what R Markdown is.
@noelmatias4260
@noelmatias4260 4 жыл бұрын
I think you shouldn't, I hate when somebody explain what a tool is, what it does, how it works and how to use it in the same video, I usually skip to the part I really need to see. Separate videos are much better in my totally irrelevant opinion.
@funkahontas
@funkahontas 4 жыл бұрын
@@noelmatias4260 that's so stupid and inefficient
@blackrastafarian
@blackrastafarian 5 жыл бұрын
Considering you use LaTeX and R, have you tried Rnoweb (.Rnw) format?
@jordekang2844
@jordekang2844 7 жыл бұрын
>he doesn't use org mode You did ask for it mate
@VegarAB
@VegarAB 7 жыл бұрын
This is so perfect. Any good plugins og packages for live-preview like you have for LaTeX in vim?
@LukeSmithxyz
@LukeSmithxyz 7 жыл бұрын
I don't know of any yet actually. I'm sure they're out there somewhere though.
@loarto
@loarto 6 жыл бұрын
Maybe when you save the document you can convert it to latex and get the live-preview?
@Inkrementalgeber
@Inkrementalgeber 7 жыл бұрын
Thank you very much!
@keiichiiownsu12
@keiichiiownsu12 5 жыл бұрын
can pandoc convert markdowns to .docx formats? My professors tend to prefer those, even though this appears easier.
@moustiqueneige4
@moustiqueneige4 5 жыл бұрын
don't know if pandoc can do that (i do not use it) but converter from html to docx exist online so highly probable
@kelvinpina3392
@kelvinpina3392 Жыл бұрын
so is for generating plot, graphs and the like?
@hfgoodluck8162
@hfgoodluck8162 7 жыл бұрын
Don't know anything about security but isn't it unwise to give R root privileges when downloading and installing packages over the internet?
@jaredturner3063
@jaredturner3063 6 жыл бұрын
I copied your vimrc file but F5 doesn't compile. Do I need to install anything else?
@christianjuresh9436
@christianjuresh9436 7 жыл бұрын
When I type 'v rmarkdown.rmd' into urxvt it tells me v: command not found. Substituting 'v' for 'vim rmarkdown.rmd' gives me a .rmd.swp file extension and the compiling doesn't work. Anyone know a solution? This is what I get when I try to compile; > require(rmarkdown); render('rmarkdown.rmd') Loading required package: rmarkdown Error in tools::file_path_as_absolute(input) : file 'rmarkdown.rmd' does not exist Calls: render -> setwd -> dirname -> In addition: Warning message: In normalizePath(path, winslash = winslash, mustWork = mustWork) : path[1]="rmarkdown.rmd": No such file or directory Execution halted shell returned 1
@joaopedrodeamorimpaula8965
@joaopedrodeamorimpaula8965 7 жыл бұрын
Those gaps are way too big, and you know what they say about big gaps...
@desktorp
@desktorp 7 жыл бұрын
can't spell gape without gap
@L0VEalive
@L0VEalive 7 жыл бұрын
"They don't lie"?
@thingyee1118
@thingyee1118 7 жыл бұрын
I use markdown for all notes and documentation thesedays
@iLeev1
@iLeev1 7 жыл бұрын
When will you do your video series about degoogling?
@SweaterGuyUK
@SweaterGuyUK 7 жыл бұрын
I think he wrote it as an essay on his site: lukesmith.xyz/stop_using_google.html
@Hecket
@Hecket 7 жыл бұрын
.xyz Google (Alphabets) gTLD. hahahaha
@NocturnidadInterna
@NocturnidadInterna 7 жыл бұрын
How can I modify your F5 line to do this>> pandoc --pdf-engine=xelatex -V CJKmainfont="Source Han Serif CN"
@MarkJay
@MarkJay 3 жыл бұрын
did you mean "Preamble"? also, you can use atom to write markdown files. It is just an editor, unlike R which is big. atom is open source project from github, but since Microsoft owns github, it could be spyware....
@adam82s
@adam82s 7 жыл бұрын
Nice prompt
@kirkeasterson3019
@kirkeasterson3019 7 жыл бұрын
Have you ever used emacs instead of vim?
@dierks67
@dierks67 6 жыл бұрын
Kirk Easterson lukesmith.xyz/faq.html
@quindarius
@quindarius 3 жыл бұрын
does Ctags work with citations?
@elliotalderson6609
@elliotalderson6609 4 жыл бұрын
Ребята, помогите! Я не понял че за R (да и вроде он не нужен). С помощью чего он через vim компилировал в pdf?
@101graffhead
@101graffhead 5 жыл бұрын
do you need latex for making pdfs? with rmarkdown?
@hernancervera6621
@hernancervera6621 5 жыл бұрын
You need to have installed any LaTeX distribution, like MikTeX. The reason behind this is that a LaTeX engine is used behind the hood, such as pdfLaTeX. ¿What uses the LaTeX engine behind the hood?: Pandoc; this tool (which can also be downloaded as standalone) allows for converting between file types whilst preserving content and structure, for example: Markdown -> PDF. You can read a bit more here: rmarkdown.rstudio.com/lesson-2.html. I personally use RStudio, I hope I helped you in some way :)
@101graffhead
@101graffhead 5 жыл бұрын
@@hernancervera6621 kills the point for me to install rmarkdown since you can do a lot of that stuff with pandoc already, just not kniting documents and plotting and all the fancy stuff, but if one just want to make pretty pdfs that look like academic paper than all you need is latex and pandoc, you can easily convert markdown to similar docs which I am looking for. but I have to install latex anyway than rmarkdown is pretty pointless for me
@apostleofazathoth7696
@apostleofazathoth7696 7 жыл бұрын
Thanks for the video. I put your bash line in my .vimrc file but when I run it I end up with /bin/bash: cho: command not found being printed into my .rmd file. Help a newfag out? I promise I didn't forget the "e" in !echo.
@n.g.5234
@n.g.5234 7 жыл бұрын
Try :!echo
@yash1152
@yash1152 2 жыл бұрын
how is R Markdown different from Markdown??
@radomane
@radomane 2 жыл бұрын
Kind sir, R Markdown allows for inline Latex in your markdown file, giving you the simplicity of Markdown and the extensibility of Latex. It is also great if you use Python or R and want to include graphs, visualizations etc.
@yash1152
@yash1152 2 жыл бұрын
> _"R md allows for inline Latex in your md file"_ > _"... & want to include graphs, visualizations etc."_ @@radomane ohwww, that's super awesome. Thanks a lot for answering 😄,
@siffo10
@siffo10 5 жыл бұрын
What are you using to write your script in?
@slumberstudio4757
@slumberstudio4757 5 жыл бұрын
vim
@LundMr1
@LundMr1 7 жыл бұрын
Nice! This is amazing! However, the vim autocommand fails :/ > require(rmarkdown); render('lol.rmd') Loading required package: rmarkdown Error: package or namespace load failed for ‘rmarkdown’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/home/chansen/R/x86_64-pc-linux-gnu-library/3.4/stringi/libs/stringi.so': libicui18n.so.59: cannot open shared object file: No such file or directory Error in render("lol.rmd") : could not find function "render" Execution halted
@LukeSmithxyz
@LukeSmithxyz 7 жыл бұрын
Did you already run install.packages("rmarkdown") in R? What's your distro? It's possible it didn't pull a dependency mine did.
@LundMr1
@LundMr1 7 жыл бұрын
Arch, and yes I did install the package in R as sudo. I dug around a bit on google but couldn't find anything. I'll do some more digging :)
@LundMr1
@LundMr1 7 жыл бұрын
Nevermind - apparently I had messed something up on my laptop. My other machine worked as expected :)
@SweaterGuyUK
@SweaterGuyUK 7 жыл бұрын
I found this tutorial by/on github about getting started with markdown: www.markdowntutorial.com/
@DavidGillooly
@DavidGillooly 6 жыл бұрын
Are you using one of your Lenovo/IBM laptops in this video or a desktop system?
@epix4300
@epix4300 3 жыл бұрын
sold
@CTimmerman
@CTimmerman 7 жыл бұрын
` is a backtick.
@justanothernigga8940
@justanothernigga8940 7 жыл бұрын
how old are you
@shubhampawar7921
@shubhampawar7921 3 жыл бұрын
Why not use org instead of this
@rens5759
@rens5759 7 жыл бұрын
“what is org mode?”
@lispmachine9687
@lispmachine9687 7 жыл бұрын
This is an inferior clone, for an inferior editor! :D
@ivanbogush
@ivanbogush 5 жыл бұрын
Wow. pandoc-siteproc is >400 MB
@georgiosf.1223
@georgiosf.1223 7 жыл бұрын
If you are serious about writing, use asciidoc with jbake. Don’t waste your time with markdown.
@__donez__
@__donez__ 7 жыл бұрын
*asterisks
@garrettmooney8667
@garrettmooney8667 6 жыл бұрын
Checkout vim + nvimr + rtichoke
@lispmachine9687
@lispmachine9687 7 жыл бұрын
M-x org-mode
@SurrogateActivities
@SurrogateActivities 7 жыл бұрын
hm maybe i can start writing some stuff for fun
@jeandelinux259
@jeandelinux259 6 жыл бұрын
Wow
@mskiptr
@mskiptr 4 жыл бұрын
/lɑːtɛx/
@maxuix2
@maxuix2 7 жыл бұрын
too fat for latex?
@134552Adnan
@134552Adnan 3 жыл бұрын
you also need to specify a CRAN mirror for R to use: According to Stackoverflow, create ~/.Rprofile and add the following: ## Default repo local({r
@thingyee1118
@thingyee1118 7 жыл бұрын
Hi Luke ref Markdown websites check out: jekyllrb.com/ It supports generating the HTML from Markdown content. Also R Markdown has the export option but thats not as good as just being able to compile on runtime.
@desktorp
@desktorp 7 жыл бұрын
ASS TER RISK(s)
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
The REAL Red-Pill on Free Will!
10:43
Luke Smith
Рет қаралды 73 М.
"I WISH I HAD MORE INTERNET FRIENDS." - Literally Nobody
7:48
Luke Smith
Рет қаралды 64 М.
Protect Your Data from Glowfriends! (Recovering & Deleting Data)
17:31
Ever Noticed How "Weird" Modern TV and Film are?
12:32
Luke Smith
Рет қаралды 142 М.
I WILL NOT GO TO RESTAURANTS IN 2023.
8:21
Luke Smith
Рет қаралды 57 М.
Yep. Imagination is Demonic. (Unironically)
8:42
Luke Smith
Рет қаралды 88 М.
AI Will Make (Has Made) the Internet Mediocre...
12:14
Luke Smith
Рет қаралды 64 М.
I Will Be Throwing Away My Computers.
11:56
Luke Smith
Рет қаралды 102 М.
How Kids' Cartoons "Accidentally" Brainwashed Generations...
8:08
BEST VPNs for PRIVACY in 2023!!!
7:33
Luke Smith
Рет қаралды 56 М.
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН