在html文件中设置r代码输出宽度的当前工作解决方案是什么?我想将宽度设置为大的并在html输出中使用滑块.
options(width = XXX) 似乎不再工作了.
---
title: "Width test"
output:
html_document:
theme: default
---
```{r global_options, echo = FALSE, include = FALSE}
options(width = 999)
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE,
cache = FALSE, tidy = FALSE, size = "small")
```
```{r}
sessionInfo()
```
```{r}
dataM <- matrix(rnorm(100, 5, 2), ncol = 15)
dataM
```
Run Code Online (Sandbox Code Playgroud)
sessionInfo()输出在上面的截图中.
(options(width = 999)不适合我)
首先,对缺乏可重复的示例表示道歉,但我无法真正提供一个,因为我认为问题在于我的网络设置.请将此问题视为调试问题的求助电话...
在RStudio中打开一个项目,存储在网络驱动器上并运行第一条指令(即它是一个包加载甚至a <- 1),我在控制台中看到一个非常奇怪的输出:
> a <- 1
Warning message:
In dir.create(tempPath, recursive = TRUE) :
cannot create dir 'F:\Marketing', reason 'Permission denied'
Run Code Online (Sandbox Code Playgroud)
我在用户环境变量(TEMP,TMP,TMPDIR)中设置了所有可能的临时目录,并Sys.getenv()正确打印它们.
"F:\ Marketing"是我的网络驱动器上的有效路径,它是项目的根目录.
我曾尝试debugonce(dir.create)在.RProfile中查看tempPath是什么,但不幸的是,这导致了"无效'envir'参数"错误.
将项目复制到本地驱动器后,问题就消失了,所以这显然是网络驱动器/网络设置问题,但我不知道在哪里挖掘更多和我的IT部门.在这里真的没用......
任何想法如何调试此警告?
devtools::install_git通过代理与GitLab一起引发Installation failed: Error in 'git2r_clone': failed to send request: A connection with the server could not be established错误。
为了测试我的GitLab和GitHub工作流程,我创建了一些存储库:
在文件的.gitconfig建立我公司的代理服务器设置后,我能够访问他们所有在HTTPS与例如从混帐bash的控制台git fetch github_public master,在那里github_public简直就是https://github.com/m-dz/md.test_public.git等
设置代理(需要使用devtools::install_github)后:
httr::set_config(
httr::use_proxy(
url = 'proxy_url',
port = proxy_port,
username = 'username',
password = 'password'
)
)
Run Code Online (Sandbox Code Playgroud)
和更新都devtools和git2r到开发版本(只是要确定)与devtools::install_github我能够使用:
devtools::install_git('https://github.com/m-dz/md.test_public.git', quiet = FALSE)
Run Code Online (Sandbox Code Playgroud)
从GitHub安装公共仓库(但devtools::install_github('m-dz/md.test_public') …
我正在尝试按照此处的答案计算文件中的行数,例如 using find /C,但我在控制台中看到的只是:
find: '/C': No such file or directory
find: 'A': No such file or directory
Run Code Online (Sandbox Code Playgroud)
我有一个简单的“TEST.txt”文件,其中包含三个 As 和三个 B,都在新行中:
$ type TEST.txt
A
A
A
B
B
B
Run Code Online (Sandbox Code Playgroud)
findstr 似乎工作,但它不能返回计数:
$ type TEST.txt | findstr "A"
A
A
A
Run Code Online (Sandbox Code Playgroud)
查找不起作用:
$ type TEST.txt | find "A"
find: 'A': No such file or directory
Run Code Online (Sandbox Code Playgroud)
我错过了什么?
PS:1中的整个示例也不起作用:
$ findstr /R /N "^" TEST.txt | find /C ":"
find: '/C': No such file or directory …Run Code Online (Sandbox Code Playgroud)