Called GraphExeter, the material could revolutionise the creation of wearable electronic devices, such as clothing containing computers, phones and MP3 players. GraphExeter could also be used for the creation of ‘smart’ mirrors or windows, with computerised interactive features. Since this material is also transparent over a wide light spectrum, it could enhance by more than 30% the efficiency of solar panels. Adapted from graphene, GraphExeter is much more flexible than indium tin oxide (ITO), the main conductive material currently used in electronics. ITO is becoming increasingly expensive and is a finite resource, expected to run out in 2017. These research findings are published in Advanced Materials , a leading journal in materials science. At just one-atom-thick, graphene is the thinnest substance capable of conducting electricity. It is very flexible and is one of the strongest known materials . The race has been on for scientists and engineers to adapt graphene for flexible electronics. This has been a challenge because of its sheet resistance, which limits its conductivity. Until now, no-one has been able to produce a viable alternative to ITO. To create GraphExeter, the Exeter team sandwiched molecules of ferric chloride between two layers of graphene. Ferric chloride enhances the electrical conductivity of graphene, without affecting the material’s transparency. The material was produced by a team from the University of Exeter’s Centre for Graphene Science. The research team is now developing a spray-on version of GraphExeter, which could be applied straight onto fabrics, mirrors and windows. Lead researcher, University of Exeter engineer Dr Monica Craciun said: “GraphExeter could revolutionise the electronics industry. It outperforms any other carbon-based transparent conductor used in electronics and could be used for a range of applications, from solar panels to ‘smart’ teeshirts. We are very excited about the potential of this material and look forward to seeing where it can take the electronics industry in the future.” More information: http://onlinelibra … 489/abstract
C:\Documents and Settings\xihang\Application Data 里面有软件自动升级下载的东西,因此软件自动升级后如果想找升级包也来这个文件夹下寻找。 不过这个文件夹里的东西不能乱删除的,多删除了可能会影响系统运行。大家可以找找那些非常的文件夹下有没有什么升级包,caches之类的文件删除了就没有问题。 我以Apple Computer文件夹举例 Apple Computer就有2.5G多的存储量 1,其中itunes里面有新的ipod固件,不需要可删除。 2,MobileSync里面有backup发现每次backup都保留着,我把不需要的都删除了。 C:\WINDOWS 里面的类似于$NtUninstallKB898461$的文件都可以删除。这个是安装补丁的反安装程序,一般大家都不需要卸载安装的补丁,所以可以删除。 $hf_mig$是安装补丁的备份文件,也可以删除。 C:\Documents and Settings\xihang\Local Settings 里面的Temp和Temporary Internet Files文件夹里的东西可以删除,不过一般这些都会被系统清流软件删除掉。
在 windows 中创建 R 程序包简明指南 在 Windows 环境下如何编写 R 程序包?也就是生成供 linux 环境编译运行的 tar.gz 文件,也生成供 windows 下使用的 .zip 文件?这一过程并不复杂,但要下载一些工具软件,按照相应的步骤填写相应的 “ 表格 ” ,继而在控制台中输入一些指令。如果你是 R 的用户,相信这些不应该陌生了。 在 Windows 下编写 R 程序包通常包括以下几步: ( 1 )工具软件 Rtools 的安装和备选软件的安装。 ( 2 ) r 脚本的准备,也就是用来生成程序包的函数脚本。 ( 3 )利用 R 中自带的 package.skeleton() 函数,生成制作包所需要的 Description 文件和帮助文件 .rd 。 ( 4 )按要求填写生成的 Description 文件和帮助文件 .rd ( 5 )在 windows cmd 的命令行中输入相应的命令,生成 zip 文件或者 .tar.gz, 并进行相应的检查。 下面我们来创建最简单的一个 R 程序包,其中只包含一个函数。 一 工具软件安装和配置 制作 r 包的工具软件包括 Rtools , MikTeX 或 Ctex ( 如果不想获得 pdf 手册,则不需要安装 ) 1 工具软件安装 ( 1 ) Rtools (制作 R 包的主要工具) Rtools 是在 windows 下制作 R 包的一系列工具,其中包括 1 ) CYGWIN 在 Windows 下模拟 UNIX 环境 2 ) MinGW 编译器,可用来编译 C 和 Fortran 语言。 3 ) Perl 下载地址: http://www.murdoch-sutherland.com/Rtools/ ( 2 ) MikTeX 或 CteX (备选) 用来生成 PDF 格式的帮助文件 下载地址: http://www.miktex.org/ www.ctex.org/ 分别按照要求安装好。 2 设置文件启动路径: 设置启动路径的目的是在 cmd 命令行可以直接调用 Rtools 等相应软件。 右键点击: 我的电脑 属性 高级 环境变量 系统变量 PATH 一项,点击 “ 编辑 ” ,检查是否具有以下路径。通常软件在安装时已经自动配置好了启动路径。如果没有,需要手工添加: c:\Rtools\bin;c:\Rtools\perl\bin;c:\Rtools\MinGW\bin; C:\CTEX\MiKTeX\miktex\bin;C:\CTEX\CTeX\ctex\bin;C:\CTEX\CTeX\cct\bin;C:\CTEX\CTeX\ty\bin; C:\Program Files\R\R-2.15.0\bin\; 图 1 设置启动路径 二 R 脚本的准备 假如现在我们已经有了一个编好的 R 函数 freq ,用来计算物种出现的相对频度 , 存成了 r 脚本的格式 , 文件名为 freq .r 其内容如下所示 ############################################## freq - function(matr) { matr - as.matrix(matr) if(!is.matrix(matr)) { stop("The input data must be matrix!\n") } if(any(is.na(matr))) { matr - na.omit(matr) print(paste("NA found in matrix, and have been removed\n")) } matr - 1 result - apply(matr, 2, sum)/nrow(matr) return(result) } ############################################## 下面是用 R 自带的 package.skeletons() 函数生成 R 程序包的框架 三 R 包框架的准备 1 生成准备文件 登陆 R :开始 所有程序 RR.2.15.0 (1) 清除内存中的对象,目的删除 R 内存中所有不需要的数据或函数: rm(list=ls()) (2) 设定工作目录,这里设定为 c:/pa setwd("c:/pa") (3) 先用 source() 函数将 r 脚本中的函数读取。 如果要创建的 R 包中有很多函数,则建议先将各函数存在一个脚本文件,再用 source() 函数读取该脚本中的各函数,并将需要的数据读取到内存中。用 package.skeleton ( name="packname", list = ls() )生成相应的包框架。 这里,我们要创建一个名为 freq 的 R 包。则输入以下命令: package.skeleton(name="freq", list = ls()) 此时, R 控制台中显示 package.skeleton(name="freq", list = ls()) Creating directories ... Creating DESCRIPTION ... Creating Read-and-delete-me ... Saving functions and data ... Making help files ... Done. Further steps are described in './freq/Read-and-delete-me'. 可以看到 c:/pa 文件夹下新出现了一个 freq 文件夹 该文件夹下的内容就是 R 包的框架,包括 Read-and-delete-me , DESCRIPTION 文件, r 文件夹, man 文件夹,只要按要求将其填写完整,再进行相应的编译即可。 Read-and-delete-me 包括如何创建 R 包 DESCRIPTION 是对 R 包的简要介绍 r 文件夹中存放的是 .r 文件,即各函数的源代码 man 文件夹下存放的是 Rd 文件,也就是 R 帮助的源代码 首先查看 Read-and-delete-me 文件 文件内容如下: #################################################################################### * Edit the help file skeletons in 'man', possibly combining help files for multiple functions. * Put any C/C++/Fortran code in 'src'. * If you have compiled code, add a .First.lib() function in 'R' to load the shared library. * Run R CMD build to build the package tarball. * Run R CMD check to check the package tarball. Read "Writing R Extensions" for more information. #################################################################################### 大致意思如下: 可以 man 文件夹下编辑帮助文件 C/C++/Fortran 的源代码应该放入 src 文件夹下 需要在登录时载入包 可以运行 R CMD 建立和检查相应的包 注:这里的 R CMD 说的是在 Linux 的终端输入的命令,实际上在 Windows 环境中应该输入 Rcmd Rcmd build packname 给源程序打包, Rcmd build --binary packname 建立 zip 包。 Rcmd check packname 检查程序包的错误。 查看过该文件之后,需要将其删除。 2 编辑 Description 文件和 rd 文件 ( 1 ) Description 文件的编辑 按照提示,填好各项 Description 文件是该程序包的简介,这一格式是 Debian Linux 的作者发明的。 内容如下: 红色部分是需要手工编辑的。 需要特别注意的是,本程序包的例子中使用了 vegan 程序包的数据,则应该在 Description 文件中加入 Suggests : vegan, 否则在 Rcmd check 中将不能通过。 如果程序包中的 R 函数引用 vegan 程序包的函数,则需要在 Description 文件中加入 Depends:vegan 这样在该程序包被载入的同时,保证 vegan 程序包也被载入。 #################################### Package: freq Type: Package Title: Calculate relative frequency Version: 1.0 Date: 2010-05-20 Author: Jinlong Zhang Maintainer: Jinlong Zhang Description: Calculate relative frequency for species matrix. License: GPL-2 LazyLoad: yes Suggests: vegan ##################################### ( 2 ) man 文件夹中 .rd 文件编辑 man 文件夹中包含两个文件 freq.Rd 和 freq-package.Rd ,分别是对 freq() 函数和 freq 包的介绍,下面逐项填写 : Rd 文件的格式与 Tex 的格式很像,如果有 LaTex 的基础,则会毫不费力。如果没有,则需要仔细琢磨一下了。 Rd 文件的项目中不能留空,否则在检查时会显示警告。其中 title 是必须填写的内容。同时要注意 : 在 Rd 文件中 , 不要出现非 ASCII 码字符 , 否则在 Rcmd check 中将不能通过。 freq.Rd 文件内容:红色的为手工输入的部分,原文件中 % 后的为注释,可以忽略 ################################################################# \name{freq} \alias{freq} \title{ Species relative frequency } \description{ This function calculates the species relative frequency which equals to the numbers of occupied plots partitioned by the total number of plots for each species. } \usage{ freq.calc(matr) } \arguments{ \item{matr}{ The standard species matrix } } \details{ The input data is a standard species matrix with rows for plots and column for species. } \value{ Returns a vector that contains relative frequency for each species included in the input matrix. } \references{ None } \author{ Jinlong Zhang \email{jinlongzhang01@gmail.com} } \examples{ library(vegan) data(BCI) freq(BCI) } \keyword{ frequency } \keyword{ species } ###################################################################### freq-package.Rd 中帮助文件的填法与 freq.Rd 的类似。 四 通过 cmd 创建 R 包 在 Windows 开始 运行 cmd 键入 cd/dc:\pa\ 将工作目录转移到 c:/pa 下(win 7加/d参数) 键入 Rcmd build --binary freq 制作 windows zip 包 键入 Rcmd build freq 制作 linux 平台下可运行的 tar.gz 包 命令运行完之后可以发现,在 c:/pa/ 文件夹下分别生成了 freq.zip 和 freq_1.0.tar.gz 压缩包。 键入 Rcmd check freq 对 freq_1.0.tar.gz 代码的各项内容进行检查。 键入 Rcmd Rd2pdf freq 生成 pdf 格式的命令手册。 图 4 在 cmd 中输入 Rcmd build freq ,获得相应的 tar.gz 程序包 如果作者希望将自己制作的 Package 上传到 CRAN ,则必须要通过 Rcmd check ,并且其中不能有任何错误或警告。 参考网址 http://www.robjhyndman.com/researchtips/building-r-packages-for-windows http://cran.r-project.org/doc/contrib/Leisch-CreatingPackages.pdf http://www.biostat.uni-hannover.de/teaching/fallstudien/schaarschmidt2.pdf