我知道我可以find . -name ".DS_STORE"用来查找 当前文件夹和所有子文件夹中的所有.DS_STORE文件.但是如何同时从命令行中删除它们呢?我发现来回切换到所有文件夹并逐个删除它真的很烦人.
谢谢你的建议.
我正在检查我的R包提交CRAN,但有一个注意我无法摆脱.我用谷歌搜索它,但似乎这个注意不常见,因此我没有找到太多有用的信息.任何人都可以为我提供解决方案吗?以下是输出的一部分R CMD check --as-cran.
* using R version 3.2.0 (2015-04-16)
* using platform: x86_64-apple-darwin13.4.0 (64-bit)
* using session charset: UTF-8
* using option ‘--as-cran’
...
...
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... NOTE
File README.md cannot be checked without ‘pandoc’ being installed.
* checking for left-over files ... OK
* checking index information ... OK
Run Code Online (Sandbox Code Playgroud) 我正在Mac OSX上开发具有一些底层C/C++代码和openMP支持的R包。该C++代码是使用Rcpp包编写的。我的全局“ Makevars”文件位于~/.R/文件夹下。该文件如下所示。
CC=clang-omp
CXX=clang-omp++
PKG_CFLAGS=Wall -pedantic
PKG_CFLAGS= -fopenmp
PKG_CXXFLAGS= -fopenmp
PKG_LIBS= -fopenmp -lgomp
Run Code Online (Sandbox Code Playgroud)
在这种配置下,一切正常!
但是,现在我想Makevars为它自己的编译生成特定于程序包的文件,以使程序包可移植。我尝试的只是将全局Makevars文件移动到我的R pakcage src文件夹中。但是,编译器抱怨找不到openMP头文件omp.h:
** libs
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/bigmemory/include" -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/BH/include" -fopenmp -fPIC -Wall -mtune=core2 -g -O2 -c RcppExports.cpp -o RcppExports.o
RcppExports.cpp:12:10: fatal error: 'omp.h' file not found
#include <omp.h>
^
1 error generated.
make: *** [RcppExports.o] Error 1
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include …Run Code Online (Sandbox Code Playgroud) 我想知道是否可以将本地pdf文件链接到Shiny中的操作按钮。例如,我有一个手动按钮。用户单击“手动”操作按钮后,将打开一个pdf文件。
提前致谢。
我需要做以下事情:
vector<int> v;
int flag = 0;
if (flag) {
// initialize v with size 100;
} else {
// initialize v with size 0;
}
...
if (flag) {
// do something with v, given flag != 0
} else {
// don't do with v.
}
Run Code Online (Sandbox Code Playgroud)
这样做的正确方法是什么?谢谢!