Library

Video Player is loading.
 
Current Time 0:00
Duration 8:19
Loaded: 0%
 

x1.00


Back

Games & Quizzes

Training Mode - Typing
Fill the gaps to the Lyric - Best method
Training Mode - Picking
Pick the correct word to fill in the gap
Fill In The Blank
Find the missing words in a sentence Requires 5 vocabulary annotations
Vocabulary Match
Match the words to the definitions Requires 10 vocabulary annotations

You may need to watch a part of the video to unlock quizzes

Don't forget to Sign In to save your points

Challenge Accomplished

PERFECT HITS +NaN
HITS +NaN
LONGEST STREAK +NaN
TOTAL +
- //

We couldn't find definitions for the word you were looking for.
Or maybe the current language is not supported

  • 00:05

    Hi, I’m Sharon Machlis, Director of Editorial Data & Analytics at IDG Communications.
    Hi, I’m Sharon Machlis, Director of Editorial Data & Analytics at IDG Communications.

  • 00:10

    I’m here with Episode 10 of Do More With R: R Markdown in less than 6 minutes.
    I’m here with Episode 10 of Do More With R: R Markdown in less than 6 minutes.

  • 00:16

    Let’s say you’ve done an analysis, but now you want share it.
    Let’s say you’ve done an analysis, but now you want share it.

  • 00:20

    Which means you probably want to add some sort of explanation and context.
    Which means you probably want to add some sort of explanation and context.

  • 00:24

    If you’ve never used R Markdown before, you’re in for a treat.
    If you’ve never used R Markdown before, you’re in for a treat.

  • 00:29

    R Markdown lets you combine text, graphics, and embedded R code into a single document.
    R Markdown lets you combine text, graphics, and embedded R code into a single document.

  • 00:34

    That R code can just be displayed, but not actually run.
    That R code can just be displayed, but not actually run.

  • 00:38

    The code can also be run, to create a chart or graph or statistical model.
    The code can also be run, to create a chart or graph or statistical model.

  • 00:43

    If you run the code, you also get to decide whether you want your viewers to just see
    If you run the code, you also get to decide whether you want your viewers to just see

  • 00:47

    the results of your code, or your code, too.
    the results of your code, or your code, too.

  • 00:51

    You can turn an R Markdown document into an HTML file, a slideshow, a PDF – even, yes,
    You can turn an R Markdown document into an HTML file, a slideshow, a PDF – even, yes,

  • 00:58

    a Microsoft Word doc.
    a Microsoft Word doc.

  • 00:59

    Let’s take a look.
    Let’s take a look.

  • 01:02

    In RStudio, if you go to File > New Document, you’ll see an option for R Markdown.
    In RStudio, if you go to File > New Document, you’ll see an option for R Markdown.

  • 01:10

    Choose that And see what happens.
    Choose that And see what happens.

  • 01:19

    You’re asked if you want a Document, a Presentation, a Shiny application, or a document from a
    You’re asked if you want a Document, a Presentation, a Shiny application, or a document from a

  • 01:24

    template – either built-in, or your own.
    template – either built-in, or your own.

  • 01:27

    Document offers defaults of HTML, PDF, or Word.
    Document offers defaults of HTML, PDF, or Word.

  • 01:32

    “Presentation” means “Slideshow”.
    “Presentation” means “Slideshow”.

  • 01:35

    Brand new as of August: RStudio’s preview release supports PowerPoint!
    Brand new as of August: RStudio’s preview release supports PowerPoint!

  • 01:39

    I’ll get to that in a bit.
    I’ll get to that in a bit.

  • 01:41

    Let’s stick to HTML Document for now.
    Let’s stick to HTML Document for now.

  • 01:44

    I’ll name this “Test” Here’s the default that shows up.
    I’ll name this “Test” Here’s the default that shows up.

  • 01:52

    That first part is the header, between the sets of 3 dashes.
    That first part is the header, between the sets of 3 dashes.

  • 01:56

    This is in a format called YAML, Y.A.M.L.
    This is in a format called YAML, Y.A.M.L.

  • 02:00

    In addition to the title, author, and date, it sets the output as an html document.
    In addition to the title, author, and date, it sets the output as an html document.

  • 02:06

    Next, see the area in gray between the sets of 3 backticks?
    Next, see the area in gray between the sets of 3 backticks?

  • 02:10

    That’s an R code chunk.
    That’s an R code chunk.

  • 02:13

    The first line between the braces says that the language is R – you can run other languages
    The first line between the braces says that the language is R – you can run other languages

  • 02:17

    in an R Markdown document, like Python or SQL.
    in an R Markdown document, like Python or SQL.

  • 02:22

    Next is the name of the chunk – a name isn’t required, but you can have one.
    Next is the name of the chunk – a name isn’t required, but you can have one.

  • 02:28

    After that comes any chunk options.
    After that comes any chunk options.

  • 02:31

    Include = FALSE means run code in the chunk, but doesn’t include it in the final document.
    Include = FALSE means run code in the chunk, but doesn’t include it in the final document.

  • 02:38

    That makes sense for this chunk, since it’s just setting up options for the rest of the
    That makes sense for this chunk, since it’s just setting up options for the rest of the

  • 02:42

    file.
    file.

  • 02:43

    So we don’t need it in our final output.
    So we don’t need it in our final output.

  • 02:45

    That next line is setting an R Markdown option for the whole document.
    That next line is setting an R Markdown option for the whole document.

  • 02:50

    echo =TRUE means display all the code as well as code output in the final document.
    echo =TRUE means display all the code as well as code output in the final document.

  • 02:57

    Outside of chunks, you can just type normally.
    Outside of chunks, you can just type normally.

  • 02:59

    1, 2, or 3 pound signs at the start of a line sets headline size: 2 pound signs are equivalent
    1, 2, or 3 pound signs at the start of a line sets headline size: 2 pound signs are equivalent

  • 03:07

    to an HTML h2 headline size, if you’re familiar with that.
    to an HTML h2 headline size, if you’re familiar with that.

  • 03:11

    2 asterisks on each side of a word makes it bold.
    2 asterisks on each side of a word makes it bold.

  • 03:16

    You can see 2 other R chunks here.
    You can see 2 other R chunks here.

  • 03:20

    One just runs the summary function on the cars data set.
    One just runs the summary function on the cars data set.

  • 03:23

    The other generates a plot.
    The other generates a plot.

  • 03:26

    See that echo = FALSE option in the pressure chunk?
    See that echo = FALSE option in the pressure chunk?

  • 03:29

    It says: Don’t display the code, just the result.
    It says: Don’t display the code, just the result.

  • 03:34

    If you actually read the text in this default R Markdown document that RStudio generated,
    If you actually read the text in this default R Markdown document that RStudio generated,

  • 03:38

    it explains a few more things about the file.
    it explains a few more things about the file.

  • 03:43

    To get an HTML document from this, click that Knit button here.
    To get an HTML document from this, click that Knit button here.

  • 03:48

    You’ll first need to save the file as a dot RMD.
    You’ll first need to save the file as a dot RMD.

  • 04:05

    You can see the HTML file, let me open it in a browser window
    You can see the HTML file, let me open it in a browser window

  • 04:12

    We can see that the R code is included in that first chunk result, but not in the second,
    We can see that the R code is included in that first chunk result, but not in the second,

  • 04:18

    because we said echo = FALSE in that second one.
    because we said echo = FALSE in that second one.

  • 04:22

    There’s a lot more you can do with R Markdown.
    There’s a lot more you can do with R Markdown.

  • 04:29

    For example, these little green arrows let you run one individual chunk and see the results.
    For example, these little green arrows let you run one individual chunk and see the results.

  • 04:42

    Check out rmarkdown dot rstudio dot com for a lot more about R Markdown.
    Check out rmarkdown dot rstudio dot com for a lot more about R Markdown.

  • 04:47

    Before I wrap up, I want to show you how to generate a PowerPoint from R Markdown.
    Before I wrap up, I want to show you how to generate a PowerPoint from R Markdown.

  • 04:52

    Reminder: This is new as of August 2018.
    Reminder: This is new as of August 2018.

  • 04:55

    As of early September, you need the PREVIEW RELEASE of RStudio for this to work.
    As of early September, you need the PREVIEW RELEASE of RStudio for this to work.

  • 05:01

    And also the latest version of the rmarkdown package from CRAN.
    And also the latest version of the rmarkdown package from CRAN.

  • 05:05

    Make sure you have that by running install.packages rmarkdown.
    Make sure you have that by running install.packages rmarkdown.

  • 05:09

    Now let’s create a new R Markdown slideshow document!
    Now let’s create a new R Markdown slideshow document!

  • 05:15

    I’ll go to File > New File > R Markdown, and then choose Presentation and PowerPoint!
    I’ll go to File > New File > R Markdown, and then choose Presentation and PowerPoint!

  • 05:37

    I saved the default and knitted it.
    I saved the default and knitted it.

  • 06:01

    Seriously, how cool is that?
    Seriously, how cool is that?

  • 06:04

    So let’s look at the default document to see what happened.
    So let’s look at the default document to see what happened.

  • 06:12

    What makes a new slide?
    What makes a new slide?

  • 06:14

    Whatever the first headline line is – remember, that’s any line starting with 1 or more
    Whatever the first headline line is – remember, that’s any line starting with 1 or more

  • 06:17

    pound signs – followed by regular text.
    pound signs – followed by regular text.

  • 06:21

    That becomes the signal to generate a new slide.
    That becomes the signal to generate a new slide.

  • 06:24

    Same for adding new slides.
    Same for adding new slides.

  • 06:26

    You can add images to an R Markdown document by starting a line with an exclamation point,
    You can add images to an R Markdown document by starting a line with an exclamation point,

  • 06:32

    followed by brackets for the caption and parentheses for the file name.
    followed by brackets for the caption and parentheses for the file name.

  • 06:35

    Like I did here with the San Diego photo.
    Like I did here with the San Diego photo.

  • 06:58

    You can use knitr’s kable function to make a table, too.
    You can use knitr’s kable function to make a table, too.

  • 07:14

    There is a ton of customization you can do with RMarkdown,
    There is a ton of customization you can do with RMarkdown,

  • 07:27

    like adding your own CSS to HTML documents, and using your own templates for PowerPoint.
    like adding your own CSS to HTML documents, and using your own templates for PowerPoint.

  • 07:33

    If you’re interested in doing more with this, do check out RStudio’s RMarkdown resources.
    If you’re interested in doing more with this, do check out RStudio’s RMarkdown resources.

  • 07:44

    That’s it for this episode, thanks for watching!
    That’s it for this episode, thanks for watching!

  • 07:50

    For more R tips, head to the More With R video page at go.infoworld.com/morewithR.
    For more R tips, head to the More With R video page at go.infoworld.com/morewithR.

  • 07:54

    That’s https go dot infoworld dot com slash more with R, all lowercase except for the
    That’s https go dot infoworld dot com slash more with R, all lowercase except for the

  • 08:02

    R. Or, you can add the “Do More With R” playlist to your YouTube library.
    R. Or, you can add the “Do More With R” playlist to your YouTube library.

  • 08:12

    So long, and hope to see you next episode!
    So long, and hope to see you next episode!

