?source
状態:
Description:
‘source’ causes R to accept its input from the named file or URL
or connection. Input is read and ‘parse’d from that file until
the end of the file is reached, then the parsed expressions are
evaluated sequentially in the chosen environment.
したがって、
source
あなたが探している機能です、
- 私はあなたの主張に反論します -
source
ドキュメントに従って私のために働きます
文書化された動作が見られない場合は、報告されていない別の問題があるはずです。
それがあなたのをsource
実行していないことをどのように推測していますf
か?
あなたが気付いていないかもしれない 1 つのシナリオを考えることができます。これは に記載されてい?source
ます。
Details:
Note that running code via ‘source’ differs in a few respects from
entering it at the R command line. Since expressions are not
executed at the top level, auto-printing is not done. So you will
need to include explicit ‘print’ calls for things you want to be
printed (and remember that this includes plotting by ‘lattice’,
FAQ Q7.22).
名前で呼び出されたオブジェクトからの出力が表示されない、またはグリッド グラフィックス ベースのプロットが表示されない場合は、評価が最上位で行われていないため、自動印刷がアクティブになっていないことを示しています。print()
Lattice や ggplot2 の図などのグリッドベースのグラフィックスを含め、明示的にオブジェクトを作成する必要があります。
print.eval
引数にも注意してください。デフォルトは
> getOption("verbose")
[1] FALSE
これはあなたにも役立つかもしれません。