Windows 2000 reports that "Rgui.exe has generated errors and will be =
closed by Windows. You will need to restart the program." when using =
rbind.=20
df1 <- data.frame(cbind(x=3D1, y=3D1:1000), fac=3Dsample(LETTERS[1:3], =
1000, repl=3DTRUE))
df2 <- data.frame(cbind(x=3D1, y=3D1:10), fac=3Dsample(LETTERS[4:6], =
10, repl=3DTRUE))
df3 <- data.frame(cbind(x=3D1, y=3D1:1000000), =
fac=3Dsample(LETTERS[1:3], 1000000, repl=3DTRUE))
df4 <- rbind(df1,df2)
df5 <- rbind(df2,df3)
=20
=20
Since this only happens intermittantly and appears to be related to the =
size of the objects I ran the following code.
sink("rbind test.txt")
df1 <- data.frame(cbind(x=3D1, y=3D1:10), fac=3Dsample(LETTERS[4:6], 10, =
repl=3DTRUE))
for (j in seq(100000,1000000,10000)){
df2 <- data.frame(cbind(x=3D1, y=3D1:j), fac=3Dsample(LETTERS[1:3], j, =
repl=3DTRUE))
print(j)
df3 <- rbind(df2,df1)
}
sink()
the output of rbind test.txt is
[1] 100000
[1] 110000
[1] 120000
...
[1] 510000
[1] 520000
I then ran=20
sink("rbind test 2.txt")
df1 <- data.frame(cbind(a =3D 1, b =3D 2, c =3D 3, d =3D 4, e =3D 5, f =
=3D 6, x=3D1, y=3D1:10), fac=3Dsample(LETTERS[4:6], 10, repl=3DTRUE))
for (j in seq(100000,1000000,10000)){
df2 <- data.frame(cbind(a =3D 1, b =3D 2, c =3D 3, d =3D 4, e =3D 5, f =
=3D 6, x=3D1, y=3D1:j), fac=3Dsample(LETTERS[1:3], j, repl=3DTRUE))
print(j)
df3 <- rbind(df2,df1)
}
sink()
which also stopped at 520000.
I tried to narrow down where the crash takes place but it would appear =
that it is a moving feast, however both pieces of code always stopped =
with the same number, somewhere around 520000.
version
_ =20
platform i386-pc-mingw32
arch i386 =20
os mingw32 =20
system i386, mingw32 =20
status =20
major 2 =20
minor 2.0 =20
year 2005 =20
month 10 =20
day 06 =20
svn rev 35749 =20
language R=20
One of the examples that has failed for me looks like
pop <- rbind(om.tp[,c(6,2,4,5,3)],eas[,c(2,1,3,4,5)])
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 3255820 87.0 6193578 165.4 5266303 140.7
Vcells 22096825 168.6 32770865 250.1 32114295 245.1
Tom Mulholland
Senior Demographer
Spatial Information and Research
State and Regional Policy
Department for Planning and Infrastructure
Perth, Western Australia
+61 (08) 9264 7936