All

R tip: R Markdown tutorial

1,466 views

Video Language:

  • English

Caption Language:

  • English (en)

Accent:

  • English (US)

Speech Time:

97%
  • 8:09 / 8:19

Speech Rate:

  • 117 wpm - Conversational

Category:

  • Science & Technology

Intro:

Hi, I’m Sharon Machlis, Director of Editorial Data & Analytics at IDG Communications.
I’m here with Episode 10 of Do More With R: R Markdown in less than 6 minutes.
Let’s say you’ve done an analysis, but now you want share it.
Which means you probably want to add some sort of explanation and context.
If you’ve never used R Markdown before, you’re in for a treat.
R Markdown lets you combine text, graphics, and embedded R code into a single document.
That R code can just be displayed, but not actually run.
The code can also be run, to create a chart or graph or statistical model.
If you run the code, you also get to decide whether you want your viewers to just see
the results of your code, or your code, too.. You can turn an R Markdown document into an HTML file, a slideshow, a PDF – even, yes,
a Microsoft Word doc.. Let’s take a look.. In RStudio, if you go to File > New Document, you’ll see an option for R Markdown.
Choose that And see what happens.. You’re asked if you want a Document, a Presentation, a Shiny application, or a document from a
template – either built-in, or your own.. Document offers defaults of HTML, PDF, or Word.. “Presentation” means “Slideshow”.. Brand new as of August: RStudio’s preview release supports PowerPoint!

