Шаблон:File — различия между версиями
Материал Psylab.info - энциклопедии психодиагностики
м |
м |
||
| Строка 31: | Строка 31: | ||
|lang=r | |lang=r | ||
|code= | |code= | ||
| − | # .Rprofile -- commands to execute at the beginning of each R session | + | <nowiki><</nowiki>nowiki># .Rprofile -- commands to execute at the beginning of each R session |
# | # | ||
# You can use this file to load packages, set options, etc. | # You can use this file to load packages, set options, etc. | ||
| Строка 44: | Строка 44: | ||
options(showWarnCalls = TRUE, showErrorCalls = TRUE) | options(showWarnCalls = TRUE, showErrorCalls = TRUE) | ||
| − | utils::rc.settings(ipck = TRUE) | + | utils::rc.settings(ipck = TRUE)<nowiki></nowiki></nowiki> |
}} | }} | ||
</pre> | </pre> | ||
Версия 16:56, 20 февраля 2014
Использование
| Рекомендация: Во избежании неправильной работы шаблона обрамляйте код в кэги
<nowiki></nowiki>. Это необходимо, если в коде встречаются символы «|». |
{{file
|title=Заголовок
|subtitle=Подзаголовок
|description=Описание
|lang=Язык для подсветки синтаксиса
|code=Содержимое файла
}}
Примеры
{{file
|subtitle=$HOME/.Rprofile
|lang=r
|code=
<nowiki># .Rprofile -- commands to execute at the beginning of each R session
#
# You can use this file to load packages, set options, etc.
#
# NOTE: changes in this file won't be reflected until after you quit
# and start a new session
#
options(digits = 4)
options(digits.secs=3)
options(show.signif.stars = FALSE)
options(showWarnCalls = TRUE, showErrorCalls = TRUE)
utils::rc.settings(ipck = TRUE)</nowiki>
}}
Файл
<syntaxhighlight lang="r" enclose="pre"># .Rprofile -- commands to execute at the beginning of each R session # # You can use this file to load packages, set options, etc. # # NOTE: changes in this file won't be reflected until after you quit # and start a new session # options(digits = 4) options(digits.secs=3) options(show.signif.stars = FALSE) options(showWarnCalls = TRUE, showErrorCalls = TRUE) utils::rc.settings(ipck = TRUE)</syntaxhighlight>