小编And*_*asi的帖子

Stargazer R 包:Latex 表中的标题位置

我正在使用 r 中的 stargazer 包来生成乳胶文档的汇总统计信息。但是,该函数会生成标题 (caption) 位于表格顶部的乳胶代码。有没有一种简单的方法可以将标题放在表格下方?

require(stargazer)
df <- data.frame(a=c(1,2,3),
                 b=c(2,3,5),
                 c=c(8,8,9))

stargazer(df,summary = TRUE, type = "latex",
          title = "summary statistic")
Run Code Online (Sandbox Code Playgroud)

该函数的输出如下:

\begin{table}[!htbp] \centering 
  \caption{summary statistic} 
  \label{} 
\begin{tabular}{@{\extracolsep{5pt}}lccccc} 
\\[-1.8ex]\hline 
\hline \\[-1.8ex] 
Statistic & \multicolumn{1}{c}{N} & \multicolumn{1}{c}{Mean} & \multicolumn{1}{c}{St. Dev.} & \multicolumn{1}{c}{Min} & \multicolumn{1}{c}{Max} \\ 
\hline \\[-1.8ex] 
a & 3 & 2.000 & 1.000 & 1 & 3 \\ 
b & 3 & 3.333 & 1.528 & 2 & 5 \\ 
c & 3 & 8.333 & 0.577 & …
Run Code Online (Sandbox Code Playgroud)

latex r stargazer

5
推荐指数
1
解决办法
1732
查看次数

在Julia中定义常量全局变量

在Julia中,将变量const定义为和定义变量之间的区别是const global什么?考虑以下示例,如果我更改const global为有const什么区别?

#set number of cores
number_cores=7;
addprocs(number_cores)

#include necessary functions
@everywhere include("$(pwd())\\lib.jl");

const global n = 2; # number of observables
const global k = nVAR + 2*n-1; # number of states
const global m = k*q;

pmap(a->parallel_un(a,n,k,m),1:7)
Run Code Online (Sandbox Code Playgroud)

julia

3
推荐指数
1
解决办法
1826
查看次数

Fortran在Julia中的SIGN功能

在Julia中存在一个函数,它相当于SIGN(A,B)Fortran中的函数吗?

SIGN(A,B)在Fortran中返回A带有符号的值B.如果B > 0那么结果是ABS(A),否则就是-ABS(A).例如,SIGN(10,-1)会给你-10.

julia

1
推荐指数
1
解决办法
111
查看次数

标签 统计

julia ×2

latex ×1

r ×1

stargazer ×1