我已确保列与列选项卡中的“要导出的列”字段匹配,而不是空列有数据,在 csv 和 txt 中都尝试过,但我得到的只是一条消息:
已创建导入/导出作业
没有别的:没有错误,没有警告,没有完成。
视窗7 OS
Version1.4
CopyrightCopyright二○一三年至2017年,该pgAdmin的开发团队
的Python Version2.7.12(v2.7.12:d33e0cf91556,2016年6月27日,15时19分22秒)[MSC v.1500 32位(英特尔)]
瓶Version0。 11.1
应用模式桌面
在那之前我会通过 psql 尝试
我必须在android应用程序中实现WebRTC,因为我使用的是libjingle库,版本为11139.在这里我总是得到pc(PeerConnection class instance)总是空的.我检查过的值
factory(PeerConnectionFactory)
iceServers(LinkedList<IceServers>
mediaConstraints
Peer.this(PCObserver interface))
Run Code Online (Sandbox Code Playgroud)
但他们都不是空的.那么为什么我总是得到结果null.我在这里做错了吗???
pc = factory.createPeerConnection(iceServers, mediaConstraints, Peer.this);
Run Code Online (Sandbox Code Playgroud)
编辑:
public CallManager(TagoveApplication context, CustomSocket server, CallType callType) {
this.server = server;
this.context = context;
initializeFactoryFieldTrials(); //initialize peer conn factory field trials
PeerConnectionFactory.initializeAndroidGlobals(context, true, true, true);
//PeerConnectionFactory.initializeAndroidGlobals(context, true, true, true, VideoRendererGui.getEGLContext());
factory = new PeerConnectionFactory();
iceServers.add(new PeerConnection.IceServer("turn:xxx.xxx.xxx.xxx:xxxx?transport=udp", "xxxxxxxx", "xxxxxxxxx"));
iceServers.add(new PeerConnection.IceServer("stun:stunserver.org"));
iceServers.add(new PeerConnection.IceServer("stun:stun.ekiga.net"));
iceServers.add(new PeerConnection.IceServer("stun:stun.fwdnet.net"));
iceServers.add(new PeerConnection.IceServer("stun:stun.ideasip.com"));
iceServers.add(new PeerConnection.IceServer("stun:stun.iptel.org"));
iceServers.add(new PeerConnection.IceServer("stun:stun.rixtelecom.se"));
iceServers.add(new PeerConnection.IceServer("stun:stun.schlund.de"));
pcConstraints.mandatory.add(new MediaConstraints.KeyValuePair("OfferToReceiveAudio", "true"));
pcConstraints.mandatory.add(new MediaConstraints.KeyValuePair("OfferToReceiveVideo", "true"));
pcConstraints.optional.add(new MediaConstraints.KeyValuePair("DtlsSrtpKeyAgreement", "true")); …Run Code Online (Sandbox Code Playgroud) 我有一个表,其中 5 列和第一列作为字符,其他四列作为数字。我正在使用 DT 数据表在 Shiny App 中显示相同的内容。现在,我需要比较每行的四个列中的每一个,并对具有最大值的行单元格进行颜色编码。寻找方法来做同样的事情。也看过这个链接以及StylingCells但此处的所有列都是数字。
entity <- c('entity1', 'entity2', 'entity3')
value1 <- c(21000, 23400, 26800)
value2 <- c(21234, 23445, 26834)
value3 <- c(21123, 234789, 26811)
value4 <- c(27000, 23400, 26811)
entity.data <- data.frame(entity, value1, value2, value3, value4)
header <- dashboardHeader()
sidebar <- dashboardSidebar()
body <- dashboardBody(DT::dataTableOutput("entity.dataTable"))
shinyApp(
ui = dashboardPage(header, sidebar, body),
server = function(input, output) {
output$entity.dataTable <- renderDataTable({
DT::datatable(
entity.data,
selection = "single",
filter = 'bottom',
extensions = …Run Code Online (Sandbox Code Playgroud) 当我尝试从 Spark 数据帧收集数据时,出现错误提示
“java.lang.IllegalArgumentException:要求失败:小数精度 39 超过最大精度 38”。
Spark 数据帧中的所有数据都来自 Oracle 数据库,我相信小数精度小于 38。有什么方法可以在不修改数据的情况下实现这一目标?
# Load required table into memory from Oracle database
df <- loadDF(sqlContext, source = "jdbc", url = "jdbc:oracle:thin:usr/pass@url.com:1521" , dbtable = "TBL_NM")
RawData <- df %>%
filter(DT_Column > DATE(‘2015-01-01’))
RawData <- as.data.frame(RawData)
Run Code Online (Sandbox Code Playgroud)
给出错误
以下是堆栈跟踪:
警告 TaskSetManager:在阶段 0.0 中丢失任务 1.0(TID 1、10。 ..***, executor 0): java.lang.IllegalArgumentException: 要求失败:在 org.apache.spark.sql.types 的 scala.Predef$.require(Predef.scala:224) 处,小数精度 39 超过最大精度 38。 Decimal.set(Decimal.scala:113) at org.apache.spark.sql.types.Decimal$.apply(Decimal.scala:426) at org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$$ anonfun$org$apache$spark$sql$execution$datasources$jdbc$JdbcUtils$$makeGetter$3$$anonfun$9.apply(JdbcUtils.scala:337) 在 org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils $$anonfun$org$apache$spark$sql$execution$datasources$jdbc$JdbcUtils$$makeGetter$3$$anonfun$9.apply(JdbcUtils.scala:337) 在 org.apache.spark.sql.execution.datasources.jdbc .JdbcUtils$.org$apache$spark$sql$execution$datasources$jdbc$JdbcUtils$$nullSafeConvert(JdbcUtils.scala:438) 在 org.apache.spark.sql。execution.datasources.jdbc.JdbcUtils$$anonfun$org$apache$spark$sql$execution$datasources$jdbc$JdbcUtils$$makeGetter$3.apply(JdbcUtils.scala:337) 在 …
我正在尝试使用以下代码添加geom_smooth()到a qplot():
library(ggplot2)
library(ggplot2movies)
qplot(votes, rating, data = movies) + geom_smooth()
Run Code Online (Sandbox Code Playgroud)
但是,情节中缺少更平滑的.我还收到以下警告信息:
计算失败
stat_smooth():未找到对象'C_crspl'
有人知道这里有什么问题吗?
这是我的设置:
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.1 LTS
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用data.table包中的fread()函数读取肮脏的CSV文件,但字符串值中嵌入的双引号和逗号存在问题,即引号字段中存在未转义的双引号。以下示例数据说明了我的问题。它由3行/行和6列组成,第一行包含列名:
"SA","SU","CC","CN","POC","PAC"
"NE","R","000","H "B", O","1","8"
"A","A","000","P","E,5","8"
Run Code Online (Sandbox Code Playgroud)
第一个问题在第2行中,该行具有一对嵌入的双引号和一个逗号:"H "B", O"。第二个问题在第3行中,双引号中有一个逗号:"E,5"。我尝试了以下方法:
尝试1
library(data.table)
x1 <- fread(file = "example.csv", quote = "\"")
Run Code Online (Sandbox Code Playgroud)
输出:
> x1
V1 "SA" "SU" "CC" "CN" "POC" "PAC"
1: "NE" "R" 0 "H "B" O" "1" 8
2: "A" "A" 0 "P" "E 5" 8
Run Code Online (Sandbox Code Playgroud)
信息:
在前100行中发现并解决了不正确的报价。如果未用引号引起来(例如,字段分隔符未出现在任何字段中),请尝试使用quote =“”以避免此警告。检测到6个列名,但数据具有7列(即无效文件)。为第一列添加了1个额外的默认列名称,该名称可能是行名或索引。如果此猜测不正确,请在以后使用setnames(),或修复创建该文件的文件写入命令以创建有效文件。
结论:结果不正确,因为它添加了一个新列V1。
尝试2
x2 <- fread(file = "example.csv", quote = "")
Run Code Online (Sandbox Code Playgroud)
输出:
> x2
V1 "SA" "SU" "CC" "CN" "POC" "PAC"
1: "NE" "R" "000" "H …Run Code Online (Sandbox Code Playgroud) 我正在尝试从 2 组数据移动到 3 组数据,如上述问题中所述。以下是我使用的脚本:
set.seed(125)
d <- sample(x = nrow(db), size = nrow(db) * 0.60, )
train60 <-db[d, ]
valid40 <-db[-d, ]
Run Code Online (Sandbox Code Playgroud)
有没有办法修改上面的脚本?我试图创建另一行:
valid40 <- db[-d] * 0.2 这不起作用。
当前数据集有几个因子变量。
我曾尝试在函数上使用Frank 的解决方案cut,但不知何故我设法得到
cut.default(seq(nrow(df)), nrow(df) * cumsum(c(0, spec)), labels = names(spec)) 中的错误:'breaks' 和 'labels' 的长度不同
即使在网上搜索帮助后我也不明白。
ncvars = c("prate", "arate", "wpd", "Atm1", "Atm2", "area", "fC", "bas__1", "bas__asssaa", "bas__Clow", "bas__g2333e", "baser__arge", "bas__Aow", "bas__Aass")
Run Code Online (Sandbox Code Playgroud)
现在,我想删除所有元素
areabas__我怎样才能做到这一点?
审判
patterns <- c("bas__", "area")
ncvars %>%
filter(.,grepl(paste(patterns, collapse="|")))
Run Code Online (Sandbox Code Playgroud) 如何将数据复制并粘贴到R中?例如,您在网上,博客中或StackOverflow上看到一个小的数据集,并且希望在R会话中使用该数据集。这是我们许多人的共同任务,有几种方法可以解决。下面,我根据此博客文章提出了一种有用的解决方案。