我已经在 macOS 中从 Home-brew 安装了 R:
brew install R
Run Code Online (Sandbox Code Playgroud)
不过,现在我需要切换版本并安装特定的 R 版本。出于这个原因,我尝试以两种方式安装 R-3.5.2,但没有成功:
brew install R-3.5.2
brew install R@3.5.2
Run Code Online (Sandbox Code Playgroud)
这就是我得到的:
Error: No available formula with the name "r@3.5.2"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps …Run Code Online (Sandbox Code Playgroud) 非常抱歉问一个愚蠢的问题,但我对此事感到疯狂。
所以,我在bash中,并且有一些文件:
ls
a.bed
b.bed
c.bed
Run Code Online (Sandbox Code Playgroud)
我要做的就是创建一个变量,将所有3个变量用逗号隔开,这是我要搜索的输出:
a.bed, b.bed, c.bed
Run Code Online (Sandbox Code Playgroud)
我现在使用的是什么(但是有空格而不是逗号):
beds=$(ls|grep .bed)
Run Code Online (Sandbox Code Playgroud)
其中有
a.bed b.bed c.bed
Run Code Online (Sandbox Code Playgroud)
非常感谢