RStudio技巧01_美化RStudio的帮助页面
R中的package及其函数实在太多,经常遇到不会使用或者忘记如何使用的的package和函数,所以总会查阅帮助文档,在Rstudio中提供了专门的help面板,当遇到不懂的package或者函数时只需在其前面加?或者将其用help()包裹,即可跳转到帮助页面。下面就是Rstudio的帮助页面:
可以看出,其界面毫无美感可言,可能是开发者想要使用者专注于学习如何使用而特意为之!学过HTML的都知道,可以用css修改页面的样式,让其变得跟家美观。原始文档也有css文件,在rstudio安装路径下的resources文件夹中的R.css文件就控制了页面的样式:
我们可以修改该文档让其变得更加美观!原R.css文档源码如下:
/*
* R.css
*
* Copyright (C) 2009-16 by RStudio, Inc.
*
* Unless you have received this program directly from RStudio pursuant
* to the terms of a commercial license agreement with RStudio, then
* this program is licensed to you under the terms of version 3 of the
* GNU Affero General Public License. This program is distributed WITHOUT
* ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
* AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
*
*/
body, td {
font-family: sans-serif;
font-size: 10pt;
}
::selection {
background: rgb(181, 213, 255);
}
::-moz-selection{
background: rgb(181, 213, 255);
}
a:visited {
color: rgb(50%, 0%, 50%);
}
h1 {
font-size: x-large;
}
h2 {
font-size: x-large;
font-weight: normal;
}
h3 {
color: rgb(35%, 35%, 35%);
}
h4 {
color: rgb(35%, 35%, 35%);
font-style: italic;
}
h5 {
color: rgb(35%, 35%, 35%);
}
h6 {
color: rgb(35%, 35%, 35%);
font-style: italic;
}
img.toplogo {
max-width: 4em;
vertical-align: middle;
}
img.arrow {
width: 30px;
height: 30px;
border:;
}
span.acronym {
font-size: small;
}
span.env {
font-family: monospace;
}
span.file {
font-family: monospace;
}
span.option {
font-family: monospace;
}
span.pkg {
font-weight: bold;
}
span.samp {
font-family: monospace;
}
div.vignettes a:hover {
background: rgb(85%, 85%, 85%);
}
table p {
margin-top:;
margin-bottom: 6px;
}
table[summary="R argblock"] tr td:first-child {
min-width: 24px;
padding-right: 12px;
}
修改后的文档源码如下:
/*
* R.css
*
* Copyright (C) 2009-11 by RStudio, Inc.
*
* Unless you have received this program directly from RStudio pursuant
* to the terms of a commercial license agreement with RStudio, then
* this program is licensed to you under the terms of version 3 of the
* GNU Affero General Public License. This program is distributed WITHOUT
* ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
* AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
*
*/
body, td {
font-family: sans-serif;
font-size: 10pt;
}
::selection {
background: rgb(181, 213, 255);
}
::-moz-selection{
background: rgb(181, 213, 255);
}
a:visited {
color: rgb(50%, 0%, 50%);
}
h1 {
font-size: x-large;
}
h2 {
font-size: x-large;
font-weight: normal;
}
h3 {
color: rgb(35%, 35%, 35%);
}
h4 {
color: rgb(35%, 35%, 35%);
font-style: italic;
}
h5 {
color: rgb(35%, 35%, 35%);
}
h6 {
color: rgb(35%, 35%, 35%);
font-style: italic;
}
img.toplogo {
vertical-align: middle;
}
img.arrow {
width: 30px;
height: 30px;
border:;
}
span.acronym {
font-size: small;
}
span.env {
font-family: monospace;
}
span.file {
font-family: monospace;
}
span.option {
font-family: monospace;
}
span.pkg {
font-weight: bold;
}
span.samp {
font-family: monospace;
}
div.vignettes a:hover {
background: rgb(85%, 85%, 85%);
}
table p {
margin-top:;
margin-bottom: 6px;
}
/* Below is my customization to the help page appearance */
body{
background-color: #fcfcfc;
}
body, td{
font-size: 15px !important;
font-family: "Segoe UI" !important;
}
pre, code, table tr td:nth-child(1){
font-family: "Consolas" !important;
}
code{
border: 1px solid #E1E1E8;
border-radius: 3px;
color: #D14;
background-color: #F7F7F9;
padding: 0px 4px;
}
a{
text-decoration: none;
color: #008AC6;
}
a:hover, a:focus{
color: #005580;
text-decoration: underline;
}
pre{
padding: 8px;
border-style: solid;
border-width: 1px 1px 1px 6px;
border-color: #EAEAEA;
border-left-color: #418AB5;
background-color: #FAFAFA;
/* color: #005580; */
}
body>table:nth-child(1){
border: 1px solid #DDE4E6;
border-radius: 4px;
background-color: #ECF0F1;
padding: 4px 8px;
}
div, body>table:nth-child(1) td{
font-size: 10pt !important;
text-shadow: 1px 1px 0px #FFF;
}
div{
color: #DDE4E6;
}
h2 {
font-weight: 600 !important;
margin-top: 0.2em;
padding-bottom: 10px;
border-bottom: 1px solid #DDE4E6;
color: #418AB5;
}
h3 {
font-weight:;
text-transform: uppercase;
margin-top: 1.5em;
margin-bottom: 0.6em;
}
h3 ~ p, h3 ~ table, h3+* table {
/* margin-left: 20px; */
padding-left: 20px;
}
h3 ~ pre{
margin-left: 20px;
}
h3 + *{
margin-top: 0px;
}
dt {
font-style: italic;
}
p {
line-height: 24px;
}
hr{
border-style: hidden;
}
table[summary$="block"] p {
margin-bottom: 16px;
}
table[summary$="block"] td:nth-child(1) {
padding-right: 16px;
}
table[summary$="block"] td:nth-child(1) code{
padding-right: 16px;
border: none;
background: none;
font-weight: bold;
color: black;
}
table[summary$="block"] tr {
vertical-align: top;
}
table[summary$="block"] td:nth-child(2){
margin: 0px;
}
h2 + table tr:nth-child(even), dl table tr:nth-child(even){
background-color: #EEE;
}
h2 + table, dl table{
border-spacing: 0px 2px;
}
h2 + table{
width: 100%;
padding-left: 20px;
}
也可以直接下载文末的R.css文件覆盖原始文件,然后重启Rstudio即可!
修改后的效果:
R.css下载:http://files.cnblogs.com/files/homewch/R.css
请点击上面的链接→鼠标右击→另存为
本文链接:http://www.cnblogs.com/homewch/p/5940638.html
RStudio技巧01_美化RStudio的帮助页面的更多相关文章
- Rstudio编辑界面美化设置
美化Rstudio的编辑界面有利于我们输入代码,合适的调整更是减少错误. 可以根据自己的喜好和习惯选择.
- RStudio技巧02_Extract Function
RStudio 可以在 source 编辑器中分析一组选择的代码,并自动将其转化成再次使用的函数.任何选择中的"free"变量( 选择引用对象但不创建)将转化为函数参数. (也可使 ...
- grappelli美化django的admin页面
开始用admin时候,觉得它的页面实在...宁愿自己写modules,多费点时间 grappelli可以把admin变得非常美观,配置起来也很简单 第一步,先下载grappelli,搜索一下,wind ...
- 【安卓小技巧】WebView设置在本页面打开网页,而不是启动浏览器打开
使用WebView可以巧妙的在安卓APP中嵌入HTML页面, WebView wb = (WebView) findViewById(R.id.web); //找到WebView控件 wb.setWe ...
- 小技巧:改变 VS Code 工作区页面背景
效果图: 步骤(一): 1.点击页面左上角 文件/首选项/设置 2.在搜索框中输入:background 如下图. 3.找到 Background: Custom Images 选项并点击在 ...
- [技巧篇]00.TrimFilter去掉jsp页面空白,提升访问速度
最近感觉项目访问的速度有点慢,我就在网络中一顿搜索,发下了一个好东东,忍不住跟大家分享,希望大家可以试一试,确实有提升的空间啊!要求去除空白区.提取公用代码.减小页面. 胖先生乱搜之下,找到了Trim ...
- 玩转CSLA.NET小技巧系列一:跳转页面丢失session,如何解决
很少写代码,最近在写代码被登录难倒了,这丫的一直在跟我较劲 每次登录完跳转到首页后还是未登录状态 if (ModelState.IsValid) { bool isSuccess = FI.Finan ...
- CentOS 6主机上的RStudio Server安装步骤
1. 安装EPEL库 yum -y install epel-release 2. 安装R yum install R 3. 安装OpenSSL yum install openssl098e 4. ...
- Install R & RStudio for Ubuntu
Install R r-project.org official source to install the latest R system. add R source sudo vi /etc/ ...
随机推荐
- CLI:如何使用Go开发命令行
CLI或者"command line interface"是用户在命令行下交互的程序.由于通过将程序编译到一个静态文件中来减少依赖,一次Go特别适合开发CLI程序.如果你编写过安装 ...
- SDL 截图、录像、录像播放
截图 使用sdl很简单,视频显示窗口大小,不是视频分辨率大小 int i = Sdl.SDL_SaveBMP(surfacePtr, path); if(i != 0) { MessageBox.Sh ...
- can't open a connection to site 'syb_backup'
sp_configure "allow update",1 go update sysservers set srvname='SYB_BACKUP', srvnetname=' ...
- thinkphp自定义标签库
thinkphp ~ php中 的类, 的成员变量, 本身是没有类型说明的, 那么我怎么知道它的类型呢? 或初始值呢? 通常在类定义中, 如果能给一个初始值的(对于已知简单类型的),最好给一个初始值, ...
- Android之自定义属性
有些时候会觉得Android中提供的控件不能满足项目的要求,所以就会常常去自定义控件.自定义控件就不免会自定义属性.自定义属性大致需要三个步骤:在XML文件中定义自定义属性的名称和数据类型.在布局中调 ...
- Java重点识记
1.final修饰的类不能被继承,已经达到类层次中的最低层. 2.abstract修饰的类或成员方法,表明是抽象的,含有抽象方法的类必须说明是抽象类,必须派生出子类. 3.JAVA对逻辑与和逻辑或提供 ...
- Swift 3.0 【Swift 3.0 相较于 Swift 2.2 的变化】
一.编译器和语法变化 函数或方法参数 调用函数或方法时从第一个参数开始就必须指定参数名 在Swift的历史版本中出现过在调用函数时不需要指定任何函数参数(或者从第二个参数开始指定参数名),在调用方法时 ...
- ACCESS应用笔记<五>——慢慢要学会做项目管理·
综上 第一次写access学习笔记是8月19号的事情,现在已经10月31号 以下是之前的笔记目录: <一> http://www.cnblogs.com/weibaar/p/3923466 ...
- Java表格的简单使用一
JTable组件使用的是模型/视图/控制器的设计方式,将可视化组件从其数据中分离出来,因此表格中的数据都封装在数据模型中.其中最重要的支持类就是TableModel类,这个类用来定义JTable类以及 ...
- KEGG数据库的使用方法与介绍
KEGG数据库的使用方法与介绍 KEGG的数据 KEGG中的pathway是根据相关知识手绘的,这里的手绘的意思可能是指人工以特定的语言格式来确定通路各组件的联系:基因组信息主要是从NCBI等数据库中 ...