简体   繁体   English

R-Shiny错误:“ renderDataTable”和“ server = FALSE”

[英]R-Shiny error: “renderDataTable” and “server=FALSE”

My app uses 我的应用使用

drop_download(path = path1, local_path = path2)
d <<- read.csv(path2)

to read the data.frame, d, where d is a global variable (though I am not sure whether this piece of information is relevant). 读取data.frame,d,其中d是全局变量(尽管我不确定这条信息是否相关)。

And I have 我有

output$t <- DT::renderDataTable(d, server=FALSE) 

which throws an error: 这会引发错误:

Error: C stack usage  15923744 is too close to the limit

However, if I comment server=FALSE then it runs smoothly. 但是,如果我评论server=FALSE则它运行平稳。

Could anyone explain what is going on and what the implications of commenting out server=FALSE ? 任何人都可以解释发生了什么,注释掉server=FALSE意味着什么?

This is explained in ?renderDT . ?renderDT对此进行了说明。 With server = FALSE , all the data are sent to the client-side (the browser), while only the displayed data are sent to the browser with server = TRUE . 使用server = FALSE ,所有数据都发送到客户端(浏览器),而只有显示的数据通过server = TRUE发送到浏览器。 You get an error because your dataset is too big, and sending it entirely to the browser would slow down the app or even crash it. 由于数据集太大而导致错误,将其完全发送到浏览器会降低应用程序的速度甚至崩溃。 Using server = FALSE can simplify some things, for example you don't need to use a proxy when you edit some cells. 使用server = FALSE可以简化某些事情,例如,在编辑某些单元格时不需要使用代理。 But if you don't modify the table contents (editing the cells for example), using server=TRUE does not cause any complication. 但是,如果您不修改表内容(例如,编辑单元格),则使用server=TRUE不会引起任何复杂性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM