始める無料で始める

YAML ヘッダーを編集する

YAML ヘッダーにはレポートのメタデータが含まれ、タイトル、作成者、出力形式などの情報を持ちます。この演習では、レポートの作成者と作成日時に関する詳細を追加して、レポートを更新します。

この演習はコースの一部です

R Markdown でレポート作成

コースを見る

演習の手順

  • タイトルの下に author フィールドを追加し、あなたの名前を入れてください。
  • その下に date フィールドを追加し、Sys.Date() 関数を使って日付を指定してください。

実践的なインタラクティブ演習

このサンプルコードを完成させて、この演習に挑戦してみましょう。

{"investment_report.Rmd":"---\ntitle: \"Investment Report\"\noutput: html_document\n---\n\n```{r data, include = FALSE}\nlibrary(readr)\n\ninvestment_annual_summary <- read_csv(\"https://assets.datacamp.com/production/repositories/5756/datasets/d0251f26117bbcf0ea96ac276555b9003f4f7372/investment_annual_summary.csv\")\ninvestment_services_projects <- read_csv(\"https://assets.datacamp.com/production/repositories/5756/datasets/78b002735b6f620df7f2767e63b76aaca317bf8d/investment_services_projects.csv\")\n```\n\n\n## Datasets \n\n### Investment Annual Summary\n\nThe `investment_annual_summary` dataset provides a summary of the dollars in millions provided to each region for each fiscal year, from 2012 to 2018.\n```{r}\ninvestment_annual_summary\n```\n\n### Investment Services Projects\n\nThe `investment_services_projects` dataset provides information about each investment project from the 2012 to 2018 fiscal years. Information listed includes the project name, company name, sector, project status, and investment amounts.\n```{r}\ninvestment_services_projects \n```\n\n\n"}
コードを編集して実行