Video Vocabulary

/ˈprēˌvyo͞o/

noun verb

Showing of a movie before public release. display something before generally available.

/rəˈzəlt/

noun other verb

consequence, effect, or outcome of something. Some things produced through tests or experiments. To be the outcome of other causes and effects.

/stəˈtistək(ə)l/

adjective

Concerning the math of data.

/ˌekspləˈnāSH(ə)n/

noun

Details or reasons given to make something clear.

/bəˈtwēn/

adverb preposition

in space separating things. In the space that separates two objects.

/ˈak(t)SH(o͞o)əlē/

adverb

Used to add new (often different) information.

/imˈbedəd/

adjective verb

(of object) fixed firmly and deeply in surrounding mass. To place or set inside rock, etc..

/ˈ(h)weT͟Hər/

conjunction

expressing doubt or choice between alternatives.

noun verb

group acting together commercially. To mix several things together to form one thing.

/ˈvyo͞oər/

noun other

person who looks at or inspects something. People who watch, e.g. television.

/rəˈlēs/

noun verb

Act of freeing someone from a duty or burden. To let go of something you are holding.

/ˈpräbəblē/

adverb

certainly.

/dəˈfôlt/

noun verb

failure to fulfil obligation. fail to fulfil obligation.

/səˈpôrt/

noun other verb

thing that bears weight of something or keeps it upright. Things to hold up or prevent from falling down. To hold up or prevent from falling down.

/ˈtemplət/

noun

Shape that is used as a pattern to make something.