我正在使用OS X开发版的R
R Under development (unstable) (2014-05-27 r65787)
Platform: x86_64-apple-darwin13.1.0 (64-bit)
Run Code Online (Sandbox Code Playgroud)
使用GNU Fortran(GCC)4.2.3(来自Simon的站点)和Xcode的命令行工具的5.1.1版本.
从源代码构建时,我得到如下错误:
gfortran-4.8 -fPIC -g -O2 -c altmov.f -o altmov.o
make: gfortran-4.8: No such file or directory
Run Code Online (Sandbox Code Playgroud)
我不知道该怎么做.我可以为我的版本创建一个别名,但我不确定它是否确实需要4.8.
谢谢,
马克斯
我有一些时间序列数据要绘制,我想要更细粒度的轴刻度.例如:
library(lubridate)
library(ggplot2)
library(scales)
dat <- data.frame(date = paste0("09-01-", gsub(" ", "0", format(1:30))),
stringsAsFactors = FALSE)
dat$date <- ymd(dat$date)
dat$y <- rnorm(nrow(dat))
p <- ggplot(dat, aes(x = date, y = y)) + geom_point()
Run Code Online (Sandbox Code Playgroud)
根据这篇文章,我试过了
p + scale_x_continuous(breaks=pretty_breaks(n=10))
Run Code Online (Sandbox Code Playgroud)
但是Error: Discrete value supplied to continuous scale.关于如何做到这一点的任何想法?
R Under development (unstable) (2014-12-29 r67265)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
Running under: OS X 10.9.5 (Mavericks)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages: …Run Code Online (Sandbox Code Playgroud) 我在VM上运行的Red Hat Enterprise Linux Server 6.5版(圣地亚哥)上运行了一个闪亮的服务器(1.3.0.403).
有些应用程序在启动时失败,并显示"应用程序无法启动.应用程序响应时间过长".重新启动闪亮的服务器允许应用程序正常工作,直到问题再次出现(一天之内).
其他应用程序很好.示例应用程序可以正常运行.
我们有几个不同的目录与不同的应用程序.例如,
??? shiny-server ? ??? apps ? ??? sample-apps ? ??? tutorials
奇怪的是,应用程序路径似乎是个问题.例如,如果我复制sample-apps/hello到apps/hello我使用相同的应用程序代码获得相同的超时问题(而它在原始路径中工作).
我已经看过这篇文章,但示例应用程序非常轻量级,加快应用程序的启动似乎不是解决方案.
谢谢,
马克斯
我正在使用knitr,LaTeX并且代码块和输出的开头所回应的命令之间似乎有很多空格:
这个的LaTeX代码如下:
\begin{knitrout}\scriptsize
\definecolor{shadecolor}{rgb}{1, 1, 1}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{> }\hlstd{lda_test_pred} \hlkwb{<-} \hlkwd{predict}\hlstd{(lda_fit,} \hlkwc{newdata} \hlstd{= seg_test)}
\hlstd{> }\hlkwd{library}\hlstd{(pROC)}
\hlstd{> }
\hlstd{> }\hlstd{lda_roc} \hlkwb{<-} \hlkwd{roc}\hlstd{(}\hlkwc{response} \hlstd{= seg_test}\hlopt{$}\hlstd{Class,}
\hlstd{+ } \hlkwc{predictor} \hlstd{= lda_test_pred}\hlopt{$}\hlstd{posterior[,} \hlstr{"PS"}\hlstd{],}
\hlstd{+ } \hlcom{## we need to tell the function that the _first_ level}
\hlstd{+ } \hlcom{## is our event of interest}
\hlstd{+ } \hlkwc{levels} \hlstd{=} \hlkwd{rev}\hlstd{(}\hlkwd{levels}\hlstd{(seg_test}\hlopt{$}\hlstd{Class)))}
\hlstd{> }\hlstd{lda_roc}
\end{alltt}
\begin{verbatim}
Call:
roc.default(response = seg_test$Class, predictor = lda_test_pred$posterior[, "PS"], levels = rev(levels(seg_test$Class)))
Data: lda_test_pred$posterior[, "PS"] in 346 …Run Code Online (Sandbox Code Playgroud) 我有一本书可以很好地编译为 html,但 pdf 版本没有章节。例如,命令
# Introduction {#intro-intro}
Run Code Online (Sandbox Code Playgroud)
被翻译成
\hypertarget{intro-intro}{%
\section{Introduction}\label{intro-intro}}
Run Code Online (Sandbox Code Playgroud)
(gitbook 格式没有这样的问题)
<EDIT>
我# Preface {-}在顶部Index.Rmd和\mainmatter最后。也许它没有脱离序言?罗马数字在 处变回非罗马数字# Introduction。
</EDIT>
我的Index.Rmd有
---
documentclass: krantz
classoption: numberinsequence
bibliography: [book.bib]
biblio-style: apalike
link-citations: yes
colorlinks: yes
graphics: yes
---
Run Code Online (Sandbox Code Playgroud)
_bookdown.yml 是
new_session: yes
output_dir: working_files
clean: [bookdown.bbl]
language:
label:
fig: "Fig. "
tab: "Table "
Run Code Online (Sandbox Code Playgroud)
并且_output.yml是
bookdown::gitbook:
css: css/style.css
dev: svglite
bookdown::pdf_book:
includes:
in_header: latex_extras/preamble.tex
before_body: latex_extras/before_body.tex
after_body: latex_extras/after_body.tex
keep_tex: yes …Run Code Online (Sandbox Code Playgroud) 使用时
render_book("index.Rmd", "bookdown::pdf_book")
Run Code Online (Sandbox Code Playgroud)
它看起来像一条线,设置边距插入到tex文件中
\usepackage[margin=1in]{geometry}
Run Code Online (Sandbox Code Playgroud)
该bookdown-demo摄制可以用来重现此。
在中index.Rmd,我正在使用
---
date: "`r Sys.Date()`"
knit: "bookdown::render_book"
documentclass: krantz
classoption: numberinsequence,krantz1
bibliography: [book.bib]
biblio-style: apalike
link-citations: yes
colorlinks: yes
---
Run Code Online (Sandbox Code Playgroud)
这正在破坏该样式文件设置的边距。我知道可以修改几何图形选项,但是可以避免生成这条线吗?
谢谢
> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS Sierra 10.12.4
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] bookdown_0.4
loaded via a namespace (and not attached):
[1] backports_1.0.5 magrittr_1.5 rprojroot_1.2 htmltools_0.3.6
[5] …Run Code Online (Sandbox Code Playgroud)