0

我正在尝试合并两个 .Xdf 文件,下面是相同的代码:

rxMergeXdf(inFile1 = "/poc/revor/data/se_lif_1.xdf",
inFile2 = "/poc/revor/data/ext_merchant_account_filtered.xdf", 
outFile = "/poc/revor/data/se_lif_2.xdf", matchVars = c("SE_NO"), 
type = "inner", missingsLow = TRUE,decreasing = FALSE,verbose = 1,
overwrite = TRUE,rowsPerOutputBlock = -1)

但在执行时出现此错误:

Memory buffer limit: 723679 Mb.
Merge Type: 1, Inner
Time to merge data file: 0.025 seconds
Merged data file: /poc/revor/data/se_lif_2.xdf
Error in rxCall("RxMergeXdf", params) :

输出 .xdf 文件的大小为 260 字节,但无法打开。当尝试使用 rxGetInfoXdf 获取此 .Xdf 的详细信息时,它显示以下消息:

Error in rxCall("RxReadXdf", params) :
  This is an old version of a DataFile, and cannot be read.

下面是两个 .Xdf 文件的文件结构:

1) se_lif_1.xdf

File name: /poc/revor/data/se_lif_1.xdf
Number of observations: 832787765
Number of variables: 2
Number of blocks: 4
Compression type: zlib
Variable information:
Var 1: SE_NO, Type: numeric, Low/High: (1030026553.0000, 9992702050.0000)
Var 2: TOT_CV_LIF, Type: numeric, Low/High: (-2348.7600, 40587.3900)
Data (10 rows starting with row 1):
        SE_NO TOT_CV_LIF
1  1030026553     314.45
2  1030049191      60.00
3  1030227870    2643.71
4  1040124257     389.00
5  1040608119      85.59

2) ext_merchant_account_filtered.xdf:

File name: /poc/revor/data/ext_merchant_account_filtered.xdf
Number of observations: 10000
Number of variables: 2
Number of blocks: 4
Compression type: zlib
Variable information:
Var 1: SE_NO, Type: numeric, Low/High: (3047490719.0000, 9380463753.0000)
Var 2: SEIMS_INDUS_DS_CD, Type: character
Data (10 rows starting with row 1):
        SE_NO SEIMS_INDUS_DS_CD
1  5510918899               499
2  3132775164               915
3  4107745093               930
4  3125354860               248
5  5510918923               499

任何人都可以帮我解决这个问题。我查看了代码,但对我来说一切都很好。

感谢您提前提供的帮助... :)

干杯,

阿米特

4

1 回答 1

0

我在合并 2 个数据帧时遇到了同样的问题。当左侧数据帧的合并变量在右侧没有匹配值时出现问题,即输出数据帧为空。低/高值范围可能重叠,但“matchVars”中可能没有匹配项。

于 2016-03-21T14:55:29.513 回答