diff --git a/.gitignore b/.gitignore index 1d288326..ddd2060e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ locale/ +*.mo diff --git a/README.md b/README.md index c2041e45..9528ee9d 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ ## [English README](README_en.md) -小さな貢献をしたい場合は、[クイックスタートガイド](quickstart.md)を読んでみてください。 +小さな貢献をしたい場合は、[クイックスタートガイド](docs/quickstart.md)を読んでみてください。 -資料を翻訳する前に、[翻訳者のガイドライン](TranslatorGuidelines.md)と、[行動規則](rules.md)を、読んでください +資料を翻訳する前に、[翻訳者のガイドライン](docs/TranslatorGuidelines.md)と、[行動規則](docs/rules.md)を、読んでください また、[Slackチャンネル](https://r-wakalang.herokuapp.com/), Tokyo R ワークスペースの #swcarpentry に参加することをおすすめします。ここは、翻訳を進める上で発生する疑問に関して質問するのに最適の場所です。 @@ -23,7 +23,7 @@ ここでは、あなたが、GitとGitHubについて知っているという仮定をしています。 -もし、gitをインストールするのに手助けが必要ならば、[gitのインストールガイド](git.md)を読んでみてください +もし、gitをインストールするのに手助けが必要ならば、[gitのインストールガイド](docs/git.md)を読んでみてください ## About PO files @@ -33,13 +33,13 @@ POファイルは、複数のエントリで構成されるテキスト形式の ## 初めてレッスンをインポートするとき -レッスンはサブモジュールとしてインポートされます。この作業はレッスンにつき1度だけ行われ、ほとんどの翻訳者はこれを行う必要はありません。もし、あなたが新しいレッスンをインポートしたいときには、[インポートのガイド](importing.md)を参照してください。 +レッスンはサブモジュールとしてインポートされます。この作業はレッスンにつき1度だけ行われ、ほとんどの翻訳者はこれを行う必要はありません。もし、あなたが新しいレッスンをインポートしたいときには、[インポートのガイド](docs/importing.md)を参照してください。 ## 既存のレッスンの翻訳へ貢献する **これは、翻訳者からの手助けが最も必要なタスクです!** -これは、[インポートのガイド](importing.md)で説明されているように、`swcarpentry-ja/i18n`がサブモジュールとして既に追加されていることを前提としています。あなたは、そのレッスンの翻訳に貢献したいとします。 +これは、[インポートのガイド](docs/importing.md)で説明されているように、`swcarpentry-ja/i18n`がサブモジュールとして既に追加されていることを前提としています。あなたは、そのレッスンの翻訳に貢献したいとします。 1. 個人のGitHubアカウントで、このレポジトリの"フォーク"を作成します。 (`https://github.com/swcarpentry-ja/i18n`の右上の"フォーク(fork)"をクリックします。 corner of the `https://github.com/swcarpentry-ja/i18n` webpage) @@ -66,7 +66,7 @@ cd po ls git-novice.ja.po ``` -4. POファイルを編集します。[ガイドラインに従って](rules.md), 頻繁に変更をコミットし、十分だとおもったらpull request を投稿してください。 +4. POファイルを編集します。[ガイドラインに従って](docs/rules.md), 頻繁に変更をコミットし、十分だとおもったらpull request を投稿してください。 5. 正確を期すために、あなたのPRについて、レビューが行われます。レビューがパスするまで、編集を続けます。そのようなときは、まずはじめに、組織のレポジトリに対する変更を pull してください。 @@ -80,7 +80,7 @@ PRがレビューをパスするまでステップ4と5を繰り返します いくつかのメモ: -POファイルを編集しても、翻訳されたWebサイトができあがるわけではありません。[メンテナーと管理者ガイド](admin.md)で述べられているように、これはメンテナーに任されています。 +POファイルを編集しても、翻訳されたWebサイトができあがるわけではありません。[メンテナーと管理者ガイド](docs/admin.md)で述べられているように、これはメンテナーに任されています。 POファイルを編集したあと、翻訳された Markdown ファイルを見たいときには、 `bash po4gitbook/compile.sh` を実行します。これは、あなたの変更を含めた翻訳されたバージョンを生成します。これは、`locale//`, 例, `locale/ja/git-novice`で見つけることができます。 @@ -89,20 +89,20 @@ POファイルを編集したあと、翻訳された Markdown ファイルを レッスンの(完全な)翻訳が存在しても、メインの英語のレッスンが新しくリリースされることがあります。 更新されたバージョンの英語のレッスンは、現在の翻訳されたものにマージされる必要があります。 -[レッスン更新時のガイド](updating.md)を見てください。 +[レッスン更新時のガイド](docs/updating.md)を見てください。 ## 翻訳のためのリソース -レッスンを編集するときには[翻訳者のためのガイドライン](TranslatorGuidelines.md)に従ってください。 +レッスンを編集するときには[翻訳者のためのガイドライン](docs/TranslatorGuidelines.md)に従ってください。 レッスン間で用語が一貫して使われていることを確認するために [技術用語のリスト](https://github.com/swcarpentry-ja/i18n/wiki/Glossary-for-technical-terms) があります。必要に応じてこれを参照したり更新したりしてください。 -一貫性を担保するために、日本語に翻訳されない概念などの標準化された取り扱いについては、 [カルチャーノート](CultureNotes.md) を参照してください。 +一貫性を担保するために、日本語に翻訳されない概念などの標準化された取り扱いについては、 [カルチャーノート](docs/CultureNotes.md) を参照してください。 -進捗と、ゴールを記録するために[変更履歴](ChangeLog.md)を持っています。 +進捗と、ゴールを記録するために[変更履歴](docs/ChangeLog.md)を持っています。 ## メンテナーと管理者のガイド -[メンテナーと管理者のガイド](admin.md) を見てください +[メンテナーと管理者のガイド](docs/admin.md) を見てください ご協力いただきありがとうございます。たとえ小さな貢献であっても、大歓迎です。 diff --git a/README_en.md b/README_en.md index fb2445c5..d360d37e 100644 --- a/README_en.md +++ b/README_en.md @@ -2,9 +2,9 @@ ## [日本語](README.md) -Please take a look at the [quickstart guide](quickstart.md) if you wish to make small contribution(s). +Please take a look at the [quickstart guide](docs/quickstart.md) if you wish to make small contribution(s). -Before translating any material, please make sure you comply with the [Guidelines for Translators](TranslatorGuidelines.md) and read the [Rules of Conduct](rules.md). +Before translating any material, please make sure you comply with the [Guidelines for Translators](docs/TranslatorGuidelines.md) and read the [Rules of Conduct](docs/rules.md). We encourage translators to [join our slack channel](https://r-wakalang.herokuapp.com/), #swcarpentry in the Tokyo.R workspace. This is a great place to ask any questions you may have about the workflow. @@ -36,13 +36,13 @@ There are a number of free PO editors: [PoEdit](http://www.poedit.net), ## Importing a lesson for the first time -Lessons are imported as submodules. This only needs to happen once per lesson, so most translators will not need to do this. If you want to import a new lesson, please see the [guide on importing](importing.md). +Lessons are imported as submodules. This only needs to happen once per lesson, so most translators will not need to do this. If you want to import a new lesson, please see the [guide on importing](docs/importing.md). ## Contributing to a translation of an existing lesson **This is the task that we need the most help with from translators!** -This assumes that the lesson has already been added to the `swcarpentry-ja/i18n` as a submodule as described in the [guide on importing](importing.md), and you would like to contribute translations for that lesson. +This assumes that the lesson has already been added to the `swcarpentry-ja/i18n` as a submodule as described in the [guide on importing](docs/importing.md), and you would like to contribute translations for that lesson. 1. Create a "Fork" for this repository on your personal GitHub account. (Click "Fork" in the top right corner of the `https://github.com/swcarpentry-ja/i18n` webpage) @@ -70,7 +70,7 @@ cd po ls git-novice.ja.po ``` -4. Edit the PO files. [As per the guidelines](rules.md), please commit your changes frequently and submit a pull request when you are satisfied with your work. +4. Edit the PO files. [As per the guidelines](docs/rules.md), please commit your changes frequently and submit a pull request when you are satisfied with your work. 5. Your PR will be reviewed for accuracy. You may need to make edits so it can pass review. When doing so, always be sure to pull changes from the organisation repository first: @@ -84,7 +84,7 @@ Repeat steps 4 and 5 until the PR passes review. A few notes: -Editing the PO file will not generate the translated website. That is left to the maintainers, as described in the [guide for maintainers and administrators](admin.md). +Editing the PO file will not generate the translated website. That is left to the maintainers, as described in the [guide for maintainers and administrators](docs/admin.md). If you want to see a translated MD file after editing the PO file, run `bash po4gitbook/compile.sh`. This generates a translated version of the lesson with your changes, which you can find at `locale//`, e.g., `locale/ja/git-novice`. @@ -94,20 +94,20 @@ If there is an existing (complete) translation of the lesson but there has a new release of the main English lessons, the updated version of the English lessons needs to be merged with the current translated one. -Please see the [guide on updating lessons](updating.md). +Please see the [guide on updating lessons](docs/updating.md). ## Resources for translations -Please follow [guidelines for translators](TranslatorGuidelines.md) when editing the lessons. +Please follow [guidelines for translators](docs/TranslatorGuidelines.md) when editing the lessons. There is a [list of technical terms](https://github.com/swcarpentry-ja/i18n/wiki/Glossary-for-technical-terms) to refer to for ensuring that terms are consistently used between lessons. Please update and refer to this as needed. -Please see the [culture notes](CultureNotes.md) for a standardized treatment of concepts that don't translate literally into Japanese to ensure consistency. +Please see the [culture notes](docs/CultureNotes.md) for a standardized treatment of concepts that don't translate literally into Japanese to ensure consistency. -We have a [change log](ChangeLog.md) to track progress and goals. +We have a [change log](docs/ChangeLog.md) to track progress and goals. ## Guide for maintainers and administrators -Please see the [guide for maintainers and administrators](admin.md) +Please see the [guide for maintainers and administrators](docs/admin.md) Thank you for all your help. Even seemingly minor contributions will be appreciated! diff --git a/ChangeLog.md b/docs/ChangeLog.md similarity index 100% rename from ChangeLog.md rename to docs/ChangeLog.md diff --git a/CultureNotes.md b/docs/CultureNotes.md similarity index 100% rename from CultureNotes.md rename to docs/CultureNotes.md diff --git a/TranslatorGuidelines.md b/docs/TranslatorGuidelines.md similarity index 76% rename from TranslatorGuidelines.md rename to docs/TranslatorGuidelines.md index ebc4a6c0..29d31b74 100644 --- a/TranslatorGuidelines.md +++ b/docs/TranslatorGuidelines.md @@ -3,18 +3,18 @@ ## レッスンのタイトル 最初に翻訳を始めた人が決めます。 -そのあとは統一しましょう。 +そのあとに統一しましょう。 ## 本文 「です・ます調」を基本とします。 -直訳よりも、分かりやすいかつ自然な日本語を優先します。 -したがって、言葉を逐一訳す必要もなく、文章のフレーズの順番を守る必要もありません。 +直訳よりも、分かりやすく自然な日本語を優先します。 +従って、言葉を逐一訳す必要もなく、文章のフレーズの順番を守る必要もありません。 -`.po`ファイルを編集している時に、`\n`で改行しているように見えますが、これは本当の改行ではありあません(`.md`ファイルと同じく、一行開けることによって改行が入る)。 +`.po`ファイルを編集している時に、`\n`で改行しているように見えますが、これは本当の改行ではありあません(`.md`ファイルと同じく、一行開けることによって改行が入ります)。 なので、`\n`は無視して下さい(英語と日本語で`\n`の数・場所を合わせる必要はありません)。 -翻訳をする際、`\n`を入れると書きやすく・見やすくなるのであれば、入れても構いません。 +翻訳をする際、改行を入れると書きやすく・見やすくなるのであれば、`\n`を入れても構いません。 ### 専門用語 @@ -33,7 +33,7 @@ DC/SWCのレッスンは専門用語がかなり多く、複数のレッスン ### 句読点 -「、。」を使うようにしましょう(,.ではなく)。 +カンマ(,)やピリオド(.)ではなく「、。」を使うようにしましょう。 ### 数字 @@ -47,7 +47,8 @@ DC/SWCのレッスンは専門用語がかなり多く、複数のレッスン - 12,500 が 1万2千5百 より短くて読みやすい -- 日付は半角 (8月12日 とする。8月12日 とはしない)、そして西暦を使うように。 +- 西暦を使い、日付は半角を使いましょう。 + - 8月12日 とします。一桁だからといって8月12日 と8を全角を使いません ### 漢数字と算用数字 @@ -55,9 +56,9 @@ DC/SWCのレッスンは専門用語がかなり多く、複数のレッスン ### 単位 -- メートル法に変換 +- メートル法に変換します -- ドル以外の場合は必要に応じて日本円に換算する。()に入れても良い +- ドル以外の場合は必要に応じて日本円に換算します。()の中に入れても良いです - 大雑把な数字は大雑把な数字として訳して、数字の精度について誤った印象を与えないようにします。 @@ -75,14 +76,14 @@ DC/SWCのレッスンは専門用語がかなり多く、複数のレッスン このような場合に参照する国語辞典としては広辞苑が定番ですが、あいにく広辞苑はネットで無料で使えるようになっていません。 ネットで引けるものとしては三省堂の大辞林 [http://www.excite.co.jp/dictionary/japanese/](http://www.excite.co.jp/dictionary/japanese/) や小学館の大辞泉 [http://dictionary.goo.ne.jp/jn/](http://dictionary.goo.ne.jp/jn/) があります。 -国語辞典に載っていない語について最も標準的な表記を調べるには、googleで検索したときのヒット件数が参考になります。 +国語辞典に載っていない語について最も標準的な表記を調べるには、Googleで検索したときのヒット件数が参考になります。 ### 題名 -本、雑誌、記事、映画、番組、コンピューターゲームは『』でくくる。 +本、雑誌、記事、映画、番組、コンピューターゲームは『』でくくります。 オフィシャルな訳がない作品のタイトルは訳しません。 -文字数が許せば『英語(日本語訳)』とするのが親切かもしれません。 +文字数が許せば『英語(日本語訳)』とするのが親切になるでしょう。 例:『 Visual Explanations (説明図の技法)』← 未訳の本です。 説明図の技法というのは、内容を伝えるために仮に訳したタイトルです。 @@ -92,16 +93,16 @@ DC/SWCのレッスンは専門用語がかなり多く、複数のレッスン 組織名称などの処理の工夫として定訳がない組織名は「英語(日本語訳)」とか、長いものなら「略語(日本語訳)」。 以下のようなことを考えて、組織名称ごとに判断します。 -組織名、固有名詞などは、英字を維持した方が、検索しさらに勉強したい人の便宜にかなうかもしれません (カタカナ表記してしまうと、検索してもこのレッスンだけがヒットする状況が生まれることがある)。 +組織名、固有名詞などは、英字を維持した方が、検索しさらに勉強したい人にとってよいかもしれません (無理にカタカナ表記にしてしまうと、検索してもこのレッスンだけがヒットする状況が生まれることがあります)。 -組織名が、日本の視聴者にとって意味ある情報かを考えましょう。 +組織名が、日本語を読む人にとって意味ある情報かを考えましょう。 -例えば、略称の読みが、別の単語と同じ音になっている、韻を踏んでいるなど、学生にとって意味がある場合はカッコ書きで音訳を添えるのは親切かもしれません。 +例えば、略称の読みが、別の単語と同じ音になっている、韻を踏んでいるなど、学生にとって意味がある場合はカッコ書きで音訳を添えると親切かもしれません。 メロドラマのタイトルだったら、「オール・マイ・チルドレン」などと音訳するのも、雰囲気を伝える一つの手です。 -『戻ってきた帽子をかぶったネコ(The Cat in the Hat Comes Back)』と両方書いてあると、両方検索した段階で、実は日本語訳がないことがわかる。 -一読したときには、物語のタイトルとわかる。 +『戻ってきた帽子をかぶったネコ(The Cat in the Hat Comes Back)』と両方書いてあると、両方検索した段階で、実は日本語訳がないことがわかり、 +一読したときに、物語のタイトルとわかります。 ### 地名 @@ -110,7 +111,7 @@ DC/SWCのレッスンは専門用語がかなり多く、複数のレッスン ### 解説・訂正 日本語の文字とのバランスを考え、全角のかな文字を囲むときには、全角の()がおすすめです。 -半角英数文字を囲むときには、半角の()を使ってください。                   +半角英数文字を囲むときには、半角の()を使いましょう。                   訳者の解説は() diff --git a/Translators.md b/docs/Translators.md similarity index 100% rename from Translators.md rename to docs/Translators.md diff --git a/admin.md b/docs/admin.md similarity index 95% rename from admin.md rename to docs/admin.md index 29f403e5..d53d8acc 100644 --- a/admin.md +++ b/docs/admin.md @@ -57,7 +57,8 @@ git pull origin gh-pages 6. Sync changes to (master branch of) the pushed submodule files to the original lesson repository ``` -git submodule foreach git pull origin master +git submodule foreach 'case $name in po4gitbook) ;; *) git pull swc-ja gh-pages ;; esac' +git submodule update --recursive ``` 7. Commit changes to the submodule to the original lesson diff --git a/git.md b/docs/git.md similarity index 100% rename from git.md rename to docs/git.md diff --git a/importing.md b/docs/importing.md similarity index 100% rename from importing.md rename to docs/importing.md diff --git a/quickstart.md b/docs/quickstart.md similarity index 100% rename from quickstart.md rename to docs/quickstart.md diff --git a/quickstart_ja.md b/docs/quickstart_ja.md similarity index 100% rename from quickstart_ja.md rename to docs/quickstart_ja.md diff --git a/rules.md b/docs/rules.md similarity index 100% rename from rules.md rename to docs/rules.md diff --git a/updating.md b/docs/updating.md similarity index 100% rename from updating.md rename to docs/updating.md diff --git a/lang.md b/lang.md index ebd97101..9976c287 100644 --- a/lang.md +++ b/lang.md @@ -15,15 +15,16 @@ contribute: "貢献します" source: "ソース" cite: "引用します" contact: "連絡します" -keypoints: "要点" +keypoints: "キーポイント" overview: "概要" break: "休止" previous: "戻る" next: "次へ" episode: "エピソード" lessonHome: "レッスンのホーム" +title: "タイトル" teaching: "講義" -exercises: "練習" +exercises: "演習" min: "分" questions: "質問" objectives: "目標" diff --git a/po/git-novice.ja.po b/po/git-novice.ja.po index b24171f5..c6a81ce6 100644 --- a/po/git-novice.ja.po +++ b/po/git-novice.ja.po @@ -1,5 +1,5 @@ # Japanese translation of the Software Carpentry Git Lesson -# Copyright (C) 2019 Software Carpentry Foundation; Japanese Translation Team +# Copyright (C) 2020 Software Carpentry Foundation; Japanese Translation Team # This file is distributed under the same license as the gitbook package. # Riku Takei , 2019, 2020. # diff --git a/po/python-novice-gapminder.ja.po b/po/python-novice-gapminder.ja.po index 1b86c7d5..3b692995 100644 --- a/po/python-novice-gapminder.ja.po +++ b/po/python-novice-gapminder.ja.po @@ -1,5 +1,5 @@ # Japanese translation of the Software Carpentry Plotting and Programming in Python Lesson -# Copyright (C) 2019 Software Carpentry Foundation; Japanese Translation Team +# Copyright (C) 2020 Software Carpentry Foundation; Japanese Translation Team # This file is distributed under the same license as the PACKAGE package. # Software-Carpentry Japanese-Team , 2019, 2020. # diff --git a/po/python-novice-inflammation.ja.po b/po/python-novice-inflammation.ja.po index 25ccc694..36ec8f8b 100644 --- a/po/python-novice-inflammation.ja.po +++ b/po/python-novice-inflammation.ja.po @@ -1,5 +1,5 @@ # Japanese translation of the Software Carpentry Programming with Python Lesson -# Copyright (C) 2019 Software Carpentry Foundation; Japanese Translation Team +# Copyright (C) 2020 Software Carpentry Foundation; Japanese Translation Team # This file is distributed under the same license as the PACKAGE package. # Software-Carpentry Japanese-Team , 2019, 2020. # diff --git a/po/r-novice-gapminder.ja.po b/po/r-novice-gapminder.ja.po index 76baa2f9..f9ae6b12 100644 --- a/po/r-novice-gapminder.ja.po +++ b/po/r-novice-gapminder.ja.po @@ -1,5 +1,5 @@ -# Japanese translation of the Software Carpentry R for Reproducible Scientific Analysis Lesson -# Copyright (C) 2019 Software Carpentry Foundation; Japanese Translation Team +# Japanese translation of the Software Carpentry R for Reproducible Scientific Analysis Lesson +# Copyright (C) 2020 Software Carpentry Foundation; Japanese Translation Team # This file is distributed under the same license as the PACKAGE package. # Software-Carpentry Japanese-Team , 2019, 2020. # @@ -828,15 +828,15 @@ msgstr "" "---\n" "# Please do not edit this file directly; it is auto generated.\n" "# Instead, please edit 01-rstudio-intro.md in _episodes_rmd/\n" -"レッスンタイトル: \"R と RStudio\"\n" -"講義: 45分\n" -"演習: 10分\n" -"質問:\n" +"title: \"R と RStudio\"\n" +"teaching: 45分\n" +"exercises: 10分\n" +"questions:\n" "- \"RStudio はどのように操作したらよいですか?\"\n" "- \"R とはどのようにやりとりしたらよいですか?\"\n" "- \"環境の管理はどうしたらよいですか?\"\n" "- \"パッケージのインストールはどうしたらよいですか?\"\n" -"目標:\n" +"objectives:\n" "- \"RStudio IDE の各ウィンドウの使用目的と使い方が説明出来るようになりましょう\"\n" "- \"RStudio IDE のボタンやオプションの位置を理解しましょう\"\n" "- \"変数が定義出来るようになりましょう\"\n" @@ -845,7 +845,7 @@ msgstr "" "- \"算術演算子や比較演算子が使えるようになりましょう。\"\n" "- \"関数が呼び出せるようになりましょう。\"\n" "- \"パッケージの管理が出来るようになりましょう。\"\n" -"キーポイント:\n" +"keypoints:\n" "- \"RStudio で R プロラムの作成と実行を行う。\"\n" "- \"R は算術演算子や数学関数が使える。\"\n" "- \"`<-` を使って変数に値を設定する。\"\n" @@ -1112,7 +1112,7 @@ msgstr "" # header #: r-novice-gapminder/_episodes/01-rstudio-intro.md:130 msgid "## Using R as a calculator" -msgstr "## Rを計算機として使う" +msgstr "## Rを計算機としての使用" #: r-novice-gapminder/_episodes/01-rstudio-intro.md:132 msgid "The simplest thing you could do with R is do arithmetic:" @@ -2186,7 +2186,6 @@ msgstr "" "> 以外では、2数の比較に決して `==` を使わないこと。\n" ">\n" "> コンピュータは、小数点以下の数を限られた精度でしか示せません。\n" - "> かもしれません。すると、二つの数がRで同じように表示されても\n" "> 実際は、その背後で異なる形で表されており、したがって\n" "> ごくわずかな誤差(機械の数値許容範囲)があるかもしれません。\n" @@ -3284,14 +3283,14 @@ msgstr "" "---\n" "# Please do not edit this file directly; it is auto generated.\n" "# Instead, please edit 02-project-intro.md in _episodes_rmd/\n" -"タイトル: \"RStudio のプロジェクト管理\"\n" -"講義: 20 分\n" -"演習: 10 分\n" -"質問:\n" +"title: \"RStudio のプロジェクト管理\"\n" +"teaching: 20 分\n" +"exercises: 10 分\n" +"questions:\n" "- \"R のプロジェクトの管理はどうしたら良いですか?\"\n" -"目標:\n" +"objectives:\n" "- RStudio のプロジェクトを作成出来るようになりましょう\n" -"キーポイント:\n" +"keypoints:\n" "- \"RStudio でプロジェクトの生成と管理を行う。\"\n" "- \"オリジナルデータは読み込み専用とする。\"\n" "- \"生成された出力は使い捨てとする。\"\n" @@ -3802,16 +3801,16 @@ msgstr "" "---\n" "# Please do not edit this file directly; it is auto generated.\n" "# Instead, please edit 03-seeking-help.md in _episodes_rmd/\n" -"タイトル: \"ヘルプ機能\"\n" -"講義: 10 分\n" -"演習: 10 分\n" -"質問:\n" +"title: \"ヘルプ機能\"\n" +"teaching: 10 分\n" +"exercises: 10 分\n" +"questions:\n" "- \"R のヘルプ機能はありますか?\"\n" -"目標:\n" +"objectives:\n" "- \"関数や特別な演算子に関する R のヘルプファイルにアクセス出来るようになりましょう。\"\n" "- \"CRAN のタスクビューを使って課題が解決出来るようなパッケージの特定が出来るようになりましょう。\"\n" "- \"あなたの仲間にヘルプを求められるようになりましょう。\"\n" -"キーポイント:\n" +"keypoints:\n" "- \"R の `help()` でオンラインヘルプを使用する。\"\n" "source: Rmd\n" "---" @@ -4417,18 +4416,18 @@ msgstr "" "---\n" "# Please do not edit this file directly; it is auto generated.\n" "# Instead, please edit 04-data-structures-part1.md in _episodes_rmd/\n" -"タイトル: \"データの構造\"\n" -"講義: 40分\n" -"演習: 15分\n" -"質問:\n" +"title: \"データの構造\"\n" +"teaching: 40分\n" +"exercises: 15分\n" +"questions:\n" "- \"How can I read data in R のデータはどう読めばいいですか?\"\n" "- \"R の基本的なデータタイプにはどのようなものがありますか?\"\n" "- \"R のカテゴリー情報はどのように表現しますか ?\"\n" -"目標:\n" +"objectives:\n" "- \"様々なタイプのデータがあることを理解しましょう。\"\n" "- \"データフレームとその要素がベクター、ファクターおよびリストとどのように関連しているかを理解しましょう。\"\n" "- \"オブジェクトのタイプ、クラス、および構造の確認を R で行えるようになりましょう。\"\n" -"キーポイント:\n" +"keypoints:\n" "- \"R のテーブル型のデータの読み込みには `read.csv` を使う。\"\n" "- \"R の基本的なデータタイプには`double(浮動小数点型)`、`integer(整数型)`、`complex(複素数型)`、`logical(論理型)`、そして`character(文字型)`がある。\"\n" "- \"R では、データのカテゴリーを表すのに`factor (ファクター)` を使う。\"\n" @@ -7109,19 +7108,19 @@ msgstr "" "---\n" "# Please do not edit this file directly; it is auto generated.\n" "# Instead, please edit 05-data-structures-part2.md in _episodes_rmd/\n" -"タイトル: \"Exploring Data Frames\"\n" -"講義: 20分\n" -"演習: 10分\n" -"質問:\n" +"title: \"Exploring Data Frames\"\n" +"teaching: 20分\n" +"exercises: 10分\n" +"questions:\n" "- \"データフレームはどのように操作すればよいですか?\"\n" -"目標:\n" +"objectives:\n" "- \"行や列を追加したり削除出来るようになりましょう。\"\n" "- \"`NA`が入っている行の削除が出来るようになりましょう。\"\n" "- \"2 つのデータフレームをマージできるようになりましょう。\"\n" "- \"`factor (ファクター)`について理解しましょう。\"\n" "- \"`factor` を `character (文字型)`に変換、またはその逆の変換が出来るようになりましょう。\"\n" "- \"データフレームの列のサイズやクラスなどの基本的なプロパティ、および名前や最初の数行の表示が出来るようになりましょう。\"\n" -"キーポイント:\n" +"keypoints:\n" "- \"新しい列をデータフレームに追加するときは `cbind()` を使用する。\"\n" "- \"新しい行をデータフレームに追加するときは `rbind()` を使用する。\"\n" "- \"データフレームから行を削除するとき\"\n" @@ -8027,7 +8026,7 @@ msgid "" "variables in gapminder, what do you think the following will produce, and why?" msgstr "" "データフレームの次元について見てみることもできます。\n" -" `str(gapminder)` が、gapminderには、6変数について1704の標本があると言っていたことを念頭に置き、\n" +" `str(gapminder)` が、gapminderには、6変数について1704の観測値があると言っていたことを念頭に置き、\n" "以下から何が出てくると思いますか?それはなぜですか?" # code block @@ -8379,16 +8378,16 @@ msgstr "" "---\n" "# Please do not edit this file directly; it is auto generated.\n" "# Instead, please edit 06-data-subsetting.md in _episodes_rmd/\n" -"タイトル: データの部分集合化\n" -"講義: 35分\n" -"演習: 15分\n" -"質問:\n" +"title: データの部分集合化\n" +"teaching: 35分\n" +"exercises: 15分\n" +"questions:\n" "- \"データの部分集合化を R で行うにはどのようにすればいいですか?\"\n" -"目標:\n" +"objectives:\n" "- \"ベクター、ファクター、マトリックス、リスト、およびデータフレームの部分化が出来るようになりましょう。\"\n" "- \"インデックス、名前、および比較演算子を使用してデータ内の個々および複数の要素を取り出せるようになりましょう。\"\n" "- \"様々なデータ構造の要素のスキップや削除が出来るようになりましょう。\"\n" -"キーポイント:\n" +"keypoints:\n" "- \"R のインデックスは 0 ではなく 1 から始まる。\"\n" "- \"`[]` を使用して個々の値にアクセス出来る。\"\n" "- \"`[下の番号:上の番号]` を使用してスライスされたデータにアクセス出来る。\"\n" @@ -8402,20 +8401,20 @@ msgid "" "R has many powerful subset operators. Mastering them will allow you to\n" "easily perform complex operations on any kind of dataset." msgstr "" -"Rには、かなり使える部分集合の演算子があります。もし、それをマスターできたら、\n" -"どんなデータセットにも複雑な演算を簡単にすることができます。" +"Rには便利な部分集合の演算子が多く含まれています。これらをマスターできれば、\n" +"どんなデータセットにも複雑な演算を楽に行えます。" #: r-novice-gapminder/_episodes/06-data-subsetting.md:27 msgid "" "There are six different ways we can subset any kind of object, and three\n" "different subsetting operators for the different data structures." msgstr "" -"There are six different ways we can subset any kind of object, and three\n" -"different subsetting operators for the different data structures." +"オブジェクトを部分集合する方法は6つあり、データ構造を\n" +"部分集合する方法は3つあります。" #: r-novice-gapminder/_episodes/06-data-subsetting.md:30 msgid "Let's start with the workhorse of R: a simple numeric vector." -msgstr "Rの働き頭から始めましょう:簡単な数値ベクトル" +msgstr "Rの働き頭、数値ベクトルから始めましょう。" # code block #: r-novice-gapminder/_episodes/06-data-subsetting.md:33 @@ -8462,7 +8461,7 @@ msgstr "" msgid "" "So now that we've created a dummy vector to play with, how do we get at its\n" "contents?" -msgstr "ちょっと触ってみるためのダミーベクトルを作ることができたのですが、どうやってベクトルの中身を使うのでしょう?" +msgstr "練習用のベクトルを作ることができたのですが、どうやってベクトルの中身を使うのでしょう?" # header #: r-novice-gapminder/_episodes/06-data-subsetting.md:56 @@ -8529,7 +8528,7 @@ msgid "" "It may look different, but the square brackets operator is a function. For vectors\n" "(and matrices), it means \"get me the nth element\"." msgstr "" -"違うふうに見えるかもしれませんが、各括弧の演算子は、関数なのです。ベクトル(及び行列)の場合は、\n" +"違うふうに見えるかもしれませんが、各括弧の演算子は関数です。ベクトル(及び行列)の場合は、\n" "「n番目の要素をちょうだい」ということを意味しています。" #: r-novice-gapminder/_episodes/06-data-subsetting.md:92 @@ -8591,7 +8590,7 @@ msgstr "" #: r-novice-gapminder/_episodes/06-data-subsetting.md:124 msgid "the `:` operator creates a sequence of numbers from the left element to the right." -msgstr "この演算子 `:` は、左から右の要素の一連番号を作ります。" +msgstr "この `:` 演算子は、左から右の要素の一連番号を作ります。" # code block #: r-novice-gapminder/_episodes/06-data-subsetting.md:126 @@ -8657,7 +8656,7 @@ msgstr "" #: r-novice-gapminder/_episodes/06-data-subsetting.md:169 msgid "If we ask for an index beyond the length of the vector, R will return a missing value:" -msgstr "もしベクトルの長さ以上の要素番号を頼んだ場合、Rは、欠測値を返します:" +msgstr "もしベクトルの長さ以上の要素番号を頼んだ場合、Rは欠測値を返します:" # code block #: r-novice-gapminder/_episodes/06-data-subsetting.md:171 @@ -8726,7 +8725,7 @@ msgid "" msgstr "" ">\n" "> 多くのプログラミング言語(例えば、C、Python)では、ベクトルの最初の\n" -"> 要素の要素番号は0です。Rでは、最初の要素番号は1なのです。" +"> 要素の要素番号は0です。Rでは、最初の要素番号は1です。" # header #: r-novice-gapminder/_episodes/06-data-subsetting.md:207 @@ -8819,8 +8818,8 @@ msgid "" "> ~~~" msgstr "" ">\n" -"> 初心者のよくある失敗は、ベクトルのスライスを飛ばしてしまうことです。\n" -"> 数列に負の符号を付けようとするとき、次のようにすることはありがちです:\n" +"> 初心者によく見られるのが、ベクトルのスライスを飛ばそうとする時に起こる間違いです。\n" +"> 数列をベクトルから削除しようとする場合、次のようにして削除しようとします:\n" ">\n" "> \n" "> ~~~\n" @@ -8828,7 +8827,7 @@ msgstr "" "> ~~~\n" "> {: .language-r}\n" ">\n" -"> This gives a somewhat cryptic error:\n" +"> すると、なんだか複雑なエラーが返ってきます:\n" ">\n" "> \n" "> ~~~\n" @@ -8864,8 +8863,8 @@ msgid "" "> ~~~" msgstr "" ">\n" -"> でも、演算の順番を思い出してみて下さい。`:` は、実際には、関数なのです。\n" -"> 最初の引数を-1、次のを3として認識し、次のような数列を生成します。\n" +"> 演算の順番を思い出してみましょう。`:` は、実際には関数なのです。\n" +"> 最初の引数を-1、次の引数を3として認識し、次のような数列を生成します。\n" "> `c(-1, 0, 1, 2, 3)`\n" ">\n" "> 正解は、関数を呼ぶ部分を括弧で囲むことです。\n" @@ -8967,7 +8966,7 @@ msgid "" "> ~~~" msgstr "" ">\n" -"> 以下のアウトプットを得るために、少なくとも2つの異なるコマンドを考えてください:\n" +"> 以下の出力を得るために、少なくとも2つの異なるコマンドを考えてください:\n" ">\n" "> \n" "> ~~~\n" @@ -9097,9 +9096,9 @@ msgid "" "position of various elements can often change when chaining together\n" "subsetting operations, but the names will always remain the same!" msgstr "" -"オブジェクトの部分集合を作るには、この方法の方が確実なやり方です:要素の場所は、\n" -"部分集合の演算子を繋いで使うことでよく変わるのですが。\n" -"名前は変わらないのです!" +"オブジェクトの部分集合を作るには、この方法の方が確実です:要素の場所は、\n" +"部分集合の演算子を繋いで使うことでよく変わるのですが、\n" +"名前は絶対に変わりません。" # header #: r-novice-gapminder/_episodes/06-data-subsetting.md:402 @@ -9141,7 +9140,8 @@ msgid "" "use them to succinctly subset vectors: the following statement gives\n" "the same result as the previous one." msgstr "" -"比較演算子(例えば、 `>`、`<`、 `==`)は、その結果が論理ベクトルになるので、簡潔にベクトルの部分集合を作ることができます。\n" +"比較演算子(例えば、 `>`、`<`、 `==`)は、その結果が論理ベクトルになるので、\n" +"簡潔にベクトルの部分集合を作ることができます。\n" "つまり、以下の宣言は、前と同じ結果を返します。" # code block @@ -9161,9 +9161,9 @@ msgid "" "a logical vector `c(FALSE, FALSE, TRUE, FALSE, TRUE)`, and then\n" "selects the elements of `x` corresponding to the `TRUE` values." msgstr "" -"分割すると、この宣言は、最初に `x>7` を計算し、論理ベクトル\n" +"分割すると、この宣言は最初に `x>7` を計算し、論理ベクトル\n" "`c(FALSE, FALSE, TRUE, FALSE, TRUE)` を作ります。それから、\n" -"`TRUE` の値に対応する `x` 要素を選択します。" +"`TRUE` の値に対応する要素を `x` から選択しています。" #: r-novice-gapminder/_episodes/06-data-subsetting.md:442 msgid "" @@ -9220,7 +9220,7 @@ msgid "" msgstr "" ">\n" "> 複数の論理基準を組み合わせたい場合はよくあります。\n" -"> 例えば、アジア**または** ヨーロッパに位置し、なお**かつ** ある一定の範囲の平均余命\n" +"> 例えば、アジア**または** ヨーロッパに位置し、**なおかつ** ある一定の範囲の平均余命\n" "> の国を見つけたいとします。\n" "> Rにが論理ベクトルを複数組み合わせる演算子があります:\n" ">\n" @@ -9229,7 +9229,7 @@ msgstr "" ">\n" "> `&` 及び `|` の代わりに、 `&&` 及び `||` を見かけることもあるでしょう。\n" "> この二重になっている演算子は、それぞれのベクトルの最初の要素だけを見て、残りを無視するものです。\n" -"> 一般的に、この二重になっている演算子は、データ分析では使わずに、\n" +"> 一般的に、この二重になっている演算子はデータ分析では使わずに、\n" "> プログラミングの際に(つまり、ある宣言を実行するかどうかを決める際に)\n" "> 使うことをおすすめします。\n" ">\n" @@ -9313,7 +9313,7 @@ msgstr "" ">\n" "> ベクトルの中の要素に、同じ名前を持つものがあるかもしれないということを知っておく必要があります。\n" "> (データフレームでは、--- Rは避けようとしますが --- 列に同じ名前を付けることもできます。\n" -"> 一方で、行の名前は、全て違う必要があります)\n" +"> 一方で、行の名前は全て違う必要があります)\n" "> これらの例を考えてみましょう:\n" ">\n" ">\n" @@ -9392,7 +9392,7 @@ msgstr "" ">\n" ">\n" ">~~~\n" -"> x['a'] # only returns first value\n" +"> x['a'] # 最初の値しか返さない\n" ">~~~\n" ">{: .language-r}\n" ">\n" @@ -9470,7 +9470,7 @@ msgid "" "~~~" msgstr "" "~~~\n" -"x <- c(a=5.4, b=6.2, c=7.1, d=4.8, e=7.5) # まず、ベクトルにその場で名前を付けることから、また始めます\n" +"x <- c(a=5.4, b=6.2, c=7.1, d=4.8, e=7.5) # まず、ベクトルにその場で名前を付けることから始めます\n" "x[-\"a\"]\n" "~~~" @@ -9589,8 +9589,8 @@ msgid "" "of the left argument with the corresponding element of its right\n" "argument. What happens when you compare vectors of different lengths?" msgstr "" -"Rは、`names(x)[3] != \"c\"` が明らかに間違いであるときに、このベクトルの3番目の要素として、なぜ`TRUE` にしたのでしょうか。\n" -"`!=` を使うとき、Rは、左側の引数のそれぞれの要素を、右側のそれぞれの要素と比較しようとします。\n" +"Rは、`names(x)[3] != \"c\"` が明らかに間違いであるときに、このベクトルの3番目の要素をなぜ`TRUE` にしたのでしょうか。\n" +"`!=` を使うとき、Rは左側の引数のそれぞれの要素を右側のそれぞれの要素と比較しようとします。\n" "違う長さのベクトルを比較しようとすると、何が起こるのでしょう?" #: r-novice-gapminder/_episodes/06-data-subsetting.md:697 @@ -9617,7 +9617,7 @@ msgstr "" #: r-novice-gapminder/_episodes/06-data-subsetting.md:707 msgid "The way to get R to do what we really want (match *each* element of the left argument with *all* of the elements of the right argument) it to use the `%in%` operator. The `%in%` operator goes through each element of its left argument, in this case the names of `x`, and asks, \"Does this element occur in the second argument?\". Here, since we want to *exclude* values, we also need a `!` operator to change \"in\" to \"not in\":" -msgstr "Rに本当にやってもらいたいこと(左の引数の *それぞれの* 要素を、右の引数の要素の *全て* にマッチさせこと)をしてもらうには、 `%in%` 演算子を使う必要があります。`%in%` 演算子は、左の引数のそれぞれの要素、ここでは `x` の名前にひとつづつ 「この要素は、2番目の引数にあるかな」と尋ねていきます。ここで、値を *除く* ため、「中にある(in)」を「中にない(not in)」に変える `!` 演算子が必要です。" +msgstr "Rに本当にやってもらいたいこと(左の引数の *それぞれの* 要素を、右の引数の要素の *全て* にマッチさせること)をしてもらうには、 `%in%` 演算子を使う必要があります。`%in%` 演算子は、左の引数のそれぞれの要素、ここでは `x` の名前にひとつずつ 「この要素は、2番目の引数にあるかな」と尋ねていきます。ここで、値を *除く* ため、「中にある(in)」を「中にない(not in)」に変える `!` 演算子が必要です。" # code block #: r-novice-gapminder/_episodes/06-data-subsetting.md:710 @@ -9753,7 +9753,7 @@ msgstr "データをフィルターするために使える特別な関数がい # unordered list #: r-novice-gapminder/_episodes/06-data-subsetting.md:778 msgid " * `is.na` will return all positions in a vector, matrix, or data.frame" -msgstr " * `is.na` は、ベクトル、行列、データフレームで、 全ての`NA` (または `NaN` )を含む位置を返します" +msgstr " * `is.na` は、ベクトル、行列、データフレームで、" #: r-novice-gapminder/_episodes/06-data-subsetting.md:779 msgid "" @@ -9763,8 +9763,10 @@ msgid "" " that do not contain `NA`, `NaN` or `Inf`.\n" " * `na.omit` will filter out all missing values from a vector" msgstr "" +" 全ての`NA` (または `NaN` )を含む位置を返します\n" " * これと同じことを `NaN` 及び `Inf` にするのが `is.nan` 及び `is.infinite` です\n" -" * `is.finite` は、ベクトル、行列、データフレームで、 全ての`NA`, `NaN` または `Inf`を含まない位置を返します\n" +" * `is.finite` は、ベクトル、行列、データフレームで、\n" +" 全ての`NA`, `NaN` または `Inf`を含まない位置を返します\n" " * `na.omit` は、ベクトルから欠損値をフィルターし、除きます" # header @@ -9776,7 +9778,9 @@ msgstr "## 順序のない因子の部分集合を作る" msgid "" "Now that we've explored the different ways to subset vectors, how\n" "do we subset the other data structures?" -msgstr "これまで部分集合ベクトルを作る色々な方法をやってみましたが、他のデータ構造の部分集合を作るにはどうすればいいでしょう。" +msgstr "" +"これまで部分集合ベクトルを作る色々な方法をやってみましたが、\n" +"他のデータ構造の部分集合を作るにはどうすればいいでしょう。" #: r-novice-gapminder/_episodes/06-data-subsetting.md:790 msgid "Factor subsetting works the same way as vector subsetting." @@ -9934,7 +9938,7 @@ msgstr "" msgid "" "You can leave the first or second arguments blank to retrieve all the\n" "rows or columns respectively:" -msgstr "それぞれ全ての列または行を取ってくるために、この最初または2番目の引数を空のままにしておくこともできます:" +msgstr "それぞれ全ての列または行を取ってくるためには、最初または2番目の引数を空のままにしておきましょう:" # code block #: r-novice-gapminder/_episodes/06-data-subsetting.md:881 @@ -9974,7 +9978,7 @@ msgstr "" msgid "" "If we only access one row or column, R will automatically convert the result\n" "to a vector:" -msgstr "1つの列または行にアクセスした場合、Rは、結果を自動的にベクトルに変換します:" +msgstr "1つの列または行にアクセスした場合、Rは結果を自動的にベクトルに変換します:" # code block #: r-novice-gapminder/_episodes/06-data-subsetting.md:903 @@ -10034,7 +10038,7 @@ msgstr "" msgid "" "Unlike vectors, if we try to access a row or column outside of the matrix,\n" "R will throw an error:" -msgstr "ベクトルと違って、行列の外の行や列にアクセスしようとしたとき、Rはエラーを返します:" +msgstr "ベクトルと違って、行列の外の行や列にアクセスしようとすると、Rはエラーを返します:" # code block #: r-novice-gapminder/_episodes/06-data-subsetting.md:936 @@ -10080,7 +10084,7 @@ msgstr "" msgid "" "Because matrices are vectors, we can\n" "also subset using only one argument:" -msgstr "行列は、ベクトルなので、1つの引数だけを使って部分集合を作ることもできます:" +msgstr "行列はベクトルなので、1つの引数だけを使って部分集合を作ることもできます:" # code block #: r-novice-gapminder/_episodes/06-data-subsetting.md:960 @@ -10141,7 +10145,7 @@ msgstr "" #: r-novice-gapminder/_episodes/06-data-subsetting.md:992 msgid "If you wish to populate the matrix by row, use `byrow=TRUE`:" -msgstr "もし、行列を、行の順番で埋めていきたい場合は、 `byrow=TRUE` を使います:" +msgstr "もし、行列を行の順番で埋めていきたい場合は、 `byrow=TRUE` を使います:" # code block #: r-novice-gapminder/_episodes/06-data-subsetting.md:995 @@ -10197,7 +10201,7 @@ msgid "" "> ~~~" msgstr "" ">\n" -"> 以下のコードがあるとしましょう:\n" +"> 以下のコードがあるとします:\n" ">\n" "> \n" "> ~~~\n" @@ -10257,7 +10261,7 @@ msgid "" "Now we'll introduce some new subsetting operators. There are three functions\n" "used to subset lists. We've already seen these when learning about atomic vectors and matrices: `[`, `[[`, and `$`." msgstr "" -"ここで新しい部分集合を作る演算子を御紹介しましょう。リストの部分集合を作る関数は3つあります。\n" +"ここで新しい部分集合を作る演算子を紹介します。リストの部分集合を作る関数は3つあります。\n" "原子ベクトルと行列について学んだ時に、既に見たものです: `[` 、 `[[` 、`$`" #: r-novice-gapminder/_episodes/06-data-subsetting.md:1055 @@ -10306,7 +10310,7 @@ msgid "" "in each element of the list, not the individual elements within those\n" "data structures." msgstr "" -"`[` を使い原子ベクトルを作ったのと全く同じ方法で、リストの要素から部分集合を作ることができます。\n" +"`[` を使って原子ベクトルを作ったのと全く同じ方法で、リストの要素から部分集合を作ることができます。\n" "しかし、比較処理は反復的ではないため、使えません。比較処理は、リストのそれぞれの要素のデータ構造にある、個々の要素ではなく、\n" "データ構造に条件付けをしようとするからです。" @@ -10481,7 +10485,7 @@ msgstr "" # blockquote, which can be cascaded #: r-novice-gapminder/_episodes/06-data-subsetting.md:1183 msgid "> Given the following list:" -msgstr "> 以下のリストがあるとしましょう:" +msgstr "> 以下のリストがあるとします:" #: r-novice-gapminder/_episodes/06-data-subsetting.md:1184 msgid "" @@ -10586,7 +10590,7 @@ msgstr "" # blockquote, which can be cascaded #: r-novice-gapminder/_episodes/06-data-subsetting.md:1237 msgid "> Given a linear model:" -msgstr "> 線形モデルを考えてみましょう:" +msgstr "> 以下のような線形モデルあるとします:" #: r-novice-gapminder/_episodes/06-data-subsetting.md:1238 msgid "" @@ -10644,7 +10648,7 @@ msgid "" "Remember the data frames are lists underneath the hood, so similar rules\n" "apply. However they are also two dimensional objects:" msgstr "" -"データフレームの中身は実はリストなので、同じようなルールがあてはまることを覚えておきましょう。\n" +"データフレームの中身は実はリストなので、リストと同じようなルールがあてはまることを覚えておきましょう。\n" "しかし、データフレームは2次元のオブジェクトでもあります。" #: r-novice-gapminder/_episodes/06-data-subsetting.md:1268 @@ -10915,7 +10919,7 @@ msgstr "" ">\n" "> 以下の一般的なデータフレームの部分集合を作る際のエラーを修正しましょう:\n" ">\n" -"> 1. 1957年に集められた標本を抜き出す\n" +"> 1. 1957年に集められた観測値を抜き出す\n" ">\n" "> \n" "> ~~~\n" @@ -10961,7 +10965,7 @@ msgstr "" "> > 以下の一般的なデータフレームの部分集合を作る際のエラーを修正しましょう:\n" "\n" "> >\n" -"> > 1. 1957年に集められた標本を抜き出す\n" +"> > 1. 1957年に集められた観測値を抜き出す\n" "\n" "> >\n" "> > \n" @@ -11078,16 +11082,16 @@ msgstr "" "---\n" "# Please do not edit this file directly; it is auto generated.\n" "# Instead, please edit 07-control-flow.md in _episodes_rmd/\n" -"タイトル: 実行の制御\n" -"講義: 45 分\n" -"演習: 20 分\n" -"質問:\n" +"title: 実行の制御\n" +"teaching: 45 分\n" +"exercises: 20 分\n" +"questions:\n" "- \"R でデータに依存した選択を行うにはどうすればよいですか?\"\n" "- \"R で処理を繰り返すにはどうすればよいですか?\"\n" -"目標:\n" +"objectives:\n" "- \"`if()` と `else()` で条件文が書けるようになりましょう。\"\n" "- \"`for()` ループを理解して使えるようになりましょう。\"\n" -"キーポイント:\n" +"keypoints:\n" "- \"選択の際は `if` と `else` を使う。\"\n" "- \"繰り返す処理には `for` を使う。\"\n" "source: Rmd\n" @@ -11100,7 +11104,7 @@ msgid "" "Alternatively, we can also set an action to occur a particular number of times." msgstr "" "コードを書く際、実行の流れを制御する必要がよくあります。\n" -"これは、ある条件、または一連の条件が満たされたときに、実行されるようにすればできます。\n" +"これは、ある条件、または一連の条件が満たされたときに実行されるようにすればできます。\n" "あるいは、決まった回数実行されるよう設定することもできます。" #: r-novice-gapminder/_episodes/07-control-flow.md:25 @@ -11109,7 +11113,7 @@ msgid "" "For conditional statements, the most commonly used approaches are the constructs:" msgstr "" "Rでは、流れを制御する方法がいくつかあります。\n" -"条件付きの宣言で、最もよく使われるのが「構文(constructs)」です:" +"条件付きの宣言で、最もよく使われるのが構文(constructs)です:" # code block #: r-novice-gapminder/_episodes/07-control-flow.md:29 @@ -11135,10 +11139,10 @@ msgstr "" "}\n" "\n" "# if ... else\n" -"if (condition is true) {\n" -" perform action\n" -"} else { # that is, if the condition is false,\n" -" perform alternative action\n" +"if (condition is true) { # 条件が満たされた場合\n" +" アクションを行う\n" +"} else { # つまり、条件が満たされなかった場合\n" +" 別のアクションを行う\n" "}\n" "~~~" @@ -11182,7 +11186,7 @@ msgstr "" #: r-novice-gapminder/_episodes/07-control-flow.md:65 msgid "The print statement does not appear in the console because x is not greater than 10. To print a different message for numbers less than 10, we can add an `else` statement." -msgstr "xは、10より大きくないため、表示された宣言はコンソール上に表示されません。10より小さい場合に違ったメッセージを表示させるためには、 `else` 宣言を追加しなければなりません。" +msgstr "xは10より大きくないため、表示された宣言はコンソール上に表示されません。10より小さい場合に違ったメッセージを表示させるためには、 `else` 宣言を追加しなければなりません。" # code block #: r-novice-gapminder/_episodes/07-control-flow.md:68 @@ -11266,7 +11270,7 @@ msgid "" "looking for a logical element, i.e., `TRUE` or `FALSE`. This can cause some\n" "headaches for beginners. For example:" msgstr "" -"**重要:** Rが `if()` 宣言の中の条件を計算する際、論理要素( `TRUE` or `FALSE` )を探します。\n" +"**重要:** Rが `if()` 宣言の中の条件を計算する際、論理要素( `TRUE` か `FALSE` )を探します。\n" "初心者には複雑なので、混乱してしまうかもしれません。例えば:" # code block @@ -11303,7 +11307,7 @@ msgstr "" #: r-novice-gapminder/_episodes/07-control-flow.md:131 msgid "As we can see, the not equal message was printed because the vector x is `FALSE`" -msgstr "ここで見たように、ベクトルxが `FALSE` であるので、不等号のメッセージが表示されたのです。" +msgstr "ここで見られるように、ベクトル x が `FALSE` であるため、不等号のメッセージが表示されました。" # code block #: r-novice-gapminder/_episodes/07-control-flow.md:134 @@ -11444,7 +11448,7 @@ msgid "" "element. Here you need to make sure your condition is of length 1." msgstr "" "もし、1つ以上の要素を持つベクトルを評価する条件の場合、\n" -"関数 `if()` は走るのですが、最初の要素の条件しか評価しません。\n" +"関数 `if()` は実行されるのですが、最初の要素の条件しか評価しません。\n" "ここでは、確実に条件の長さは1であるようにする必要があります。" # blockquote, which can be cascaded @@ -11462,7 +11466,7 @@ msgid "" "> the vector are `TRUE`." msgstr "" ">\n" -"> `any()` 関数は、少なくとも1つ `TRUE` の値がある場合、 `TRUE` を返し、\n" +"> `any()` 関数は、ベクトルの中に少なくとも1つ `TRUE` の値がある場合、 `TRUE` を返し、\n" "> そうでない場合は、 `FALSE` を返します。\n" "> これは、 `%in%` 演算子でも同様に使えます。\n" "> 関数 `all()` は、その名前が示唆しているように、ベクトル内の全ての値が `TRUE` である時のみ、\n" @@ -11488,8 +11492,8 @@ msgstr "" " `for()` ループを使いましょう。\n" " `for()` ループは、先ほどシェルのレッスンで見ましたね。これは、最も柔軟な\n" "ループの演算子ですが、それゆえ、正しく使うのが最も難しいです。\n" -"繰り返す順番が重要(つまり直前の繰り返しの結果をもとに、次々と\n" -"繰り返しの演算行われる形)でない限り、 `for()` ループを使うのを避けましょう。" +"繰り返す順番が重要(つまり直前の繰り返しの結果をもとに、次\n" +"の演算を行う場合)でない限り、 `for()` ループを使うのを避けましょう。" #: r-novice-gapminder/_episodes/07-control-flow.md:228 msgid "The basic structure of a `for()` loop is:" @@ -11512,7 +11516,7 @@ msgstr "" #: r-novice-gapminder/_episodes/07-control-flow.md:238 msgid "For example:" -msgstr "例:" +msgstr "例えば:" # code block #: r-novice-gapminder/_episodes/07-control-flow.md:241 @@ -11562,13 +11566,17 @@ msgstr "" msgid "" "The `1:10` bit creates a vector on the fly; you can iterate\n" "over any other vector as well." -msgstr " `1:10` の部分は、ベクトルをその場で作るもので、他のベクトルの間中、繰り返すこともできます。" +msgstr "" +"`1:10` の部分は、ベクトルをその場で作るものです。\n" +"他のベクトルの中身を繰り返すこともできます。" #: r-novice-gapminder/_episodes/07-control-flow.md:267 msgid "" "We can use a `for()` loop nested within another `for()` loop to iterate over two things at\n" "once." -msgstr " `for()` ループを、もうひとつの `for()` ループと入れ子となる形にすれば、2つのことを同時に繰り返すこともできます。" +msgstr "" +"`for()` ループを、もうひとつの `for()` ループと入れ子となる形にすれば、\n" +"2つ同時に繰り返すこともできます。" # code block #: r-novice-gapminder/_episodes/07-control-flow.md:271 @@ -11650,7 +11658,7 @@ msgstr "" #: r-novice-gapminder/_episodes/07-control-flow.md:311 msgid "Rather than printing the results, we could write the loop output to a new object." -msgstr "結果を表示させずに、ループの結果を新しいオブジェクトとして書くこともできます。" +msgstr "結果を表示させずに、ループの結果を新しいオブジェクトに書き込むこともできます。" # code block #: r-novice-gapminder/_episodes/07-control-flow.md:314 @@ -11699,7 +11707,7 @@ msgid "" "it when you are iterating through a lot of values." msgstr "" "このアプローチが役に立つこともありますが、'結果を太らせる' (結果のオブジェクトを\n" -"段々積み上げる)と、演算する上で非効率になります。\n" +"徐々に積み上げる)と、演算する上で非効率になります。\n" "ゆえに、多くの値の間を繰り返すときは避けましょう。" # blockquote, which can be cascaded @@ -11721,15 +11729,15 @@ msgid "" "> store the results in the appropriate location." msgstr "" ">\n" -"> 初心者と経験のあるRユーザーの両方の足を引っ張るループの使い方の一つとして、\n" -"> 結果のオブジェクト(ベクトル、リスト、行列、データフレーム)をループするたびに作ってしまうという\n" -"> ことがあります。\n" +"> 初心者、そして経験のあるRユーザーがよくつまずいてしまう\n" +"> ループの使い方の一つが、結果のオブジェクト\n" +">(ベクトル、リスト、行列、データフレームなど)をループするたびに作ってしまうことです。\n" "> コンピュータはこれを扱うのがとても下手で、すぐに計算が\n" -"> 遅くなります。適当な次元を持つ空の結果オブジェクトを\n" +"> 遅くなってしまいます。適当な次元を持つ空の結果オブジェクトを\n" "> 前もって宣言しておく方が効率的です。\n" -"> もし、上記の行列に蓄積される最後の結果が何になるかを知っていたら、\n" -"> 5行、5列の数列を作成しておいて、それぞれの繰り返しで、適切な場所へ結果を\n" -"> 蓄積しましょう。" +"> もし、上記のように、最後の結果が行列に蓄積されるのを知っていたら、\n" +"> 5行、5列の数列を作成しておいて、それぞれの繰り返しで適切な場所へ結果を\n" +"> 保存しましょう。" #: r-novice-gapminder/_episodes/07-control-flow.md:352 msgid "" @@ -11737,7 +11745,7 @@ msgid "" "For this example, it looks more involved, but is still more efficient." msgstr "" "よりよい方法は、(空の)出力オブジェクトを、値を埋める前に宣言することです。\n" -"この例では、より複雑に見えますが、それでもより効率的です。" +"この例では、より複雑に見えますが、より効率的です。" # code block #: r-novice-gapminder/_episodes/07-control-flow.md:356 @@ -11819,7 +11827,7 @@ msgid "" msgstr "" ">\n" ">\n" -"> ときには、ある条件が満たされるまで繰り返す必要がある場合に出くわすこともあるでしょう。\n" +"> 時には、ある条件が満たされるまで繰り返す必要があります。\n" "> これは、 `while()` ループを使えばできます。\n" ">\n" "> \n" @@ -11830,7 +11838,8 @@ msgstr "" "> ~~~\n" "> {: .language-r}\n" ">\n" -"> 例として、このwhileループは一様分布(`runif()` 関数)から0.1よりも小さい数を得るまで、\n" +"> 例として、このwhileループは\n" +"> 一様分布(`runif()` 関数)から0.1よりも小さい数を得るまで、\n" "> 0から1の間で乱数を生成します。\n" ">\n" "> ~~~\n" @@ -11854,7 +11863,7 @@ msgid "" msgstr "" ">\n" "> `while()` ループは、いつも適当であるとは言えません。特に、条件が決して満たされないことによる\n" -"> 無限ループに陥らないように特に注意する必要があります。" +"> 無限ループに陥らないように注意する必要があります。" #: r-novice-gapminder/_episodes/07-control-flow.md:413 msgid "" @@ -11914,9 +11923,9 @@ msgid "" "> > {: .language-r}" msgstr "" ">\n" -"> `output_vector` と `output_vector2` のオブジェクトを比較しましょう。\n" +"> `output_vector` と `output_vector2` のオブジェクトを比較してみましょう。\n" "> 同じですか?もし違ったら、なぜそうなったのでしょう?\n" -"> `output_vector2` の最後のコードのかたまりを `output_vector` と同じにするには、どう変えればよいでしょうか?\n" +"> `output_vector2` の最後のコードのかたまりを `output_vector` と同じにするには、どう変えればいいのでしょうか?\n" ">\n" "> > ## チャレンジ2の解答\n" "> > 2つのベクトルが同じかを調べるために、 `all()` 関数を使いましょう:\n" @@ -11937,30 +11946,30 @@ msgstr "" "> > all(output_vector2 %in% output_vector)\n" "> > ~~~\n" "> > {: .language-r}\n" -"> > それゆえ、`output_vector` と `output_vector2` の要素は、違う順番で蓄積されただけです。\n" -"> > この理由は、 `as.vector()` は列ごとに行列に要素を入力する形で出力するからです。\n" -"> > `output_matrix` を見てみると、要素を行ごとに欲しいということに気づくでしょう。\n" -"> > 解決方法は、 `output_matrix` を転置することです。転置関数 `t()` を呼ぶか、\n" +"> > ですので、`output_vector` と `output_vector2` の要素は、違う順番で蓄積されただけみたいです。\n" +"> > 理由は、 `as.vector()` は列ごとに行列から要素を出力するからです。\n" +"> > `output_matrix` を見てみると、要素を行ごとに出力して欲しいことに気づくでしょう。\n" +"> > 解決方法は、 `output_matrix` を転置することです。転置関数 `t()` を使うか、\n" "> > 要素を正しい順番で入力するか、いずれかの方法で対応可能です。\n" -"> > 最初の解決方法は、もともとのものを次の形で変更する必要があります:\n" +"> > 最初の解決方法は、元の形である\n" "> > \n" "> > ~~~\n" "> > output_vector2 <- as.vector(output_matrix)\n" "> > ~~~\n" "> > {: .language-r}\n" -"> > を、以下へ\n" +"> > を、次のように変えないといけません:\n" "> > \n" "> > ~~~\n" "> > output_vector2 <- as.vector(t(output_matrix))\n" "> > ~~~\n" "> > {: .language-r}\n" -"> > 二番目の解決方法は、次のように変える必要があります:\n" +"> > 二番目の解決方法は、以下を:\n" "> > \n" "> > ~~~\n" "> > output_matrix[i, j] <- temp_output\n" "> > ~~~\n" "> > {: .language-r}\n" -"> > を、以下へ。\n" +"> > 次のように変えます:\n" "> > \n" "> > ~~~\n" "> > output_matrix[j, i] <- temp_output\n" @@ -12031,7 +12040,7 @@ msgstr "" ">\n" "> > ## チャレンジ3の解答\n" "> >\n" -"> > **手順1**:大陸ベクトルから、確実に全ての唯一無二な値を抜き出せるかを確かめましょう。\n" +"> > **手順1**:大陸ベクトルから、確実に全ての固有の値を抜き出せるかを確かめましょう。\n" "> > \n" "> > ~~~\n" "> > gapminder <- read.csv(\"data/gapminder_data.csv\")\n" @@ -12040,10 +12049,10 @@ msgstr "" "> > {: .language-r}\n" "> >\n" "> > **手順2**:これらの大陸のそれぞれにループをし、その `部分集合` データごとに平均余命を出す必要があります。\n" -"> > それは次の形でできます:\n" +"> > それは次のようにすればできます:\n" "> >\n" -"> > 1. '大陸(continent)' の唯一無二の値のそれぞれについてループする\n" -"> > 2. 大陸のそれぞれの値ごとに、この部分集合の平均余命を蓄積する一時的な変数を作る\n" +"> > 1. '大陸(continent)' の固有の値のそれぞれについてループする\n" +"> > 2. 大陸のそれぞれの値ごとに、部分集合の平均余命を蓄積する一時的な変数を作る\n" "> > 3. 計算した平均余命を返し、 出力を表示させる:\n" "> >\n" "> > \n" @@ -12056,11 +12065,11 @@ msgstr "" "> > ~~~\n" "> > {: .language-r}\n" "> >\n" -"> > **手順3**:演習は、平均余命が50歳以上かどうかの結果だけを出力したいというものでした。\n" -"> > ゆえに、 `if` 条件を、表示させる前につける必要があります。これは、演算された平均余命が基準値以上か、基準値未満かを判別し、結果によって出力を表示させる必要があります。\n" -"> > 上から (3) を修正する必要があります:\n" +"> > **手順3**:この演習では、平均余命が50歳以上かどうかの結果だけを出力するものでした。\n" +"> > ゆえに、結果を表示させる前に `if` 条件をつけて、演算された平均余命が基準値以上か、基準値未満かを判別し、結果によって正しい出力を表示させる必要があります。\n" +"> > これを踏まえて、上の (3) を修正する必要があります:\n" "> >\n" -"> > 3a. もし計算された平均余命が、ある基準(50歳)未満の場合、大陸と、平均余命は基準未満であるという宣言を、そうでない場合は、大陸と、平均余命は基準値以上であるという宣言を返しなさい:\n" +"> > 3a. もし計算された平均余命が、ある基準(50歳)未満の場合、大陸と平均余命は基準未満であるという宣言を、そうでない場合は、大陸と平均余命は基準値以上であるという宣言を返す:\n" "> >\n" "> > \n" "> > ~~~\n" @@ -12113,8 +12122,8 @@ msgid "" "> > {: .language-r}" msgstr "" ">\n" -"> チャレンジ3のスクリプトをそれぞれの国とごとにループする形で修正しなさい。\n" -"> 今回は、平均余命は、50歳未満か、50歳以上70歳未満か、70歳以上かを\n" +"> チャレンジ3のスクリプトをそれぞれの国ごとにループする形に直してください。\n" +"> 今回は、平均余命は50歳未満か、50歳以上70歳未満か、70歳以上かを\n" "> 表示しましょう。\n" ">\n" "> > ## チャレンジ4の解答\n" @@ -12206,14 +12215,14 @@ msgid "" msgstr "" ">\n" "> `gapminder` データセットで、それぞれの国ごとにループするスクリプトを書き、\n" -">国が 'B' で始まるかどうかをテストし、平均余命が50歳以下の場合、平均余命を\n" +"> 国が 'B' で始まるかどうかをテストし、平均余命が50歳以下の場合、平均余命を\n" "> 時間ごとの移り変わりで示した線グラフを書きましょう。\n" ">\n" "> > ## チャレンジ5の解答\n" "> >\n" "> > シェルのレッスンで紹介した`grep` コマンドを「B」で始まる国を見つけるために使います。\n" -"> > まず、これをどういうふうにするかを理解しましょう。\n" -"> > シェル節に従って、以下を試してみたいと思うかもしれません:\n" +"> > まず、これをどうやって使うかを理解しましょう。\n" +"> > シェル節に従って、以下を試してみようと思うかもしれません:\n" "> > \n" "> > ~~~\n" "> > grep(\"^B\", unique(gapminder$country))\n" @@ -12221,7 +12230,7 @@ msgstr "" "> > {: .language-r}\n" "> >\n" "> > でも、このコマンドを演算すると、順序なし因子変数 `country` の「B」で始まる要素番号を返します。\n" -"> > 値を得るためには、 `grep` コマンドの、`value=TRUE` オプションを加える必要があります:\n" +"> > 値を得るためには、 `grep` コマンドの`value=TRUE` オプションを加える必要があります:\n" "> >\n" "> > \n" "> > ~~~\n" @@ -12229,7 +12238,7 @@ msgstr "" "> > ~~~\n" "> > {: .language-r}\n" "> >\n" -"> > これらの国々をcandidateCountriesと呼ぶ変数に蓄積し、その変数のそれぞれでループするようにしましょう。\n" +"> > これらの国々をcandidateCountriesと呼ぶ変数に蓄積し、その変数のそれぞれをループするようにしましょう。\n" "> > そのループの中で、それぞれの国の平均余命を演算子、もし平均余命が50歳未満でったら、平均余命の進展をみるために、`with()` と`subset()`を使い、base-plotを用いてプロットしましょう:\n" "> >\n" "> > \n" @@ -12285,7 +12294,7 @@ msgstr "" "---\n" "# Please do not edit this file directly; it is auto generated.\n" "# Instead, please edit 08-plot-ggplot2.md in _episodes_rmd/\n" -"タイトル: ggplot2 を用いたパブリッシュ出来るグラフィックスの作成\n" +"title: ggplot2 を用いたパブリッシュ出来るグラフィックスの作成\n" "講義: 60 分\n" "練習: 20 分\n" "質問:\n" @@ -13278,14 +13287,14 @@ msgstr "" "---\n" "# Please do not edit this file directly; it is auto generated.\n" "# Instead, please edit 09-vectorization.md in _episodes_rmd/\n" -"タイトル: ベクトル化\n" -"講義: 10 分\n" -"演習: 15 分\n" -"質問:\n" +"title: ベクトル化\n" +"teaching: 10 分\n" +"exercises: 15 分\n" +"questions:\n" "- \"ベクトルの全要素はどうしたら一括で操作出来ますか?\"\n" -"目標:\n" +"objectives:\n" "- \"R におけるベクトル化された操作を理解しましょう。\"\n" -"キーポイント:\n" +"keypoints:\n" "- \"ループの代わりにベクトル化を利用します。\"\n" "source: Rmd\n" "---" @@ -14193,19 +14202,19 @@ msgstr "" "---\n" "# Please do not edit this file directly; it is auto generated.\n" "# Instead, please edit 10-functions.md in _episodes_rmd/\n" -"タイトル: 関数について\n" -"講義: 45 分\n" -"演習: 15 分\n" -"質問:\n" +"title: 関数について\n" +"teaching: 45 分\n" +"exercises: 15 分\n" +"questions:\n" "- \"R で関数はどのように書きますか?\"\n" -"目標:\n" +"objectives:\n" "- \"引数を持つ関数を定義しましょう。\"\n" "- \"関数から値を返しましょう。\"\n" "- \"関数の中で `stopifnot()` を使って引数の状態を検査しましょう。\"\n" "- \"関数をテストしましょう。\"\n" "- \"関数の引数に既定値を指定しましょう。\"\n" "- \"なぜプログラムを小さな一つの目的を持つ関数に分けるべきか説明出来るようになりましょう。\"\n" -"キーポイント:\n" +"keypoints:\n" "- \"`function` を使って R で新しい関数を定義する。\"\n" "- \"パラメーターを用いて関数に値を渡す。\"\n" "- \"`stopifnot()` を使って R の関数の引数を柔軟に検査する。\"\n" @@ -15479,13 +15488,13 @@ msgstr "" "# Please do not edit this file directly; it is auto generated.\n" "# Instead, please edit 11-writing-data.md in _episodes_rmd/\n" "title: データの書き込み\n" -"講義: 10 分\n" -"演習: 10 分\n" -"質問:\n" +"teaching: 10\n" +"exercises: 10\n" +"questions:\n" "- \"R で作成したプロットやデータを保存するにはどうすればよいですか?\"\n" -"目標:\n" +"objectives:\n" "- \"R からプロットやデータを書き出せるようになりましょう。\"\n" -"キーポイント:\n" +"keypoints:\n" "- \"'Export' ボタンを使って RStudio からプロットの保存が出来る。\"\n" "- \"`write.table` を使って表形式のデータの保存が出来る。\"\n" "source: Rmd\n" @@ -15494,15 +15503,15 @@ msgstr "" # header #: r-novice-gapminder/_episodes/11-writing-data.md:20 msgid "## Saving plots" -msgstr "## Saving plots" +## 図の保存 #: r-novice-gapminder/_episodes/11-writing-data.md:22 msgid "" "You have already seen how to save the most recent plot you create in `ggplot2`,\n" "using the command `ggsave`. As a refresher:" msgstr "" -"You have already seen how to save the most recent plot you create in `ggplot2`,\n" -"using the command `ggsave`. As a refresher:" +"`ggsave` 関数を使って、`ggplot2` を用いて作った直近の図を保存する方法は既に学んだ通りです。\n" +"おさらいしておきましょう。" # code block #: r-novice-gapminder/_episodes/11-writing-data.md:26 @@ -15521,9 +15530,8 @@ msgid "" "in the 'Plot' window. This will give you the option of saving as a\n" ".pdf or as .png, .jpg or other image formats." msgstr "" -"You can save a plot from within RStudio using the 'Export' button\n" -"in the 'Plot' window. This will give you the option of saving as a\n" -".pdf or as .png, .jpg or other image formats." +"RStudio から図を保存するには \"Plot\" ウィンドウにある \"Export\" ボタンを使います。\n" +"この機能を使うと、図を .pdf や .png、.jpg など様々な画像形式で保存することができます。 #: r-novice-gapminder/_episodes/11-writing-data.md:35 msgid "" @@ -15534,12 +15542,10 @@ msgid "" "each subset, and you want to save each plot, but obviously can't stop\n" "the loop to click 'Export' for each one." msgstr "" -"Sometimes you will want to save plots without creating them in the\n" -"'Plot' window first. Perhaps you want to make a pdf document with\n" -"multiple pages: each one a different plot, for example. Or perhaps\n" -"you're looping through multiple subsets of a file, plotting data from\n" -"each subset, and you want to save each plot, but obviously can't stop\n" -"the loop to click 'Export' for each one." +"図を \"Plot\" ウィンドウに表示することなく保存したいこともあるでしょう。\n" +"ページごとに一つの図を含むような複数のページから成る PDF を出力したいこともあるでしょう。\n" +"あるいはループを使ってファイル中のデータの絞り込み条件を変えながら複数の図を作成していて、\n" +"一つずつ保存するためにいちいちループを止めて \"Export\" ボタンを押すことが不可能な場合もあるでしょう。" #: r-novice-gapminder/_episodes/11-writing-data.md:42 msgid "" @@ -15547,9 +15553,9 @@ msgid "" "`pdf` creates a new pdf device. You can control the size and resolution\n" "using the arguments to this function." msgstr "" -"In this case you can use a more flexible approach. The function\n" -"`pdf` creates a new pdf device. You can control the size and resolution\n" -"using the arguments to this function." +"このような場合、より柔軟な方法を使います。\n" +"`pdf` 関数は新たに PDF デバイスを作ります。\n" +"この関数に引数を指定することで、サイズや解像度を調整できます。" # code block #: r-novice-gapminder/_episodes/11-writing-data.md:47 @@ -15571,14 +15577,14 @@ msgstr "" " geom_line() +\n" " theme(legend.position = \"none\")\n" "\n" -"# You then have to make sure to turn off the pdf device!\n" +"# PDF デバイスを確実に終了しておく必要があります!\n" "\n" "dev.off()\n" "~~~" #: r-novice-gapminder/_episodes/11-writing-data.md:59 msgid "Open up this document and have a look." -msgstr "Open up this document and have a look." +msgstr "このドキュメントを開いて内容を確認してみましょう。" #: r-novice-gapminder/_episodes/11-writing-data.md:62 msgid "" @@ -15601,10 +15607,12 @@ msgid "" "> > {: .language-r}" msgstr "" ">\n" -"> Rewrite your 'pdf' command to print a second\n" -"> page in the pdf, showing a facet plot (hint: use `facet_grid`)\n" -"> of the same data with one panel per continent.\n" + +"> `pdf` コマンドを書き直して、2ページ目に同じデータを `continent` ごとにファセットした図を出力してみましょう (ヒント: `facet_grid` を使います)。\n" +"> > ## チャレンジ1の解答\n" "> > ## Solution to challenge 1\n" +"> `pdf` コマンドを書き直して、2ページ目に同じデータを `continent` ごとにファセットした図を出力してみましょう (ヒント: `facet_grid` を使います)。\n" +"> > ## チャレンジ1の解答\n" "> >\n" "> > \n" "> > ~~~\n" @@ -15623,36 +15631,40 @@ msgid "" "The commands `jpeg`, `png` etc. are used similarly to produce\n" "documents in different formats." msgstr "" -"The commands `jpeg`, `png` etc. are used similarly to produce\n" -"documents in different formats." +"同様にして `jepg` や `png` などのコマンドを使うことで、他の形式のドキュメントを作成できます。" # header #: r-novice-gapminder/_episodes/11-writing-data.md:86 msgid "## Writing data" -msgstr "## Writing data" +msgstr "## データの出力" #: r-novice-gapminder/_episodes/11-writing-data.md:88 msgid "At some point, you'll also want to write out data from R." -msgstr "At some point, you'll also want to write out data from R." +msgstr "R からデータを出力したいこともあります。" #: r-novice-gapminder/_episodes/11-writing-data.md:90 msgid "" "We can use the `write.table` function for this, which is\n" "very similar to `read.table` from before." msgstr "" -"We can use the `write.table` function for this, which is\n" -"very similar to `read.table` from before." +"これには、既に使った `read.table` 関数とよく似た `write.table` 関数を使います。" #: r-novice-gapminder/_episodes/11-writing-data.md:93 msgid "" "Let's create a data-cleaning script, for this analysis, we\n" "only want to focus on the gapminder data for Australia:" msgstr "" -"Let's create a data-cleaning script, for this analysis, we\n" -"only want to focus on the gapminder data for Australia:" +"データを綺麗にするスクリプトを書きましょう。\n" +"今回の分析では、gapminder データの中のオーストラリアに該当する部分だけを使います。" # code block #: r-novice-gapminder/_episodes/11-writing-data.md:97 +"Let's switch back to the shell to take a look at the data to make sure it looks\n" +"OK:" +msgstr "" +"シェルに戻ってデータが正しく出力されているか確認しましょう。" +"OK:" + msgid "" "~~~\n" "aust_subset <- gapminder[gapminder$country == \"Australia\",]\n" @@ -15677,11 +15689,20 @@ msgid "" "Let's switch back to the shell to take a look at the data to make sure it looks\n" "OK:" msgstr "" -"Let's switch back to the shell to take a look at the data to make sure it looks\n" +"シェルに戻ってデータが正しく出力されているか確認しましょう" "OK:" # code block #: r-novice-gapminder/_episodes/11-writing-data.md:111 +msid "" +"Hmm, that's not quite what we wanted. Where did all these\n" +"quotation marks come from? Also the row numbers are\n" +"meaningless." +msgstr "" +"どうやら望んだ通りに出力されていません。引用符はどこから来たのでしょうか。\n" +"また、行番号には意味がありません。" + + #: r-novice-gapminder/_episodes/11-writing-data.md:165 msgid "" "~~~\n" @@ -15727,17 +15748,15 @@ msgid "" "quotation marks come from? Also the row numbers are\n" "meaningless." msgstr "" -"Hmm, that's not quite what we wanted. Where did all these\n" -"quotation marks come from? Also the row numbers are\n" -"meaningless." +"どうやら望んだ通りに出力されていません。引用符はどこから来たのでしょうか。\n" +"また、行番号には意味がありません。" #: r-novice-gapminder/_episodes/11-writing-data.md:137 msgid "" "Let's look at the help file to work out how to change this\n" "behaviour." msgstr "" -"Let's look at the help file to work out how to change this\n" -"behaviour." +msgstr "ヘルプファイルを見てこの動作を変更しましょう。" # code block #: r-novice-gapminder/_episodes/11-writing-data.md:141 @@ -15756,13 +15775,12 @@ msgid "" "when writing out to file. It will also write out the row and\n" "column names." msgstr "" -"By default R will wrap character vectors with quotation marks\n" -"when writing out to file. It will also write out the row and\n" -"column names." +"既定では、R は文字列をファイルに出力する時に引用符で囲みます。\n" +"また、行と列の名前も出力します。" #: r-novice-gapminder/_episodes/11-writing-data.md:150 msgid "Let's fix this:" -msgstr "Let's fix this:" +msgstr "以下のように修正しましょう。" # code block #: r-novice-gapminder/_episodes/11-writing-data.md:153 @@ -15785,7 +15803,7 @@ msgstr "" #: r-novice-gapminder/_episodes/11-writing-data.md:162 msgid "Now lets look at the data again using our shell skills:" -msgstr "Now lets look at the data again using our shell skills:" +msgstr "もう一度シェルを使ってデータを確認してみましょう。" # code block #: r-novice-gapminder/_episodes/11-writing-data.md:173 @@ -15818,7 +15836,7 @@ msgstr "" #: r-novice-gapminder/_episodes/11-writing-data.md:187 msgid "That looks better!" -msgstr "That looks better!" +msgstr "よくなりました!" #: r-novice-gapminder/_episodes/11-writing-data.md:190 msgid "" @@ -15841,12 +15859,10 @@ msgid "" "> > {: .language-r}" msgstr "" ">\n" -"> Write a data-cleaning script file that subsets the gapminder\n" -"> data to include only data points collected since 1990.\n" +"> gapminder データを1990年以降のデータのみに絞り込むスクリプトを書いて下さい。\n" ">\n" -"> Use this script to write out the new subset to a file\n" -"> in the `cleaned-data/` directory.\n" -"> > ## Solution to challenge 2\n" +"> このスクリプトを使って絞り込んだ結果を `cleaned-data/` ディレクトリ中のファイルに出力しましょう。\n" +"> > ## チャレンジ2の解答\n" "> >\n" "> > \n" "> > ~~~\n" @@ -15880,13 +15896,13 @@ msgstr "" "# Please do not edit this file directly; it is auto generated.\n" "# Instead, please edit 12-plyr.md in _episodes_rmd/\n" "title: Splitting and Combining Data Frames with plyr によるデータの分離と併合\n" -"講義: 30 分\n" -"演習: 30 分\n" -"質問:\n" +"teaching: 30 分\n" +"exercises: 30 分\n" +"questions:\n" "- \"異なるデータセットに異なる計算を施すにはどうすればよいですか?\"\n" -"目標:\n" +"objectives:\n" "- \"`split-apply-combine (分離-施工-併合)` をデータ分析に使えるようになりましょう。\"\n" -"キーポイント:\n" +"keypoints:\n" "- \"`plyer` パッケージを使用して、データの分離、部分化されたデータに関数の適用、そして結果を併合する。\"\n" "source: Rmd\n" "---" @@ -15898,10 +15914,10 @@ msgid "" "and multiplies the population and GDP per capita column. We also defined\n" "additional arguments so we could filter by `year` and `country`:" msgstr "" -"Previously we looked at how you can use functions to simplify your code.\n" -"We defined the `calcGDP` function, which takes the gapminder dataset,\n" -"and multiplies the population and GDP per capita column. We also defined\n" -"additional arguments so we could filter by `year` and `country`:" +"ここまでに、関数がコードをシンプルにするために使えるということをお伝えしました。\n" +"gapminder データセットを使って、人口の列と1人当たりのGDP(国内総生産)の列を掛ける\n" +"関数 `calcGDP` を定義し、更に、\n" +"`year` と `country` でフィルターできる引数を追加で、定義しましたよね。" #: r-novice-gapminder/_episodes/12-plyr.md:42 msgid "" @@ -15910,14 +15926,13 @@ msgid "" "simply calculating the GDP by multiplying two columns together. But what if\n" "we wanted to calculated the mean GDP per continent?" msgstr "" -"A common task you'll encounter when working with data, is that you'll want to\n" -"run calculations on different groups within the data. In the above, we were\n" -"simply calculating the GDP by multiplying two columns together. But what if\n" -"we wanted to calculated the mean GDP per continent?" +"データを使うときに、データにあるグループごとに計算を実行してみたいと思うことが、よくあります。\n" +"先ほどの例では、単純に二つの列を掛け合わせることでGDPを計算しました。\n" +"では、大陸ごとに平均GDPを計算したいときは、どうすればよいでしょうか。" #: r-novice-gapminder/_episodes/12-plyr.md:47 msgid "We could run `calcGDP` and then take the mean of each continent:" -msgstr "We could run `calcGDP` and then take the mean of each continent:" +msgstr "`calcGDP` を実行してから、それぞれの大陸の平均をとることもできます:" # code block #: r-novice-gapminder/_episodes/12-plyr.md:50 @@ -15994,22 +16009,22 @@ msgid "" "repetition. Repeating yourself will cost you time, both now and later, and\n" "potentially introduce some nasty bugs." msgstr "" -"But this isn't very *nice*. Yes, by using a function, you have reduced a\n" -"substantial amount of repetition. That **is** nice. But there is still\n" -"repetition. Repeating yourself will cost you time, both now and later, and\n" -"potentially introduce some nasty bugs." +"でも、これはあまり*おススメ*ではありません。そうです。ある関数を使えば、\n" +"いくつもの繰り返し作業を減らすことができます。それ **は**、おススメです。\n" +"それでも、繰り返し作業はあります。繰り返し作業は、その時点だけでなく\n" +"その後も、時間を食います。そして、嫌なバグが起こる原因にもなりえます。" #: r-novice-gapminder/_episodes/12-plyr.md:96 msgid "" "We could write a new function that is flexible like `calcGDP`, but this\n" "also takes a substantial amount of effort and testing to get right." msgstr "" -"We could write a new function that is flexible like `calcGDP`, but this\n" -"also takes a substantial amount of effort and testing to get right." +"`calcGDP` のような、新しい関数を書くこともできます。\n" +"でも、ちゃんとしたものを作るには、かなりの労力と確認が必要になるでしょう。" #: r-novice-gapminder/_episodes/12-plyr.md:99 msgid "The abstract problem we're encountering here is know as \"split-apply-combine\":" -msgstr "The abstract problem we're encountering here is know as \"split-apply-combine\":" +msgstr "ここで直面している抽象的な問題は、 「split-apply-combine(分けてー適用してーまとめる)」ものとしてよく知られています:" #: r-novice-gapminder/_episodes/12-plyr.md:101 msgid "![Split apply combine](../fig/12-plyr-fig1.png)" @@ -16021,14 +16036,13 @@ msgid "" "some calculations on that group, then optionally *combine* the results\n" "together afterwards." msgstr "" -"We want to *split* our data into groups, in this case continents, *apply*\n" -"some calculations on that group, then optionally *combine* the results\n" -"together afterwards." +"データを(この例では大陸別に)グループ *分け* し、そのグループへある計算を\n" +" *適用*し、できればその後に、結果を *まとめ* たいのです。" # header #: r-novice-gapminder/_episodes/12-plyr.md:107 msgid "## The `plyr` package" -msgstr "## The `plyr` package" +msgstr "## `plyr` パッケージ" #: r-novice-gapminder/_episodes/12-plyr.md:109 msgid "" @@ -16038,15 +16052,15 @@ msgid "" "problem. The [plyr](http://had.co.nz/plyr/) package provides a set of\n" "functions that we find more user friendly for solving this problem." msgstr "" -"For those of you who have used R before, you might be familiar with the\n" -"`apply` family of functions. While R's built in functions do work, we're\n" -"going to introduce you to another method for solving the \"split-apply-combine\"\n" -"problem. The [plyr](http://had.co.nz/plyr/) package provides a set of\n" -"functions that we find more user friendly for solving this problem." +"Rを使ったことがある人なら、`apply`系の関数は、既にご存知かもしれません。\n" +"Rに元々ある関数でもよいのですが、この「split-apply-combine」問題を解決する\n" +"他の方法を紹介しましょう。\n" +"[plyr](http://had.co.nz/plyr/) パッケージには、よりお手軽に、\n" +"この問題を解決できる関数たちがあります。" #: r-novice-gapminder/_episodes/12-plyr.md:115 msgid "We installed this package in an earlier challenge. Let's load it now:" -msgstr "We installed this package in an earlier challenge. Let's load it now:" +msgstr "このパッケージを、以前のチャレンジで、インストールしましたので、ここでロードしてみましょう:" # code block #: r-novice-gapminder/_episodes/12-plyr.md:118 @@ -16064,23 +16078,23 @@ msgid "" "Plyr has functions for operating on `lists`, `data.frames` and `arrays`\n" "(matrices, or n-dimensional vectors). Each function performs:" msgstr "" -"Plyr has functions for operating on `lists`, `data.frames` and `arrays`\n" -"(matrices, or n-dimensional vectors). Each function performs:" +"Plyrには、`lists(リスト)`、`data.frames(データフレーム)` 及び `arrays(列)`(行列またはn-次元のベクトル)\n" +"に実行できる関数があります。それぞれの関数は以下を実行します:" # ordered list #: r-novice-gapminder/_episodes/12-plyr.md:126 msgid "1. A **split**ting operation" -msgstr "1. A **split**ting operation" +msgstr "1. **分ける** 作業" # ordered list #: r-novice-gapminder/_episodes/12-plyr.md:127 msgid "2. **Apply** a function on each split in turn." -msgstr "2. **Apply** a function on each split in turn." +msgstr "2. 分割したそれぞれへの関数の **適用**" # ordered list #: r-novice-gapminder/_episodes/12-plyr.md:128 msgid "3. Re**combine** output data as a single data object." -msgstr "3. Re**combine** output data as a single data object." +msgstr "3. 出力データを再度ひとつのデータオブジェクトとして**まとめる**" #: r-novice-gapminder/_episodes/12-plyr.md:130 msgid "" @@ -16090,11 +16104,9 @@ msgid "" "the second letter to the output data structure, and then the rest of the\n" "function is named \"ply\"." msgstr "" -"The functions are named based on the data structure they expect as input,\n" -"and the data structure you want returned as output: [a]rray, [l]ist, or\n" -"[d]ata.frame. The first letter corresponds to the input data structure,\n" -"the second letter to the output data structure, and then the rest of the\n" -"function is named \"ply\"." +"関数は、入力されるだろうデータ構造と出力予定のデータ構造に基づき名付けられています。\n" +"つまり、[a]rray、[l]ist、または[d]ata.frameのことです。最初の文字が、入力データ構造、\n" +"次の文字が出力データ構造、そして、残りが「ply」と名付けられた関数です。" #: r-novice-gapminder/_episodes/12-plyr.md:136 msgid "" @@ -16103,18 +16115,17 @@ msgid "" "They're named by their input data type and represent null output by a `_` (see\n" "table)" msgstr "" -"This gives us 9 core functions **ply. There are an additional three functions\n" -"which will only perform the split and apply steps, and not any combine step.\n" -"They're named by their input data type and represent null output by a `_` (see\n" -"table)" +"これが **plyの9つの中心的な関数です。加えて、分けて適用することだけで、まとめを実行しない\n" +"関数が3つあります。それらは、入力データ型と出力データがないことを示す\n" +" `_` から名付けられています(表参照)。" #: r-novice-gapminder/_episodes/12-plyr.md:141 msgid "" "Note here that plyr's use of \"array\" is different to R's,\n" "an array in ply can include a vector or matrix." msgstr "" -"Note here that plyr's use of \"array\" is different to R's,\n" -"an array in ply can include a vector or matrix." +"ここで、plyrの「array」の使用法は、Rの使用法と違うことに気をつけましょう。\n" +"plyのarrayは、ベクトルや行列も含めます。" #: r-novice-gapminder/_episodes/12-plyr.md:144 msgid "![Full apply suite](../fig/12-plyr-fig2.png)" @@ -16125,8 +16136,8 @@ msgid "" "Each of the xxply functions (`daply`, `ddply`, `llply`, `laply`, ...) has the\n" "same structure and has 4 key features and structure:" msgstr "" -"Each of the xxply functions (`daply`, `ddply`, `llply`, `laply`, ...) has the\n" -"same structure and has 4 key features and structure:" +"xxply関数(`daply` 、 `ddply` 、 `llply` 、 `laply`、などなど)は、\n" +"同じ構造で、4つの重要な特徴と構造を持っています:" # code block #: r-novice-gapminder/_episodes/12-plyr.md:151 @@ -16142,26 +16153,26 @@ msgstr "" # unordered list #: r-novice-gapminder/_episodes/12-plyr.md:156 msgid "* The first letter of the function name gives the input type and the second gives the output type." -msgstr "* The first letter of the function name gives the input type and the second gives the output type." +msgstr "* 関数名の最初の文字が、入力型、次の文字が出力型を示します。" # unordered list #: r-novice-gapminder/_episodes/12-plyr.md:157 msgid "* .data - gives the data object to be processed" -msgstr "* .data - gives the data object to be processed" +msgstr "* .data -処理されるデータオブジェクトを示します。" # unordered list #: r-novice-gapminder/_episodes/12-plyr.md:158 msgid "* .variables - identifies the splitting variables" -msgstr "* .variables - identifies the splitting variables" +msgstr "* .variables-分割する変数を指定します。" # unordered list #: r-novice-gapminder/_episodes/12-plyr.md:159 msgid "* .fun - gives the function to be called on each piece" -msgstr "* .fun - gives the function to be called on each piece" +msgstr "* .fun-それぞれに適用する関数を示します。" #: r-novice-gapminder/_episodes/12-plyr.md:161 msgid "Now we can quickly calculate the mean GDP per continent:" -msgstr "Now we can quickly calculate the mean GDP per continent:" +msgstr "それでは、大陸別の平均GDPを計算してみましょう:" # code block #: r-novice-gapminder/_episodes/12-plyr.md:164 @@ -16205,12 +16216,12 @@ msgstr "" #: r-novice-gapminder/_episodes/12-plyr.md:185 msgid "Let's walk through the previous code:" -msgstr "Let's walk through the previous code:" +msgstr "このコードを、ひとつずつ見てみましょう:" # unordered list #: r-novice-gapminder/_episodes/12-plyr.md:187 msgid "- The `ddply` function feeds in a `data.frame` (function starts with **d**) and" -msgstr "- The `ddply` function feeds in a `data.frame` (function starts with **d**) and" +msgstr "- `ddply` 関数は、`data.frame` を使い(関数は、**d**から始まりますね)、" #: r-novice-gapminder/_episodes/12-plyr.md:188 msgid "" @@ -16227,18 +16238,15 @@ msgid "" " function: we haven't defined it elsewhere, and it has no name. It only exists\n" " in the scope of our call to `ddply`." msgstr "" -"returns another `data.frame` (2nd letter is a **d**) i\n" -"- the first argument we gave was the data.frame we wanted to operate on: in this\n" -" case the gapminder data. We called `calcGDP` on it first so that it would have\n" -" the additional `gdp` column added to it.\n" -"- The second argument indicated our split criteria: in this case the \"continent\"\n" -" column. Note that we gave the name of the column, not the values of the column like we had done previously with subsetting. Plyr takes care of these\n" -" implementation details for you.\n" -"- The third argument is the function we want to apply to each grouping of the\n" -" data. We had to define our own short function here: each subset of the data\n" -" gets stored in `x`, the first argument of our function. This is an anonymous\n" -" function: we haven't defined it elsewhere, and it has no name. It only exists\n" -" in the scope of our call to `ddply`." +"もうひとつの`data.frame`を出力します(2番目の文字は、**d**ですね)\n" +"- 最初の引数は、使いたいdata.frameでしたね。つまり、ここでは、\n" +"gapminderデータです。そこに、`gdp`(国内総生産) の列を加えるために、まず `calcGDP` を使いましょう。\n" +"- 次の引数は、分割基準を、つまり、ここでは「continent」(大陸)列です。\n" +" 以前、分部集合に分けるときに使った値の名前ではなく、ここでは列の名前を使うことに気を付けましょう。Plyrが細かい実行上の詳細を、代わりに処理してくれますので。\n" +"- 3番目の引数は、データのそれぞれのグループに当てはめる関数です。\n" +" ここで、自分で短い関数を定義しておかなければなりません。\n" +" データのそれぞれの部分集合が、その関数の最初の引数の`x` に保存されます。\n" +" これは、名前のない関数です。つまり、他のところで定義していないもので、名前がないものです。それは、 `ddply` が呼び出されている間だけ、存在します。" #: r-novice-gapminder/_episodes/12-plyr.md:202 msgid "" @@ -16247,12 +16255,12 @@ msgid "" "> Which had the shortest?" msgstr "" ">\n" -"> Calculate the average life expectancy per continent. Which has the longest?\n" -"> Which had the shortest?" +"> 大陸別の平均余命を計算してみましょう。一番長いのはどこでしょうか。\n" +"> 一番短いのはどこでしょうか。" #: r-novice-gapminder/_episodes/12-plyr.md:207 msgid "What if we want a different type of output data structure?:" -msgstr "What if we want a different type of output data structure?:" +msgstr "他のデータ構造型での出力が良い場合は、どうすればよいでしょうか。" # code block #: r-novice-gapminder/_episodes/12-plyr.md:210 @@ -16335,12 +16343,12 @@ msgid "" "We called the same function again, but changed the second letter to an `l`, so\n" "the output was returned as a list." msgstr "" -"We called the same function again, but changed the second letter to an `l`, so\n" -"the output was returned as a list." +"また同じ関数を呼び出しましたが、2番目の文字を `l` に変えたので、\n" +"出力されたのは、リストでした。" #: r-novice-gapminder/_episodes/12-plyr.md:252 msgid "We can specify multiple columns to group by:" -msgstr "We can specify multiple columns to group by:" +msgstr "以下で、グループにまとめる列を指定します:" # code block #: r-novice-gapminder/_episodes/12-plyr.md:255 @@ -16568,9 +16576,8 @@ msgid "" "do so).\n" "To replace a for loop, put the code that was in the body of the `for` loop inside an anonymous function." msgstr "" -"You can use these functions in place of `for` loops (and its usually faster to\n" -"do so).\n" -"To replace a for loop, put the code that was in the body of the `for` loop inside an anonymous function." +"これらの関数は `for` ループの代わりに使えます(その方が、普通は早いです)。\n" +"そうするには、`for` ループの本体の中にあったコードを名無し関数に入れましょう。" # code block #: r-novice-gapminder/_episodes/12-plyr.md:373 @@ -16625,7 +16632,7 @@ msgstr "" # blockquote, which can be cascaded #: r-novice-gapminder/_episodes/12-plyr.md:399 msgid "> ## Tip: printing numbers" -msgstr "> ## Tip: printing numbers" +msgstr "> ## ヒント:数を出力する" #: r-novice-gapminder/_episodes/12-plyr.md:400 msgid "" @@ -16634,8 +16641,8 @@ msgid "" "> values \"pretty\" for printing out in messages." msgstr "" ">\n" -"> The `format` function can be used to make numeric\n" -"> values \"pretty\" for printing out in messages." +"> `format` 関数を使えば、数値をメッセージの中で「いい感じ」に\n" +"> 出力できます。" #: r-novice-gapminder/_episodes/12-plyr.md:407 msgid "" @@ -16645,15 +16652,15 @@ msgid "" "> and 2007?" msgstr "" ">\n" -"> Calculate the average life expectancy per continent and year. Which had the\n" -"> longest and shortest in 2007? Which had the greatest change in between 1952\n" -"> and 2007?" +"> 年次の大陸別平均余命を計算しましょう。2007年に\n" +"> 一番長かったのは、短かったのは、どこでしょうか。\n" +"> 1952年から2007にかけて変化が一番大きかったのはどこでしょうか。" # blockquote, which can be cascaded #: r-novice-gapminder/_episodes/12-plyr.md:414 #: r-novice-gapminder/_episodes/13-dplyr.md:572 msgid "> ## Advanced Challenge" -msgstr "> ## Advanced Challenge" +msgstr "> ## 上級チャレンジ" #: r-novice-gapminder/_episodes/12-plyr.md:415 msgid "" @@ -16663,14 +16670,13 @@ msgid "" "> using one of the `plyr` functions." msgstr "" ">\n" -"> Calculate the difference in mean life expectancy between\n" -"> the years 1952 and 2007 from the output of challenge 2\n" -"> using one of the `plyr` functions." +"> `plyr` 関数のひとつを使って、チャレンジ2の出力から、\n" +"> 2007年と1952年の平均余命の差を計算しましょう。" # blockquote, which can be cascaded #: r-novice-gapminder/_episodes/12-plyr.md:421 msgid "> ## Alternate Challenge if class seems lost" -msgstr "> ## Alternate Challenge if class seems lost" +msgstr "> ## チャレンジの別バージョン(クラスがなくなっていた場合)" #: r-novice-gapminder/_episodes/12-plyr.md:422 msgid "" @@ -16730,8 +16736,8 @@ msgid "" ">" msgstr "" ">\n" -"> Without running them, which of the following will calculate the average\n" -"> life expectancy per continent:\n" +"> 実行せずに、以下の中から、大陸別の平均余命を計算するものを選んでみましょう。\n" +"> :\n" ">\n" "> 1.\n" "> \n" @@ -16811,16 +16817,16 @@ msgstr "" "---\n" "# Please do not edit this file directly; it is auto generated.\n" "# Instead, please edit 13-dplyr.md in _episodes_rmd/\n" -"タイトル: Dataframe Manipulation with dplyr\n" -"講義: 40 分\n" -"演習: 15 分\n" -"質問:\n" +"title: Dataframe Manipulation with dplyr\n" +"teaching: 40 分\n" +"exercises: 15 分\n" +"questions:\n" "- \"同じ作業を繰り返すことなく、データフレームを操作するにはどうすればよいです?\"\n" -"目標:\n" +"objectives:\n" "- \"`dplyr` にある 6 つの操作 を パイプ を使用して出来るようになりましょう。.\"\n" "- \"データセットを要約するために `group_by()` と `summarize()` 併用出来ることを理解しましょう。\"\n" "- \"論理フィルターを使用してデータのサブセットを分析出来るようになりましょう。\"\n" -"キーポイント:\n" +"keypoints:\n" "- \"`dplyr` パッケージを使用してデータフレームの操作を行う。\"\n" "- \"データフレームから変数を選択する際は `select()` を使用する。\"\n" "- \"値を基にデータを選択する際は `filter()` を使用する。\"\n" @@ -16836,10 +16842,10 @@ msgid "" "data by a certain variable(s), or we even calculate summary statistics. We can\n" "do these operations using the normal base R operations:" msgstr "" -"Manipulation of dataframes means many things to many researchers, we often\n" -"select certain observations (rows) or variables (columns), we often group the\n" -"data by a certain variable(s), or we even calculate summary statistics. We can\n" -"do these operations using the normal base R operations:" +"多くの研究者にとって、データフレームの操作は、多くのことを意味します。\n" +"よくあるのは、特定の観測値(行)もしくは変数(列)の選択、 特定の変数でのデータのグループ化、\n" +"更には要約する統計値の計算です。\n" +"これらは、普通のRの基本操作で実行できます:" # code block #: r-novice-gapminder/_episodes/13-dplyr.md:30 @@ -16913,14 +16919,13 @@ msgid "" "yourself will cost you time, both now and later, and potentially introduce some\n" "nasty bugs." msgstr "" -"But this isn't very *nice* because there is a fair bit of repetition. Repeating\n" -"yourself will cost you time, both now and later, and potentially introduce some\n" -"nasty bugs." +"でも、これはあまり*おススメ*ではありません。繰り返しがかなりあるからです。\n" +"繰り返し作業は、時間を食います。そして、嫌なバグを起こる原因にもなりえます。" # header #: r-novice-gapminder/_episodes/13-dplyr.md:74 msgid "## The `dplyr` package" -msgstr "## The `dplyr` package" +msgstr "## `dplyr` パッケージ" #: r-novice-gapminder/_episodes/13-dplyr.md:76 msgid "" @@ -16930,19 +16935,20 @@ msgid "" "errors, and probably even save you some typing. As an added bonus, you might\n" "even find the `dplyr` grammar easier to read." msgstr "" -"Luckily, the [`dplyr`](https://cran.r-project.org/web/packages/dplyr/dplyr.pdf)\n" -"package provides a number of very useful functions for manipulating dataframes\n" -"in a way that will reduce the above repetition, reduce the probability of making\n" -"errors, and probably even save you some typing. As an added bonus, you might\n" -"even find the `dplyr` grammar easier to read." +"嬉しいことに、[`dplyr`](https://cran.r-project.org/web/packages/dplyr/dplyr.pdf)\n" +"パッケージには、データフレーム操作に非常に役立つ関数がいくつもあります。\n" +"それを使うと、先ほどみたような繰り返しを減らし、エラーを起こす確率を減らし、\n" +"タイピングする必要性さえも恐らく減らせます。\n" +"更には、`dplyr` の書き方は、とても分かりやすいかもしれません。" #: r-novice-gapminder/_episodes/13-dplyr.md:82 msgid "" "Here we're going to cover 6 of the most commonly used functions as well as using\n" "pipes (`%>%`) to combine them." msgstr "" -"Here we're going to cover 6 of the most commonly used functions as well as using\n" -"pipes (`%>%`) to combine them." +"ここでは、特によく使われる6つの関数と、\n" +"それらを組み合わせるためのパイプ(`%>%`)を紹介します。\n" +"." # ordered list #: r-novice-gapminder/_episodes/13-dplyr.md:85 @@ -16971,7 +16977,7 @@ msgstr "5. `mutate()`" #: r-novice-gapminder/_episodes/13-dplyr.md:91 msgid "If you have have not installed this package earlier, please do so:" -msgstr "If you have have not installed this package earlier, please do so:" +msgstr "もし、このパッケージをまだインストールしていないようでしたら、ここでしておきましょう:" # code block #: r-novice-gapminder/_episodes/13-dplyr.md:94 @@ -16986,7 +16992,7 @@ msgstr "" #: r-novice-gapminder/_episodes/13-dplyr.md:99 msgid "Now let's load the package:" -msgstr "Now let's load the package:" +msgstr "パッケージをロードしましょう:" # code block #: r-novice-gapminder/_episodes/13-dplyr.md:102 @@ -17002,7 +17008,7 @@ msgstr "" # header #: r-novice-gapminder/_episodes/13-dplyr.md:107 msgid "## Using select()" -msgstr "## Using select()" +msgstr "## select() の使用" #: r-novice-gapminder/_episodes/13-dplyr.md:109 msgid "" @@ -17010,9 +17016,9 @@ msgid "" "our dataframe we could use the `select()` function. This will keep only the\n" "variables you select." msgstr "" -"If, for example, we wanted to move forward with only a few of the variables in\n" -"our dataframe we could use the `select()` function. This will keep only the\n" -"variables you select." +"例えば、 データフレームにある、いくつかの変数だけを使って進めたい場合、\n" +"使えるかもしれないのは、`select()` 関数です。\n" +"これを使えば、選択した変数だけをキープすることができます。" # code block #: r-novice-gapminder/_episodes/13-dplyr.md:114 @@ -17037,11 +17043,11 @@ msgid "" "is unlike anything we've seen in R before, let's repeat what we've done above\n" "using pipes." msgstr "" -"If we open up `year_country_gdp` we'll see that it only contains the year,\n" -"country and gdpPercap. Above we used 'normal' grammar, but the strengths of\n" -"`dplyr` lie in combining several functions using pipes. Since the pipes grammar\n" -"is unlike anything we've seen in R before, let's repeat what we've done above\n" -"using pipes." +"もし `year_country_gdp` を開いたら、year、country 及び gdpPercap しかないでしょう。\n" +"これまでは、 '普通の' 書き方を使いましたが、`dplyr` の強みは、複数の関数を\n" +"パイプを使って、組み合わせられることです。\n" +"パイプの書き方は、これまでRで見てきたものとは、\n" +"全く違いますので、上記でしたことをパイプを使って、やってみましょう。" # code block #: r-novice-gapminder/_episodes/13-dplyr.md:128 @@ -17064,26 +17070,23 @@ msgid "" "encountered pipes before in the shell. In R, a pipe symbol is `%>%` while in the\n" "shell it is `|` but the concept is the same!" msgstr "" -"To help you understand why we wrote that in that way, let's walk through it step\n" -"by step. First we summon the gapminder dataframe and pass it on, using the pipe\n" -"symbol `%>%`, to the next step, which is the `select()` function. In this case\n" -"we don't specify which data object we use in the `select()` function since in\n" -"gets that from the previous pipe. **Fun Fact**: There is a good chance you have\n" -"encountered pipes before in the shell. In R, a pipe symbol is `%>%` while in the\n" -"shell it is `|` but the concept is the same!" +"こう書いた理由を理解しやすくするために、ひとつずつ見ていきましょう。\n" +"始めに、gapminder データフレームを呼び出し、パイプの記号`%>%` を使って、\n" +"次の `select()` 関数を使うステップに引き渡します。どのデータオブジェクトを\n" +"`select()` 関数で使うかについては、前のパイプから分かるため、ここでは指定しません。\n" +"**面白い事実**:シェルで、パイプに既に出会っている可能性が高いはずです。\n" +"Rでは、パイプの記号は `%>%` で、シェルでは、 `|` ですが、コンセプトは同じです。" # header #: r-novice-gapminder/_episodes/13-dplyr.md:141 msgid "## Using filter()" -msgstr "## Using filter()" +msgstr "## filter() の使用" #: r-novice-gapminder/_episodes/13-dplyr.md:143 msgid "" "If we now wanted to move forward with the above, but only with European\n" "countries, we can combine `select` and `filter`" -msgstr "" -"If we now wanted to move forward with the above, but only with European\n" -"countries, we can combine `select` and `filter`" +msgstr "欧州のみで、上記を進めたいとしたら、 `select` と `filter` を組み合わせましょう。" # code block #: r-novice-gapminder/_episodes/13-dplyr.md:147 @@ -17118,12 +17121,11 @@ msgid "" "> >{: .language-r}" msgstr "" ">\n" -"> Write a single command (which can span multiple lines and includes pipes) that\n" -"> will produce a dataframe that has the African values for `lifeExp`, `country`\n" -"> and `year`, but not for other Continents. How many rows does your dataframe\n" -"> have and why?\n" +"> アフリカの`lifeExp`、 `country` 及び `year` を持ち、他の大陸を含まないデータフレームを\n" +"> 作るコマンドをひとつ書いてみましょう(複数の行になっても、パイプを使っても大丈夫です)\n" +"> データフレームには、何行ありますか。なぜそうなるのでしょうか。\n" ">\n" -"> > ## Solution to Challenge 1\n" +"> > ## チャレンジ1の解答\n" "> >\n" "> >~~~\n" "> >year_country_lifeExp_Africa <- gapminder %>%\n" @@ -17140,16 +17142,16 @@ msgid "" "case. If we used 'select' first, filter would not be able to find the variable\n" "continent since we would have removed it in the previous step." msgstr "" -"As with last time, first we pass the gapminder dataframe to the `filter()`\n" -"function, then we pass the filtered version of the gapminder dataframe to the\n" -"`select()` function. **Note:** The order of operations is very important in this\n" -"case. If we used 'select' first, filter would not be able to find the variable\n" -"continent since we would have removed it in the previous step." +"以前行ったように、gapminder データフレームを `filter()` 関数に引き渡し、\n" +"フィルターされた バージョンのgapminder データフレームを、 `select()` 関数に引き渡します。\n" +"**注意:** ここでは、操作手順がとても重要です。\n" +"まず 'select' を使うと、その前のステップで、大陸の変数が削除されているため、\n" +"filter で大陸の変数を見つけることができないことでしょう。" # header #: r-novice-gapminder/_episodes/13-dplyr.md:178 msgid "## Using group_by() and summarize()" -msgstr "## Using group_by() and summarize()" +msgstr "## group_by() と summarize() の使用" #: r-novice-gapminder/_episodes/13-dplyr.md:180 msgid "" @@ -17160,12 +17162,10 @@ msgid "" "can use `group_by()`, which will essentially use every unique criteria that you\n" "could have used in filter." msgstr "" -"Now, we were supposed to be reducing the error prone repetitiveness of what can\n" -"be done with base R, but up to now we haven't done that since we would have to\n" -"repeat the above for each continent. Instead of `filter()`, which will only pass\n" -"observations that meet your criteria (in the above: `continent==\"Europe\"`), we\n" -"can use `group_by()`, which will essentially use every unique criteria that you\n" -"could have used in filter." +"ここでは、Rの基本的な機能を用いたエラーが起こりやすい繰り返し作業を減らすはずでした。\n" +"でも、まだそれが達成できていません。上記では、それぞれの大陸ごとに同じことを繰り返さなければならないからです。\n" +"繰り返しを無くすために、(上記の `continent==\"Europe\"` のように)条件にあったデータのみを引き渡す `filter()` の代わりに、\n" +"filterでも使える、それぞれの一意の条件を元に一気にデータを分ける `group_by()` を使うこともできます。" # code block #: r-novice-gapminder/_episodes/13-dplyr.md:208 @@ -17237,11 +17237,10 @@ msgid "" "`data.frame` which contains only the rows that correspond to the a particular\n" "value `continent` (at least in the example above)." msgstr "" -"You will notice that the structure of the dataframe where we used `group_by()`\n" -"(`grouped_df`) is not the same as the original `gapminder` (`data.frame`). A\n" -"`grouped_df` can be thought of as a `list` where each item in the `list`is a\n" -"`data.frame` which contains only the rows that correspond to the a particular\n" -"value `continent` (at least in the example above)." +"`group_by()` (`grouped_df`)で用いたデータフレームのデータ構造は、もともとの `gapminder` (`data.frame`)とは異なることに気づいたことでしょう。\n" +"`grouped_df` は、 `list` のようなものです。その `list` にある各項目は、\n" +"(少なくとも上記の例では)特定の `continent` の値が対応する列のみを含む `data.frame` \n" +"になります。" #: r-novice-gapminder/_episodes/13-dplyr.md:245 msgid "![](../fig/13-dplyr-fig2.png)" @@ -17250,7 +17249,7 @@ msgstr "![](../fig/13-dplyr-fig2.png)" # header #: r-novice-gapminder/_episodes/13-dplyr.md:247 msgid "## Using summarize()" -msgstr "## Using summarize()" +msgstr "## summarize() の使用" #: r-novice-gapminder/_episodes/13-dplyr.md:249 msgid "" @@ -17261,12 +17260,11 @@ msgid "" "original dataframe into multiple pieces, then we can run functions\n" "(e.g. `mean()` or `sd()`) within `summarize()`." msgstr "" -"The above was a bit on the uneventful side but `group_by()` is much more\n" -"exciting in conjunction with `summarize()`. This will allow us to create new\n" -"variable(s) by using functions that repeat for each of the continent-specific\n" -"data frames. That is to say, using the `group_by()` function, we split our\n" -"original dataframe into multiple pieces, then we can run functions\n" -"(e.g. `mean()` or `sd()`) within `summarize()`." +"上記は、少し物足りないかもしれませんが、`group_by()` は、`summarize()` と共に使えば\n" +"本当にすばらしいのです。それぞれの大陸のデータフレームごとに繰り返す関数を使って、\n" +"新たな変数を作ることができます。\n" +"つまり、 `group_by()` 関数を使って、もともとのデータフレームを、いくつかのデータに分け、\n" +"`summarize()` の中で、関数(たとえば `mean()` や `sd()`)を実行することができるのです。" # code block #: r-novice-gapminder/_episodes/13-dplyr.md:257 @@ -17315,8 +17313,8 @@ msgid "" "That allowed us to calculate the mean gdpPercap for each continent, but it gets\n" "even better." msgstr "" -"That allowed us to calculate the mean gdpPercap for each continent, but it gets\n" -"even better." +"これにより、それぞれの大陸の平均gdpPercapを計算することができますが、\n" +"更に、すばらしいことがあるのです。" #: r-novice-gapminder/_episodes/13-dplyr.md:282 msgid "" @@ -17390,10 +17388,10 @@ msgid "" msgstr "" ">\n" ">\n" -"> Calculate the average life expectancy per country. Which has the longest average life\n" -"> expectancy and which has the shortest average life expectancy?\n" +"> 国別平均余命を計算しましょう。平均余命が、一番長い国と一番短い国は、\n" +"> それぞれどこでしょうか。\n" ">\n" -"> > ## Solution to Challenge 2\n" +"> > ## チャレンジ2の解答\n" "> >\n" "> >~~~\n" "> >lifeExp_bycountry <- gapminder %>%\n" @@ -17414,11 +17412,11 @@ msgstr "" "> >2 Sierra Leone 36.8\n" "> >~~~\n" "> >{: .output}\n" -"> Another way to do this is to use the `dplyr` function `arrange()`, which\n" -"> arranges the rows in a data frame according to the order of one or more\n" -"> variables from the data frame. It has similar syntax to other functions from\n" -"> the `dplyr` package. You can use `desc()` inside `arrange()` to sort in\n" -"> descending order.\n" +"> もうひとつの方法は、 `dplyr` の関数 `arrange()` を使うことです。\n" +"> これは、データフレームのひとつ又は複数の変数の順序に従って、\n" +"> データフレームの列を配置するものです。 書き方は、`dplyr` パッケージの\n" +"> 他の関数と似ています。降順で並べたいときは、 `arrange()` の中に、\n" +"> `desc()` を使えばよいのです。\n" "> >\n" "> >~~~\n" "> >lifeExp_bycountry %>%\n" @@ -17458,7 +17456,9 @@ msgstr "" #: r-novice-gapminder/_episodes/13-dplyr.md:352 msgid "The function `group_by()` allows us to group by multiple variables. Let's group by `year` and `continent`." -msgstr "The function `group_by()` allows us to group by multiple variables. Let's group by `year` and `continent`." +msgstr "" +" `group_by()` の関数では、複数の変数でグループ化するこもできます。\n" +" `year` と `continent` でグループ分けしてみましょう。" # code block #: r-novice-gapminder/_episodes/13-dplyr.md:356 @@ -17477,7 +17477,7 @@ msgstr "" #: r-novice-gapminder/_episodes/13-dplyr.md:363 msgid "That is already quite powerful, but it gets even better! You're not limited to defining 1 new variable in `summarize()`." -msgstr "That is already quite powerful, but it gets even better! You're not limited to defining 1 new variable in `summarize()`." +msgstr "これでも、かなり役に立ちますが、更にすごいことに、`summarize()` の中で新しく定義できる変数は、1つに限らないのです。" # code block #: r-novice-gapminder/_episodes/13-dplyr.md:366 @@ -17503,15 +17503,15 @@ msgstr "" # header #: r-novice-gapminder/_episodes/13-dplyr.md:376 msgid "## count() and n()" -msgstr "## count() and n()" +msgstr "## count() 及び n()" #: r-novice-gapminder/_episodes/13-dplyr.md:378 msgid "" "A very common operation is to count the number of observations for each\n" "group. The `dplyr` package comes with two related functions that help with this." msgstr "" -"A very common operation is to count the number of observations for each\n" -"group. The `dplyr` package comes with two related functions that help with this." +"よくありがちな操作は、各グループの観測値の数を数えることですが、\n" +"'dplyr' パッケージには、これに役立つ関数が2つあります。" #: r-novice-gapminder/_episodes/13-dplyr.md:381 msgid "" @@ -17520,10 +17520,9 @@ msgid "" "of one or more columns that contain the groups we are interested in, and we can\n" "optionally sort the results in descending order by adding `sort=TRUE`:" msgstr "" -"For instance, if we wanted to check the number of countries included in the\n" -"dataset for the year 2002, we can use the `count()` function. It takes the name\n" -"of one or more columns that contain the groups we are interested in, and we can\n" -"optionally sort the results in descending order by adding `sort=TRUE`:" +"例えば、2002年のデータセットにある国の数を確認したい場合、 `count()` 関数が使えます。\n" +"興味のあるグループのひとつかいくつかの行の名前を取り、\n" +" `sort=TRUE` を加えることで、結果を降順に並べることもできます:" # code block #: r-novice-gapminder/_episodes/13-dplyr.md:387 @@ -17571,9 +17570,8 @@ msgid "" "is useful. For instance, if we wanted to get the standard error of the life\n" "expectency per continent:" msgstr "" -"If we need to use the number of observations in calculations, the `n()` function\n" -"is useful. For instance, if we wanted to get the standard error of the life\n" -"expectency per continent:" +"演算の際の観測値の数が必要な場合 `n()` 関数が使えます。\n" +"例えば、大陸別平均余命の標準誤差を得たいとします:" # code block #: r-novice-gapminder/_episodes/13-dplyr.md:413 @@ -17617,7 +17615,7 @@ msgstr "" #: r-novice-gapminder/_episodes/13-dplyr.md:434 msgid "You can also chain together several summary operations; in this case calculating the `minimum`, `maximum`, `mean` and `se` of each continent's per-country life-expectancy:" -msgstr "You can also chain together several summary operations; in this case calculating the `minimum`, `maximum`, `mean` and `se` of each continent's per-country life-expectancy:" +msgstr "いくつかの要約計算を、つなぎ合わせることもできます。つまり、ここでは各大陸の国別平均余命の `minimum` 、 `maximum` 、 `mean` 及び `se` となります:" # code block #: r-novice-gapminder/_episodes/13-dplyr.md:437 @@ -17670,11 +17668,11 @@ msgstr "" # header #: r-novice-gapminder/_episodes/13-dplyr.md:462 msgid "## Using mutate()" -msgstr "## Using mutate()" +msgstr "## mutate() の使用" #: r-novice-gapminder/_episodes/13-dplyr.md:464 msgid "We can also create new variables prior to (or even after) summarizing information using `mutate()`." -msgstr "We can also create new variables prior to (or even after) summarizing information using `mutate()`." +msgstr "情報を要約する前に(もしくは後にでも)、 `mutate()` を使えば、新しい変数を作ることができます。" # code block #: r-novice-gapminder/_episodes/13-dplyr.md:467 @@ -17706,7 +17704,7 @@ msgstr "" # header #: r-novice-gapminder/_episodes/13-dplyr.md:480 msgid "## Connect mutate with logical filtering: ifelse" -msgstr "## Connect mutate with logical filtering: ifelse" +msgstr "## 論理フィルター ifelse とmutate の併用" #: r-novice-gapminder/_episodes/13-dplyr.md:482 msgid "" @@ -17715,10 +17713,12 @@ msgid "" "This easy-to-read statement is a fast and powerful way of discarding certain data (even though the overall dimension\n" "of the data frame will not change) or for updating values depending on this given condition." msgstr "" -"When creating new variables, we can hook this with a logical condition. A simple combination of\n" -"`mutate()` and `ifelse()` facilitates filtering right where it is needed: in the moment of creating something new.\n" -"This easy-to-read statement is a fast and powerful way of discarding certain data (even though the overall dimension\n" -"of the data frame will not change) or for updating values depending on this given condition." +"新しい変数を作る時、論理条件を付けることができます。\n" +"似たような組み合わせの `mutate()` と `ifelse()` は、まさに必要な場面、つまり\n" +"新しいものを作る時に、フィルターすることができます。\n" +"この簡単に読めるコードが、(データフレーム全体の次元を変えずに)あるデータを\n" +"排除するための早くて役に立つ方法であり、\n" +"与えられた条件によって値を更新する方法なのです。" # code block #: r-novice-gapminder/_episodes/13-dplyr.md:488 @@ -17770,7 +17770,7 @@ msgstr "" # header #: r-novice-gapminder/_episodes/13-dplyr.md:511 msgid "## Combining `dplyr` and `ggplot2`" -msgstr "## Combining `dplyr` and `ggplot2`" +msgstr "## `dplyr` と `ggplot2` の併用" #: r-novice-gapminder/_episodes/13-dplyr.md:513 msgid "" @@ -17778,9 +17778,9 @@ msgid "" "a layer of facet panels using `ggplot2`. Here is the code we used (with some\n" "extra comments):" msgstr "" -"In the plotting lesson we looked at how to make a multi-panel figure by adding\n" -"a layer of facet panels using `ggplot2`. Here is the code we used (with some\n" -"extra comments):" +"プロットのレッスンでは、 `ggplot2` を使って、ファセットパネルの層を加えることで、\n" +"複数パネルの図を示す方法を見ました。\n" +"以下が、(いくつかコメントを足してありますが)使用したコードです:" # code block #: r-novice-gapminder/_episodes/13-dplyr.md:518 @@ -17819,13 +17819,13 @@ msgid "" "`dplyr` and `ggplot2` functions we can make the same figure without creating any\n" "new variables or modifying the data." msgstr "" -"This code makes the right plot but it also creates some variables (`starts.with`\n" -"and `az.countries`) that we might not have any other uses for. Just as we used\n" -"`%>%` to pipe data along a chain of `dplyr` functions we can use it to pass data\n" -"to `ggplot()`. Because `%>%` replaces the first argument in a function we don't\n" -"need to specify the `data =` argument in the `ggplot()` function. By combining\n" -"`dplyr` and `ggplot2` functions we can make the same figure without creating any\n" -"new variables or modifying the data." +"このコードは、正しいプロットを作りますが、他に使い道のない、変数(`starts.with`\n" +"及び `az.countries`)も作ります。 `dplyr` 関数のチェーンで、 `%>%` を使って、\n" +"データをパイプしたように、 `ggplot()` へデータを引き渡すこともできます。\n" +"なぜならば `%>%` は、関数の最初の引数を置き換えるため、\n" +" `ggplot()` 関数の中の、 `data =` 因数を指定する必要がありません。\n" +" `dplyr` と `ggplot2` 関数を組み合わせることで、同じ図を、新しい変数を作ったり、\n" +"データを修正することなく作成できます。" # code block #: r-novice-gapminder/_episodes/13-dplyr.md:540 @@ -17863,8 +17863,8 @@ msgid "" "Using `dplyr` functions also helps us simplify things, for example we could\n" "combine the first two steps:" msgstr "" -"Using `dplyr` functions also helps us simplify things, for example we could\n" -"combine the first two steps:" +" `dplyr` 関数を使うことで、物事が簡単になります。例えば、\n" +"最初の2つの段階を組み合わせることができます:" # code block #: r-novice-gapminder/_episodes/13-dplyr.md:559 @@ -17914,12 +17914,12 @@ msgid "" "> >{: .language-r}" msgstr "" ">\n" -"> Calculate the average life expectancy in 2002 of 2 randomly selected countries\n" -"> for each continent. Then arrange the continent names in reverse order.\n" -"> **Hint:** Use the `dplyr` functions `arrange()` and `sample_n()`, they have\n" -"> similar syntax to other dplyr functions.\n" +"> 各大陸から無作為に選ばれた2つの国の2002年の平均余命を計算し、\n" +"> 大陸名を、逆の順番に並べましょう。\n" +"> **ヒント:** `dplyr` 関数 `arrange()` 及び `sample_n()` を使いましょう。\n" +"> 書き方は、他の dplyr 関数と同じです。\n" ">\n" -"> > ## Solution to Advanced Challenge\n" +"> > ## 上級チャレンジの解答\n" "> >\n" "> >~~~\n" "> >lifeExp_2countries_bycontinents <- gapminder %>%\n" @@ -17935,7 +17935,7 @@ msgstr "" #: r-novice-gapminder/_episodes/13-dplyr.md:593 #: r-novice-gapminder/_episodes/14-tidyr.md:645 msgid "## Other great resources" -msgstr "## Other great resources" +msgstr "## その他役に立つ資料" # unordered list #: r-novice-gapminder/_episodes/13-dplyr.md:595 @@ -17982,14 +17982,14 @@ msgstr "" "---\n" "# Please do not edit this file directly; it is auto generated.\n" "# Instead, please edit 14-tidyr.md in _episodes_rmd/\n" -"タイトル: tidyr によるデータフレームの操作\n" -"講義: 30 分\n" -"演習: 15 分\n" -"質問:\n" +"title: tidyr によるデータフレームの操作\n" +"teaching: 30 分\n" +"exercises: 15 分\n" +"questions:\n" "- \"データフレームのフォーマットを変更するにはどのようにすればよいですか?\"\n" -"目標:\n" +"objectives:\n" "- \" 「横長」と「縦長」のデータ形式を理解し、`tidyr`を使用して、その変換が出来るようになりましょう。\"\n" -"キーポイント:\n" +"keypoints:\n" "- \"データフレームの形式を変更するには `tidyr` を使用する。\"\n" "- \"「横長」から「縦長」に変換するには `gather()` を使用する。\"\n" "- \"「縦長」から「横長」に変換するには `spread()` を使用する。\"\n" @@ -18001,26 +18001,24 @@ msgid "" "Researchers often want to manipulate their data from the 'wide' to the 'long'\n" "format, or vice-versa. The 'long' format is where:" msgstr "" -"Researchers often want to manipulate their data from the 'wide' to the 'long'\n" -"format, or vice-versa. The 'long' format is where:" +"研究者には「横長」データを「縦長」データに(又はその逆を)したいと\n" +"思うことがよくあります。 「縦長」形式とは:" # unordered list #: r-novice-gapminder/_episodes/14-tidyr.md:23 msgid " - each column is a variable" -msgstr " - each column is a variable" +msgstr " - 各列が変数" # unordered list #: r-novice-gapminder/_episodes/14-tidyr.md:24 msgid " - each row is an observation" -msgstr " - each row is an observation" +msgstr " - 各行が観測値" #: r-novice-gapminder/_episodes/14-tidyr.md:26 msgid "" "In the 'long' format, you usually have 1 column for the observed variable and\n" "the other columns are ID variables." -msgstr "" -"In the 'long' format, you usually have 1 column for the observed variable and\n" -"the other columns are ID variables." +msgstr "「縦長」形式では、普通、観測値は1列で、残りの列はIDの変数になります。" #: r-novice-gapminder/_episodes/14-tidyr.md:30 msgid "" @@ -18032,13 +18030,13 @@ msgid "" "been designed assuming you have 'long' format data. This tutorial will help you\n" "efficiently transform your data regardless of original format." msgstr "" -"For the 'wide' format each row is often a site/subject/patient and you have\n" -"multiple observation variables containing the same type of data. These can be\n" -"either repeated observations over time, or observation of multiple variables (or\n" -"a mix of both). You may find data input may be simpler or some other\n" -"applications may prefer the 'wide' format. However, many of `R`'s functions have\n" -"been designed assuming you have 'long' format data. This tutorial will help you\n" -"efficiently transform your data regardless of original format." +"「横長」形式は、それぞれの行には、場所/主題/患者があり、同じようなデータ型の\n" +"複数の観測変数があります。 時間を変えて繰り返し観測した値や、\n" +"複数の観測変数(又は、その両方)が、これに該当します。\n" +"データ入力がより単純と感じたり、「縦長」形式の方が良いという\n" +"アプリケーションもあるでしょうが、「R」の関数の多くは、\n" +"「縦長」形式データを前提として作られています。ここでは、\n" +"元々の形式に関係なくデータを効率的に変換する方法を学びましょう。" #: r-novice-gapminder/_episodes/14-tidyr.md:38 msgid "![](../fig/14-tidyr-fig1.png)" @@ -18052,24 +18050,23 @@ msgid "" "to the formatting of databases. The ID variables in our dataframes are similar to\n" "the fields in a database and observed variables are like the database values." msgstr "" -"These data formats mainly affect readability. For humans, the wide format is\n" -"often more intuitive since we can often see more of the data on the screen due\n" -"to its shape. However, the long format is more machine readable and is closer\n" -"to the formatting of databases. The ID variables in our dataframes are similar to\n" -"the fields in a database and observed variables are like the database values." +"これらのデータ形式は、主に読みやすさに影響します。画面の形状上、より多くのデータが見られる\n" +"横長形式を、人間は直感的に選好しやすいところですが、縦長形式の方が機械が読みやすく、\n" +"データベースの形式に近いのです。データフレームにある ID 変数は、データベースにあるフィールドの\n" +"ようなものであり、観測された変数はデータべースの値のようなものです。" # header #: r-novice-gapminder/_episodes/14-tidyr.md:46 msgid "## Getting started" -msgstr "## Getting started" +msgstr "## 手始めに" #: r-novice-gapminder/_episodes/14-tidyr.md:48 msgid "" "First install the packages if you haven't already done so (you probably\n" "installed dplyr in the previous lesson):" msgstr "" -"First install the packages if you haven't already done so (you probably\n" -"installed dplyr in the previous lesson):" +"まず、パッケージをインストールしましょう、もしまだやっていなければですが\n" +"(おそらく、前の dplyr のレッスンで、インストールしているかと思います):" # code block #: r-novice-gapminder/_episodes/14-tidyr.md:52 @@ -18086,7 +18083,7 @@ msgstr "" #: r-novice-gapminder/_episodes/14-tidyr.md:58 msgid "Load the packages" -msgstr "Load the packages" +msgstr "パーッケージをロードしましょう。" # code block #: r-novice-gapminder/_episodes/14-tidyr.md:61 @@ -18103,7 +18100,7 @@ msgstr "" #: r-novice-gapminder/_episodes/14-tidyr.md:67 msgid "First, lets look at the structure of our original gapminder dataframe:" -msgstr "First, lets look at the structure of our original gapminder dataframe:" +msgstr "始めに、そもそもの gapminder データフレームのデータ構造を見てみましょう:" # code block #: r-novice-gapminder/_episodes/14-tidyr.md:77 @@ -18141,14 +18138,14 @@ msgid "" "> > (`pop`,`lifeExp`,`gdpPercap`)." msgstr "" ">\n" -"> Is gapminder a purely long, purely wide, or some intermediate format?\n" +"> gapminder は、横長のみ、縦長のみ、又はその中間の形式でしょうか。\n" ">\n" ">\n" -"> > ## Solution to Challenge 1\n" +"> > ## チャレンジ1の解答\n" "> >\n" -"> > The original gapminder data.frame is in an intermediate format. It is not\n" -"> > purely long since it had multiple observation variables\n" -"> > (`pop`,`lifeExp`,`gdpPercap`)." +"> > 元々の gapminder data.frame は、中間の形式です。\n" +"> > 複数の観測変数(`pop`,`lifeExp`,`gdpPercap`)があるため、\n" +"> > 縦長のみのデータとは言えません。" #: r-novice-gapminder/_episodes/14-tidyr.md:102 msgid "" @@ -18161,14 +18158,14 @@ msgid "" "few operations that would need us to stretch out this dataframe any longer\n" "(i.e. 4 ID variables and 1 Observation variable)." msgstr "" -"Sometimes, as with the gapminder dataset, we have multiple types of observed\n" -"data. It is somewhere in between the purely 'long' and 'wide' data formats. We\n" -"have 3 \"ID variables\" (`continent`, `country`, `year`) and 3 \"Observation\n" -"variables\" (`pop`,`lifeExp`,`gdpPercap`). I usually prefer my data in this\n" -"intermediate format in most cases despite not having ALL observations in 1\n" -"column given that all 3 observation variables have different units. There are\n" -"few operations that would need us to stretch out this dataframe any longer\n" -"(i.e. 4 ID variables and 1 Observation variable)." +"ときどき gapminder データセットのように、観測データが複数の型の場合があります。\n" +"これは「縦長」と「横長」のデータ形式の中間のようなものです。\n" +"3つの「ID variables」(`continent`, `country`, `year`)と、3つの「観測変数」\n" +"(`pop`,`lifeExp`,`gdpPercap`)がありますね。3つの観測変数が、全ての違う\n" +"単位であり、全ての変数が1列になってはいませんが、個人的には、自分のデータを、\n" +"この中間形式にしたいと思うことが多いです。このデータフレームをより縦に広げたい\n" +"(つまり、4つの ID 変数と1観測変数にしたい)というときに使える操作は、\n" +"ほとんどありません。" #: r-novice-gapminder/_episodes/14-tidyr.md:111 msgid "" @@ -18181,19 +18178,18 @@ msgid "" "we change the structure of the dataframe. **Note:** Some plotting functions in\n" "R actually work better in the wide format data." msgstr "" -"While using many of the functions in R, which are often vector based, you\n" -"usually do not want to do mathematical operations on values with different\n" -"units. For example, using the purely long format, a single mean for all of the\n" -"values of population, life expectancy, and GDP would not be meaningful since it\n" -"would return the mean of values with 3 incompatible units. The solution is that\n" -"we first manipulate the data either by grouping (see the lesson on `dplyr`), or\n" -"we change the structure of the dataframe. **Note:** Some plotting functions in\n" -"R actually work better in the wide format data." +"一方で、R の関数の多くは、ベクトルに基づいているものがほとんどであり、ふつうは\n" +"単位が異なる値に、数理的演算をすることは避けたいと思うでしょう。\n" +"例えば、縦長の形式のみを使って、人口、平均余命及びGDPの値の全てを使って、\n" +"ひとつ平均値を出しても、意味がないでしょう。3つの比較できない単位の値の平均と\n" +"なるのですから。解決方法は、データをまずグループ化(`dplyr` のレッスンを参照)するか、\n" +"データフレームの形式を変えることでしょう。 **注:** Rのプロット関数の中には、\n" +"横長形式のデータの方がよいものもあります。" # header #: r-novice-gapminder/_episodes/14-tidyr.md:120 msgid "## From wide to long format with gather()" -msgstr "## From wide to long format with gather()" +msgstr "## gather() を使って、横長から縦長形式へ" #: r-novice-gapminder/_episodes/14-tidyr.md:122 msgid "" @@ -18201,18 +18197,18 @@ msgid "" "'real' data (i.e. our own research data) will never be so well organized. Here\n" "let's start with the wide format version of the gapminder dataset." msgstr "" -"Until now, we've been using the nicely formatted original gapminder dataset, but\n" -"'real' data (i.e. our own research data) will never be so well organized. Here\n" -"let's start with the wide format version of the gapminder dataset." +"ここまでは、元々の gapminder データセットの形式を整えてきましたが、\n" +"'本物の' データ(つまり、研究データ)が、ちゃんと整理されていることは\n" +"ほとんどないでしょう。ここで、gapminderデータセットの横長形式から、始めてみましょう。" # blockquote, which can be cascaded #: r-novice-gapminder/_episodes/14-tidyr.md:126 msgid "> Download the wide version of the gapminder data from [here](https://raw.githubusercontent.com/swcarpentry/r-novice-gapminder/gh-pages/_episodes_rmd/data/gapminder_wide.csv)" -msgstr "> Download the wide version of the gapminder data from [here](https://raw.githubusercontent.com/swcarpentry/r-novice-gapminder/gh-pages/_episodes_rmd/data/gapminder_wide.csv)" +msgstr "> 横長バージョンの gapminder データを [ここ](https://raw.githubusercontent.com/swcarpentry/r-novice-gapminder/gh-pages/_episodes_rmd/data/gapminder_wide.csv)からダウンロードしましょう。" #: r-novice-gapminder/_episodes/14-tidyr.md:127 msgid "and save it in your data folder." -msgstr "and save it in your data folder." +msgstr "そしてフォルダーに保存します。" #: r-novice-gapminder/_episodes/14-tidyr.md:129 msgid "" @@ -18220,9 +18216,8 @@ msgid "" "country columns to be factors, so we use the stringsAsFactors argument for\n" "`read.csv()` to disable that." msgstr "" -"We'll load the data file and look at it. Note: we don't want our continent and\n" -"country columns to be factors, so we use the stringsAsFactors argument for\n" -"`read.csv()` to disable that." +"データファイルをロードして見てみましょう。 注:大陸と国の列は、因子型にはしたくありません。\n" +"そこで、そうならないように、`read.csv()`に stringsAsFactors 引数を使いましょう。" # code block #: r-novice-gapminder/_episodes/14-tidyr.md:134 @@ -18334,9 +18329,9 @@ msgid "" "convert from the wide to the long format. The `tidyr` function `gather()` will\n" "'gather' your observation variables into a single variable." msgstr "" -"The first step towards getting our nice intermediate data format is to first\n" -"convert from the wide to the long format. The `tidyr` function `gather()` will\n" -"'gather' your observation variables into a single variable." +"我々の目指す中間形式のデータに向かう最初のステップは、\n" +"横長から縦長形式への変換です。 `tidyr` 関数の `gather()` を使えば、\n" +"観測変数をひとつの変数に '集める(gather)' することができます。" #: r-novice-gapminder/_episodes/14-tidyr.md:191 msgid "![](../fig/14-tidyr-fig3.png)" @@ -18384,9 +18379,9 @@ msgid "" "previous lesson with dplyr. In fact, these are compatible and you can use a mix\n" "of tidyr and dplyr functions by piping them together" msgstr "" -"Here we have used piping syntax which is similar to what we were doing in the\n" -"previous lesson with dplyr. In fact, these are compatible and you can use a mix\n" -"of tidyr and dplyr functions by piping them together" +"ここでは、以前 dplyr のレッスンの中で行ったようなパイプの書き方を使いました。\n" +"実は、tidyr と dplyr 関数は互換性があり、パイプで繋ぐことで、一緒に使うことが\n" +"できるのです。" #: r-novice-gapminder/_episodes/14-tidyr.md:217 msgid "" @@ -18399,14 +18394,12 @@ msgid "" "syntax of using the `-` symbol to identify which variables are not to be\n" "gathered (i.e. ID variables)" msgstr "" -"Inside `gather()` we first name the new column for the new ID variable\n" -"(`obstype_year`), the name for the new amalgamated observation variable\n" -"(`obs_value`), then the names of the old observation variable. We could have\n" -"typed out all the observation variables, but as in the `select()` function (see\n" -"`dplyr` lesson), we can use the `starts_with()` argument to select all variables\n" -"that starts with the desired character string. Gather also allows the alternative\n" -"syntax of using the `-` symbol to identify which variables are not to be\n" -"gathered (i.e. ID variables)" +"始めに、新しいID変数(`obstype_year`)のための新しい列、新しくまとめた\n" +"観測変数(`obs_value`)、及び古い観測変数を `gather()` の中で名付けましょう。 \n" +"全ての観測変数をタイプすることもできますが、 `select()` 関数(`dplyr` レッスン参照)\n" +"でしたように、引数 `starts_with()` で目的の文字列で始まる全ての変数を選びましょう。\n" +"Gather には、集めない変数(つまりID変数)を特定する、`-` シンボルを使う\n" +"別の書き方もあります。" #: r-novice-gapminder/_episodes/14-tidyr.md:226 msgid "![](../fig/14-tidyr-fig4.png)" @@ -18450,9 +18443,9 @@ msgid "" "ID variable and 40 Observation variables with irregular variables names. The\n" "flexibility is a huge time saver!" msgstr "" -"That may seem trivial with this particular dataframe, but sometimes you have 1\n" -"ID variable and 40 Observation variables with irregular variables names. The\n" -"flexibility is a huge time saver!" +"これは、このデータフレームでは、取るに足らないことかもしれませんが、\n" +"1つの ID 変数と40の変則的な変数名を持つ観測変数がある場合も時にはあります。\n" +"柔軟性があることで、かなり時間が節約できるのです!" #: r-novice-gapminder/_episodes/14-tidyr.md:251 msgid "" @@ -18460,9 +18453,9 @@ msgid "" "type (`pop`,`lifeExp`, or `gdpPercap`) and the `year`. We can use the\n" "`separate()` function to split the character strings into multiple variables" msgstr "" -"Now `obstype_year` actually contains 2 pieces of information, the observation\n" -"type (`pop`,`lifeExp`, or `gdpPercap`) and the `year`. We can use the\n" -"`separate()` function to split the character strings into multiple variables" +"ここで `obstype_year` には、実は2種類の情報が含まれています。\n" +"観測値の形(`pop`、`lifeExp`、又は`gdpPercap`)及び `year` です。 \n" +"文字列を複数の変数に分割するには、 `separate()` 関数が使えます。" # code block #: r-novice-gapminder/_episodes/14-tidyr.md:256 @@ -18517,10 +18510,10 @@ msgid "" "> >{: .output}" msgstr "" ">\n" -"> Using `gap_long`, calculate the mean life expectancy, population, and gdpPercap for each continent.\n" -">**Hint:** use the `group_by()` and `summarize()` functions we learned in the `dplyr` lesson\n" +"> `gap_long` を使って、各大陸の平均余命、人口及びgdpPercapを計算しましょう。\n" +">**ヒント:** `dplyr` で習った `group_by()` と `summarize()` 関数を使いましょう。\n" ">\n" -"> > ## Solution to Challenge 2\n" +"> > ## チャレンジ2の解答\n" "> >\n" "> >~~~\n" "> >gap_long %>% group_by(continent,obs_type) %>%\n" @@ -18556,7 +18549,7 @@ msgstr "" # header #: r-novice-gapminder/_episodes/14-tidyr.md:303 msgid "## From long to intermediate format with spread()" -msgstr "## From long to intermediate format with spread()" +msgstr "## spread() で縦長から中間形式へ" #: r-novice-gapminder/_episodes/14-tidyr.md:305 msgid "" @@ -18565,10 +18558,9 @@ msgid "" "can then spread our `gap_long()` to the original intermediate format or the\n" "widest format. Let's start with the intermediate format." msgstr "" -"It is always good to check work. So, let's use the opposite of `gather()` to\n" -"spread our observation variables back out with the aptly named `spread()`. We\n" -"can then spread our `gap_long()` to the original intermediate format or the\n" -"widest format. Let's start with the intermediate format." +"仕事を確認することは、とても良いことです。 `gather()` の反対の名は体を表す `spread()` を使って、\n" +"観測変数を元通りに広げてみましょう。そこから `gap_long()` を、元々の中間形式、又は、\n" +"一番横長な形式に広げることもできます。まずは、中間形式から始めましょう。" # code block #: r-novice-gapminder/_episodes/14-tidyr.md:311 @@ -18622,9 +18614,8 @@ msgid "" "the original `gapminder`, but the order of the variables is different. Let's fix\n" "that before checking if they are `all.equal()`." msgstr "" -"Now we've got an intermediate dataframe `gap_normal` with the same dimensions as\n" -"the original `gapminder`, but the order of the variables is different. Let's fix\n" -"that before checking if they are `all.equal()`." +"元々の `gapminder` と同じ次元を持つ、中間形式のデータフレーム `gap_normal` ができましたが、\n" +"変数の順番が違います。 このふたつが、 `all.equal()` かを調べる前に、これを直しましょう。" # code block #: r-novice-gapminder/_episodes/14-tidyr.md:371 @@ -18696,9 +18687,7 @@ msgstr "" msgid "" "We're almost there, the original was sorted by `country`, `continent`, then\n" "`year`." -msgstr "" -"We're almost there, the original was sorted by `country`, `continent`, then\n" -"`year`." +msgstr "もうすぐです。元々のは、 `country` 、 `continent` 、そして `year` でソートされていました。" # code block #: r-novice-gapminder/_episodes/14-tidyr.md:432 @@ -18718,8 +18707,8 @@ msgid "" "That's great! We've gone from the longest format back to the intermediate and we\n" "didn't introduce any errors in our code." msgstr "" -"That's great! We've gone from the longest format back to the intermediate and we\n" -"didn't introduce any errors in our code." +"すばらしい!一番縦に長い形式から、中間形式に戻し、コードにエラーが\n" +"でることもありませんでした。" #: r-novice-gapminder/_episodes/14-tidyr.md:448 msgid "" @@ -18730,12 +18719,11 @@ msgid "" "combinations) and we also need to unify our ID variables to simplify the process\n" "of defining `gap_wide`" msgstr "" -"Now lets convert the long all the way back to the wide. In the wide format, we\n" -"will keep country and continent as ID variables and spread the observations\n" -"across the 3 metrics (`pop`,`lifeExp`,`gdpPercap`) and time (`year`). First we\n" -"need to create appropriate labels for all our new variables (time*metric\n" -"combinations) and we also need to unify our ID variables to simplify the process\n" -"of defining `gap_wide`" +"さぁ、縦長のものを、全て横長に戻しましょう。横長の形式で、\n" +"国と大陸を、ID変数として置いておいて、3行列(`pop`、`lifeExp`、`gdpPercap`)\n" +"及び時間(`year`)に観測値を分けていきましょう。まず、全ての変数(time*metric の組み合わせ)\n" +"に適当なラベルを付ける必要があります。また、`gap_wide` を定義する処理を簡単にするために、\n" +"ID変数たちを統合する必要もあります。" # code block #: r-novice-gapminder/_episodes/14-tidyr.md:456 @@ -18809,9 +18797,8 @@ msgid "" "`continent`,`country`,and we have defined variable names. We're now ready to\n" "pipe in `spread()`" msgstr "" -"Using `unite()` we now have a single ID variable which is a combination of\n" -"`continent`,`country`,and we have defined variable names. We're now ready to\n" -"pipe in `spread()`" +"`unite()` を使い、`continent`と`country`を組み合わせ、ID 変数をひとつ作り、\n" +"変数名を定義しました。 `spread()` でパイプを使う準備が整いました。" # code block #: r-novice-gapminder/_episodes/14-tidyr.md:498 @@ -18933,10 +18920,10 @@ msgid "" "> >{: .language-r}" msgstr "" ">\n" -"> Take this 1 step further and create a `gap_ludicrously_wide` format data by spreading over countries, year and the 3 metrics?\n" -">**Hint** this new dataframe should only have 5 rows.\n" +"> この一つ先に進み、 `gap_ludicrously_wide` を作り、国、年及び3つの行列に展開したデータを作りましょう。\n" +">**ヒント** この新しいデータフレームには、5行しかありません。\n" ">\n" -"> > ## Solution to Challenge 3\n" +"> > ## チャレンジ3の解答\n" "> >\n" "> >~~~\n" "> >gap_ludicrously_wide <- gap_long %>%\n" @@ -18950,8 +18937,8 @@ msgid "" "Now we have a great 'wide' format dataframe, but the `ID_var` could be more\n" "usable, let's separate it into 2 variables with `separate()`" msgstr "" -"Now we have a great 'wide' format dataframe, but the `ID_var` could be more\n" -"usable, let's separate it into 2 variables with `separate()`" +"今、とても '横長な' 形式のデータフレームがありますが、 `ID_var` は、より使えるようにできるはずです。\n" +"`separate()` を使って、2変数に分けてみましょう。" # code block #: r-novice-gapminder/_episodes/14-tidyr.md:572 @@ -19076,7 +19063,7 @@ msgstr "" #: r-novice-gapminder/_episodes/14-tidyr.md:642 msgid "There and back again!" -msgstr "There and back again!" +msgstr "そこにまた戻りました!" # unordered list #: r-novice-gapminder/_episodes/14-tidyr.md:647 @@ -19128,7 +19115,7 @@ msgstr "" "- チャンクのオプション\n" "- 文中の R コード\n" "- 他の出力フォーマット\n" -"キーポイント:\n" +"keypoints:\n" "- \"R のマークダウンと R で作成されたソフトウェアが混在するレポート\"\n" "- \"フォーマット制御のために Specify chunk オプションを指定する。\"\n" "- \"`knitr` を使用してドキュメントを PDF およびほかのフォーマットに出来る。\"\n" @@ -19955,7 +19942,7 @@ msgstr "" "- \"他の人も使えるソフトウェアを描くにはどうしたらよいですか?\"\n" "objectives:\n" "- \"R のプログラミングのベストプラクティスとその理由が説明できるようになりましょう。\"\n" -"キーポイント:\n" +"keypoints:\n" "- \"常にプロジェクトフォルダーを構造化し、整理し、片づけておく。\"\n" "- \"どうやって、ではなく、何であるかとなぜであるかを文書化しておく。\"\n" "- \"プログラムは一つの用途に絞られた短い関数に分割する。\"\n" @@ -21801,17 +21788,16 @@ msgstr "" # header #: r-novice-gapminder/reference.md:204 msgid "## [Writing data]({{ page.root }}/11-writing-data/)" -msgstr "## [Writing data]({{ page.root }}/11-writing-data/)" +msgstr "## [データの出力]({{ page.root }}/11-writing-data/)" # unordered list #: r-novice-gapminder/reference.md:206 msgid " - `write.table` to write out objects in regular format" -msgstr " - `write.table` to write out objects in regular format" - +msgstr " - `write.table` を使ってオブジェクトを一般的な形式に出力しましょう。" # unordered list #: r-novice-gapminder/reference.md:207 msgid " - set `quote=FALSE` so that text isn't wrapped in `\"` marks" -msgstr " - set `quote=FALSE` so that text isn't wrapped in `\"` marks" +msgstr " - `quote=FALSE` を指定して文字列が引用符に囲われないようにしましょう。" # header #: r-novice-gapminder/reference.md:209 diff --git a/po/r-novice-inflammation.ja.po b/po/r-novice-inflammation.ja.po index 65a57f07..fd15a6c6 100644 --- a/po/r-novice-inflammation.ja.po +++ b/po/r-novice-inflammation.ja.po @@ -1,5 +1,5 @@ # Japanese translation of the Software Carpentry Programming with R Lesson -# Copyright (C) 2019 Software Carpentry Foundation; Japanese Translation Team +# Copyright (C) 2020 Software Carpentry Foundation; Japanese Translation Team # This file is distributed under the same license as the PACKAGE package. # Software-Carpentry Japanese-Team , 2019, 2020. # @@ -7,8 +7,6 @@ msgid "" msgstr "" "Project-Id-Version: i18n\n" "Report-Msgid-Bugs-To: https://github.com/haiwen/seafile-docs/issues\n" -"POT-Creation-Date: 2018-09-15 22:59:57+0900\n" -"PO-Revision-Date: 2018-09-18 00:09+0900\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/po/shell-novice.ja.po b/po/shell-novice.ja.po index 5e0c16e9..b5f34625 100644 --- a/po/shell-novice.ja.po +++ b/po/shell-novice.ja.po @@ -1,5 +1,5 @@ # Japanese translation of the Software Carpentry Unix Shell Lesson -# Copyright (C) 2019 Software Carpentry Foundation; Japanese Translation Team +# Copyright (C) 2020 Software Carpentry Foundation; Japanese Translation Team # This file is distributed under the same license as the PACKAGE package. # Software-Carpentry Japanese-Team , 2019, 2020. # @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: i18n\n" "Report-Msgid-Bugs-To: https://github.com/haiwen/seafile-docs/issues\n" "POT-Creation-Date: 2018-09-15 22:59:57+0900\n" -"PO-Revision-Date: 2018-10-27 17:18+0900\n" +"PO-Revision-Date: 2020-05-13 09:57+0900\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -16,7 +16,7 @@ msgstr "" "Last-Translator: \n" "Language-Team: Japanese \n" "Language: ja\n" -"X-Generator: Poedit 2.2\n" +"X-Generator: Poedit 2.3\n" # Front Matter #: shell-novice/CONDUCT.md:1 @@ -826,27 +826,27 @@ msgstr "### Background" #: shell-novice/_episodes/01-intro.md:22 msgid "At a high level, computers do four things:" -msgstr "At a high level, computers do four things:" +msgstr "コンピューターは以下の4つのことを高度におこなっています。" # unordered list #: shell-novice/_episodes/01-intro.md:24 msgid "- run programs" -msgstr "- run programs" +msgstr "- プログラムを実行する" # unordered list #: shell-novice/_episodes/01-intro.md:25 msgid "- store data" -msgstr "- store data" +msgstr "- データを保存する" # unordered list #: shell-novice/_episodes/01-intro.md:26 msgid "- communicate with each other, and" -msgstr "- communicate with each other, and" +msgstr "- 他のコンピューターとやりとりをする" # unordered list #: shell-novice/_episodes/01-intro.md:27 msgid "- interact with us" -msgstr "- interact with us" +msgstr "- 私たちとやりとりをする" #: shell-novice/_episodes/01-intro.md:29 msgid "" @@ -855,10 +855,10 @@ msgid "" "While such hardware interfaces are becoming more commonplace, most interaction is still\n" "done using screens, mice, touchpads and keyboards." msgstr "" -"They can do the last of these in many different ways,\n" -"including through a keyboard and mouse, or touch screen interfaces, or speech recognition using systems.\n" -"While such hardware interfaces are becoming more commonplace, most interaction is still\n" -"done using screens, mice, touchpads and keyboards." +"私たちとのやりとりは様々な方法で行います。\n" +"例えば、キーボードやマウスを使ったり、タッチスクリーンを使ったり、音声認識を使ったりです。\n" +"このようなハードウェアインターフェイスは一般的になりつつありますが、ほとんどのやりとりはまだ\n" +"画面とマウスやタッチパッドとキーボードを用いて行われます。" #: shell-novice/_episodes/01-intro.md:34 msgid "" @@ -867,10 +867,10 @@ msgid "" "\"click\" translates easily into \"do the thing I want\". But this magic relies on \n" "wanting a simple set of things, and having programs that can do exactly those things." msgstr "" -"We are all familiar with **graphical user interfaces** (GUI - windows, icons and pointers). \n" -"They are easy to learn and fantastic for simple tasks where a vocabulary consisting of\n" -"\"click\" translates easily into \"do the thing I want\". But this magic relies on \n" -"wanting a simple set of things, and having programs that can do exactly those things." +"私たちは皆「グラフィカルユーザーインテーフェイス (GUI)」とよばれる、ウインドウやアイコンやポインターで操作することに慣れています。\n" +"それらは簡単になれることができ、単純なタスクをこなすのには適しています。\n" +"「クリック」は「やりたいことをやってください」を意味します。 \n" +"しかし、この魔法のような単純さは、やりたいことが単純で、それを行うプログラムが存在していなければなりません。" #: shell-novice/_episodes/01-intro.md:39 msgid "" diff --git a/po/sql-novice-survey.ja.po b/po/sql-novice-survey.ja.po index bdd09e78..0480a21a 100644 --- a/po/sql-novice-survey.ja.po +++ b/po/sql-novice-survey.ja.po @@ -1,5 +1,5 @@ # Japanese translation of the Software Carpentry Using Databases and SQL Lesson -# Copyright (C) 2019 Software Carpentry Foundation; Japanese Translation Team +# Copyright (C) 2020 Software Carpentry Foundation; Japanese Translation Team # This file is distributed under the same license as the PACKAGE package. # Software-Carpentry Japanese-Team , 2019, 2020. # diff --git a/wrapper.sh b/wrapper.sh index 74f885d7..7a7be855 100644 --- a/wrapper.sh +++ b/wrapper.sh @@ -4,7 +4,7 @@ # sh wrapper.sh --repo make-novice --create # sh wrapper.sh --repo make-novice --import # sh wrapper.sh --repo make-novice --account GitHubUser --import -# sh wrapper.sh --repo r-novice-gapmnder --account swcarpentry-ja --import --webpages +# sh wrapper.sh --repo r-novice-gapminder --account swcarpentry-ja --import --webpages # create (implemented): subroutine to create new PO files from an English lesson not currently being translated # import (testing): subroutine to pull a lesson being translated from remote to make changes locally @@ -63,6 +63,7 @@ for op in "$@"; do remote_user=$git_user next=true fi + shift ;; -r|--repo) shift @@ -73,6 +74,7 @@ for op in "$@"; do all_repo=true next=true fi + shift ;; -w|--webpages) shift @@ -113,7 +115,7 @@ echo render webpages : $render #check if remote i18n repo exists root_dir=`git ls-remote https://github.com/${remote_user}/i18n.git | grep "ja" | wc -l` -echo i18 repo: $root_dir +echo i18n repo: $root_dir if [ $root_dir -eq 1 ]; then echo "remote found: https://github.com/${remote_user}/i18n.git" elif [ $root_dir -eq 0 ]; then @@ -126,8 +128,8 @@ else fi #check if remote repo exists -root_dir=`git ls-remote https://github.com/${remote_user}/${repo}.git | grep "ja" | wc -l` -echo i18 repo: $root_dir +root_dir=`git ls-remote https://github.com/${remote_user}/${repo}.git | grep "gh-pages" | wc -l` +echo $repo repo: $root_dir if [ $root_dir -eq 1 ]; then echo "remote found: https://github.com/${remote_user}/${repo}.git" elif [ $root_dir -eq 0 ]; then @@ -157,15 +159,15 @@ if [[ $create == true ]]; then #checkout Japanese branch git checkout ja - git remote add swc-ja git@github.com:swcarpentry-ja/i18n.git + git remote add swc-ja git@github.com:${git_user}/i18n.git git pull swc-ja ja #import submodules git submodule init - git submodule import + git submodule add git@github.com:${git_user}/${repo} echo "update local submodules" - #git submodule update --recursive --merge + git submodule update -f --recursive $repo #remove _locale directory (only translate English lessons) for dir in `git submodule | grep "^+" | cut -d" " -f2` @@ -178,7 +180,7 @@ if [[ $create == true ]]; then git remote remove swc-ja fi #reset all repos to remote - url=https://github.com/swcarpentry-ja/${dir}.git + url=https://github.com/${git_user}/${dir}.git git remote add swc-ja $url if [[ `git branch -v | grep "master" | wc -l` -ge 1 ]] then @@ -251,7 +253,7 @@ if [[ $create == true ]]; then rm po/*.pot echo "run compile on po4gitbook to create new lessson" po4gitbook/compile.sh > /dev/null 2>&1 - echo lesson $repo created in locale/ja/$repo + echo lesson $repo created in _locale/ja/$repo #restore _locale directory (only translate English lessons) for dir in `git submodule | grep "^+" | cut -d" " -f2` @@ -283,15 +285,16 @@ if [[ $import == true ]]; then #checkout Japanese branch git checkout ja - git remote add swc-ja git@github.com:swcarpentry-ja/i18n.git + git remote add swc-ja git@github.com:${git_user}/i18n.git git pull swc-ja ja #import submodules git submodule init - git submodule import + git submodule foreach 'git pull swc-ja' + git submodule add git@github.com:${git_user}/${repo} echo "update local submodules" - git submodule update --recursive --remote --merge + git submodule update -f --recursive #remove _locale directory (only translate English lessons) for dir in `git submodule | grep "^+" | cut -d" " -f2` @@ -304,7 +307,7 @@ if [[ $import == true ]]; then git remote remove swc-ja fi #reset all repos to remote - url=https://github.com/swcarpentry-ja/${dir}.git + url=https://github.com/${git_user}/${dir}.git git remote add swc-ja $url if [[ `git branch -v | grep "master" | wc -l` -ge 1 ]] then @@ -364,15 +367,15 @@ if [[ $render == true ]]; then #checkout Japanese branch git checkout ja - git remote add swc-ja git@github.com:swcarpentry-ja/i18n.git + git remote add swc-ja git@github.com:${git_user}/i18n.git git pull swc-ja ja #import submodules git submodule init - git submodule import + git submodule add git@github.com:${git_user}/${repo} echo "import local submodules" - git submodule import --recursive --remote --merge + git submodule update -f --recursive if [[ ! -z $repo ]]; then if [[ -d $repo ]]; then @@ -397,7 +400,7 @@ if [[ $render == true ]]; then year=`date +%Y` past_year=$(( $year-1 )) #replace past year with current year - sed -i '2s/$past_year/$year/g" po/*.po + sed -i "2s/$past_year/$year/g" po/*.po # append current year if different to previous year sed -i "4s/, ${past_year}\./, ${past_year}, ${year}./g" po/*po @@ -410,7 +413,7 @@ if [[ $render == true ]]; then git commit -m "update PO files" git push swc-ja ja - echo "translated lessons from po/${repo}.ja.po exported to locale/ja/$repo" + echo "translated lessons from po/${repo}.ja.po exported to _locale/ja/$repo" #check if remote translated lesson exists lesson_dir=`git ls-remote https://github.com/${git_user}/${repo}-ja.git | grep "master" | wc -l` @@ -426,65 +429,85 @@ if [[ $render == true ]]; then exit 1 fi - #create as submodule - ##git submodule add https://github.com/${git_user}/${repo}-ja.git locale/ja/$repo - ##git submodule absorbgitdirs + #create as submodule + #git submodule add https://github.com/${git_user}/${repo}-ja.git _locale/ja/$repo + ##git submodule absorbgitdirs + + #move to external repo + mkdir -p ../${repo}-ja + rsync -ru locale/ja/${repo}/* ../${repo}-ja + + #add update lessons to remote + cd ../${repo}-ja + git init + git remote remove swc-ja + remotes=`git remote | grep "swc-ja" | wc -l` + if [[ remotes -le 0 ]]; then + git remote add swc-ja https://github.com/$remote_user/$repo-ja.git + fi + git pull swc-ja master + + # remove files provided by template + rm -rf bin/boilerplate + rm -rf _layouts _includes _episodes_rmd assets bin code - #move to external repo - mkdir -p ../${repo}-ja - rsync -ru locale/ja/${repo}/* ../${repo}-ja + git add * + git commit -m "update lesson files" + git push swc-ja master - #add update lessons to remote - cd ../${repo}-ja - git init + #update original lesson to import translated content + cd ../i18n # or English lesson + # restore to version from remote + git submodule update -f --recursive + # import changes from org repo + git submodule foreach 'case $name in po4gitbook) ;; *) git checkout gh-pages; git pull -f swc-ja gh-pages ;; esac' + + #restore _locale lessons (only English lessons translated) + for dir in `git submodule | grep "^+" | cut -d" " -f2` + do + if [ -d $dir ] + then + cd $dir + git checkout gh-pages + remotes=`git remote | grep "swc-ja" | wc -l` + if [[ remotes -le 0 ]]; then + git remote add swc-ja https://github.com/$remote_user/$repo-ja.git + fi + git pull swc-ja gh-pages + cd .. + fi + done + + cd ${repo} + git add -u + + #create lesson in _locale if not existing or update + if [ -d ./_locale/ja ] + then + cd _locale/ja + git add -u + git commit -m "update Japanese lessons" + git pull origin master + cd ../.. + else + mkdir -p _locale + url="https://github.com/${remote_user}/${repo}-ja.git" + git submodule add $url ./_locale/ja + fi + + cd _locale/ja remotes=`git remote | grep "swc-ja" | wc -l` if [[ remotes -le 0 ]]; then - git remote add swc-ja https://github.com/$remote_user/$repo-ja.git - fi + git remote add swc-ja https://github.com/${remote_user}/$repo-ja.git + fi git pull swc-ja master + cd ../.. + + #push updated _locale lessons to English lesson + git add -u + git commit -m "update Japanese lessons" + git push swc-ja gh-pages - # remove files provided by template - rm -rf bin/boilerplate - rm -rf _layouts _includes _episodes_rmd assets bin code - - git add * - git commit -m "update lesson files" - git push swc-ja master - - #update original lesson to import translated content - cd ../i18n # or English lesson - git submodule foreach git pull origin master - - #restore locale lessons (only English lessons translated) - for dir in `git submodule | grep "^+" | cut -d" " -f2` - do - if [ -d $dir ] - then - cd $dir - git reset --hard - cd .. - fi - done - - cd ${repo} - git add -u - - #create lesson in locale if not existing or update - if [ -d ./locale/ja ] - then - cd locale/ja - git pull origin master - cd ../.. - else - mkdir -p locale - url="https://github.com/$remote_user/${repo}-ja.git" - git submodule add $url ./locale/ja - fi - - #push updated locale lessons to English lesson - git add -u - git commit -m "update Japanese lessons" - git push swc-ja gh-pages - - cd .. + cd .. +git submodule update -f --recursive fi