我正在使用R版本3.3.3(虽然我在3.4.0上复制了这个问题)和> library(data.table)
data.table 1.10.4 #[snipping rest of startup message]
> n <- 2e6 # Make this higher if you can't trigger a segfault yourself.
> a <- data.table(a=1:n, b=runif(n), c=runif(n))
> b <- data.table(a=1:n, x=runif(n), y=runif(n))
> head(merge(a, b)) # This works fine.
a b c x y
1: 1 0.6753597 0.08822928 0.7204507 0.71065772
2: 2 0.1898733 0.11883707 0.9820610 0.74329076
3: 3 0.3941039 0.57053921 0.3346781 0.22707652
4: 4 0.4564642 0.77429123 0.4924871 0.07743992
5: 5 0.9109421 0.79464586 0.2588091 0.82185820
6: 6 0.1805926 0.94213717 0.7426924 0.52522687
> a <- data.table(a=as.character(1:n), b=runif(n), c=runif(n))
> b <- data.table(a=as.character(1:n), x=runif(n), y=runif(n))
> head(merge(a, b))
*** caught segfault ***
address 0xffffffffffffffff, cause 'unknown'
Traceback:
1: `[.data.table`(x, i, , )
2: x[i, , ]
3: head.data.table(merge(a, b))
4: head(merge(a, b))
版本1.10.4在Cygwin上。 (编辑:以下评论表明这可能是Cygwin特有的。)我需要通过字母数字ID列合并两个数据表(大约1兆字节和2000行)。大约三次中有四次,我在合并调用本身或稍后调用修改或打印合并表时遇到段错误。 (我理解这是懒惰评估的结果。)
特别是字符列存在问题;合并整数列工作正常。请参阅此终端会话:
a
如果b
和data.frame
为merge()
,则data.frame
不会对字符列进行分段。问题:
merge()
时,是否有解决方法没有制作新的ID列或来回.navbar {
margin-bottom: 0px;
}
.jumbotron {
margin-bottom: 0px;
}
#timeline {
list-style: none;
padding-left: 0;
padding-top: 40px;
padding-bottom: 60px;
position: relative;
}
#timeline_border {
position: relative;
top: -123px;
display: block;
width: 100%;
height: 1px;
border-top: 2px solid #ccc;
z-index: -1;
}
#timeline li {
display: inline-block;
padding: 1.5%;
border: 1px solid #c0c0c0;
border-radius: 5px;
box-shadow: 1px 1px 6px #757677;
margin-top: 2%;
text-align: center;
padding-bottom: 0;
width: 45%;
position: relative;
}
#timeline > li:after {
position: absolute;
bottom: -20px;
left: 40px;
width: 0;
height: 0;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-top: 20px solid #757677;
display: block;
content: "";
}
#timeline li+li {
margin-left: 2%;
}
#timeline li h3,
#timeline li em {
display: block;
}
#timeline_header {
padding-left: 0;
}
hr {
width: 100%;
}
#triangle {
width: 0;
height: 0;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-top: 20px solid #757677;
display: inline-block;
}
.timeline_ruler {
white-space: nowrap;
overflow-x: scroll;
overflow-y: visible;
display: block;
height: auto;
padding-bottom: 100px;
}
.timeline_icon {
width: 80px;
height: 80px;
position: absolute;
bottom: -102px;
left: 20px;
}
?