// 2006年  1月 16日 月曜日 16:17:47 JST
// 谷村
// じゃんじゃん加筆してください

&size(25){&color(red){''Rを引用する''};};

Rを使った研究成果を論文化するときに、どのように記述するかを一緒に考えましょう。

#contents

* 引用文献リストの表記

引用文献リストのフォーマットは投稿先雑誌の指定に従いますが、その内容はcitation()で表示されるものでよいと思います。しかし、
実際の論文を見ると、citation()の書誌情報以外にR.Ihaka and R.Gentleman (1996)を引用している文献も見られます。

 Ihaka, R., and R. Gentleman. 1996. R: a language for data analysis
 and graphics. J. Comp. Graph. Stat. 5:299-314. Available via
 http://www.R-project.org.

これが必要なBibTeXユーザは下記をコピーして使います。

 @Article{ihak:gent:1996,
   author = 	 {Ross Ihaka and Robert Gentleman},
   title = 	 {R: {A} Language for Data Analysis and Graphics},
   journal = 	 {Journal of Computational and Graphical Statistics},
   year = 	 1996,
   volume =	 5,
   number =	 3,
   pages =	 {299--314},
   url =         {www.r-project.org}
 }

この他にも下記のようなものもあります。
 R is a language and environment for statistical computing
 and graphics similar to S http://cran.r-project.org/.

* citation()の使い方

Rの書誌情報が必要なときは
 > citation()
 
 To cite R in publications use:
 
   R Development Core Team (2005). R: A language and environment for
   statistical computing. R Foundation for Statistical Computing,
   Vienna, Austria. ISBN 3-900051-07-0, URL http://www.R-project.org. 
 
 A BibTeX entry for LaTeX users is
 
   @Manual{,
     title = {R: A language and environment for statistical computing},
     author = {{R Development Core Team}},
     organization = {R Foundation for Statistical Computing},
     address = {Vienna, Austria},
     year = {2005},
     note = {{ISBN} 3-900051-07-0},
     url = {http://www.R-project.org},
   }
 
 We have invested a lot of time and effort in creating R, please cite it
 when using it for data analysis. See also 'citation("pkgname")' for
 citing R packages.

とします。この出力をコピー&ペースとして利用します。文献管理ソフトなどを使わずに原稿の中に直接書く場合には、投稿規定に合わせて適切に加工してください。BibTeXを使う人は、上記のBibTeX形式データには引用キーがないことに注意してください(親切で意図的に引用キーを抜いていると思われる)。



citation()の出力の中でBibTeX形式 のところだけ欲しい場合は、toBibtex()を使います。
 > toBibtex(citation())
 [[1]]
 @Manual{,
   title = {R: A language and environment for statistical computing},
   author = {{R Development Core Team}},
   organization = {R Foundation for Statistical Computing},
   address = {Vienna, Austria},
   year = {2005},
   note = {{ISBN} 3-900051-07-0},
   url = {http://www.R-project.org},
 }
これをbibファイルとして保存したい場合は、
 > write(toBibtex(citation())[[1]],file="bibファイル")
とします。
 > write(unlist(toBibtex(citation())),file="bibファイル")
でも構いません。R本体だけはなく、パッケージも引用したい場合は、
 citation("パッケージ名")
とします。例えば
 > citation("maptools")
 To cite package 'maptools' in publications use:
 
  Nicholas J. Lewin-Koh and Roger Bivand (2005). maptools: tools for
  reading and handling shapefiles. R package version 0.5-2.
 
 A BibTeX entry for LaTeX users is
 
  @Manual{,
    title = {maptools: tools for reading and handling shapefiles},
    author = {Nicholas J. Lewin-Koh and Roger Bivand},
    year = {2005},
    note = {R package version 0.5-2},
  }
 
 ATTENTION: This citation information has been auto-generated from the
 package DESCRIPTION file and may need manual editing, see
 'help("citation")' .
とします。これも同様にBibTeX形式のところだけ欲しい場合はtoBibTeX()を使います。

* BibTeX以外の文献管理ソフトウェアへのエキスポート
bibファイルを他の文献管理ソフトウェアの形式に変換するには、[[Bibutils:http://www.scripps.edu/~cdputnam/software/bibutils/]]を使います。UNIX(SunOS, IRIX)版、Linux版、OSX版、Windows版などが用意されています。VineLinuxであればVinePlus extrasに用意されているので、
 # apt-get install bibutils
でネットワークインストールされます。簡単でしょ(^o^)/
** EndNote形式に変換する
ターミナル(Windowsの場合はコマンドプロンプト?)で次のようにすればBibTeX形式をEndNote形式に変換できます。
 $ bib2xml bibファイル | xml2end > endnoteファイル
さて、Rの中で処理を完結するには、例えば
 > write(unlist(toBibtex(citation()),file='/tmp/tmp.bib')
 > system('bib2xml /tmp/tmp.bib | xml2end > /tmp/tmp.end')
とすると下記のようなtmp.endができているはず。
 %0 Generic
 %T R: A language and environment for statistical computing
 %A Team, R. Development Core
 %A R Foundation for Statistical Computing
 %D 2005
 %C Vienna, Austria
 %F Team2005
 %O ISBN 3-900051-07-0
 %U http://www.R-project.org
system()の標準入力へRのオブジェクトの内容を流すことができたら、中間ファイルのtmp.bibは不要になりますが、今のところやり方が不明です。

** RIS形式に変換する
RIS形式は広く使われているので、bibファイルのインポートに対応していなくても、RIS形式にすればインポートできる可能性が大きい。
 $ bib2xml bibファイル | xml2ris > risファイル

* 本文中の記述

投稿先のエディタが指示する通りに表記するのが基本です。しかし、どう書いてよいか分からない場合は、とりあえず本文中にはRとそのバージョンを書いて、引用記号を付けたらよいでしょう。使用パッケージも同様にすればよいと思います。

例えばこんな感じはどうでしょう。
 A one-way repeated-measure multivate analysis of variance (manova; R Ver 2.2.1 [1]) 
 was used on each of the dependent variables A, B and C to test for significant
 differences over time.
 
 References
 [1] R Development Core Team (2005). R: A language and environment for statistical
   computing. R Foundation for Statistical Computing, Vienna, Austria. ISBN
   3-900051-07-0, URL http://www.R-project.org. 

[[JJCO投稿に際しての統計解析結果のレポートに関するガイドライン:http://www.jjco.org/files/guidelinetextjp.html]]の1-1-8 統計解析に用いたソフトウェアが参考になるかも。

また、使用ソフトウェアを記述するときに製作会社(ソフトウェアハウスまたは販売元)も併記する習慣もあります。そのような場合は・・・みなさんどうしています?

----
* コメント
#comment


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS