错误:Can';在R中对文本字符串使用模糊合并时,t将逻辑向量转换为函数
这里 我希望通过文本字符串连接这些数据(仅内部连接) 如何通过文本字符串连接这两个数据集 期望输出错误:Can';在R中对文本字符串使用模糊合并时,t将逻辑向量转换为函数,r,fuzzy-search,R,Fuzzy Search,这里 我希望通过文本字符串连接这些数据(仅内部连接) 如何通过文本字符串连接这两个数据集 期望输出 Error: Can't convert a logical vector to function 如何正确连接两个数据集?数据集的大小可以不同,一个数据集可以是20行,第二个数据集可以是10000行,这就是为什么我需要模糊内部连接来实现语义连接 模糊连接库是最简单的,但是如果您认为另一种方法可以帮助我,那么我会很高兴。 RecordLink中的compare.linkage()不适合我,因为它
Error: Can't convert a logical vector to function
如何正确连接两个数据集?数据集的大小可以不同,一个数据集可以是20行,第二个数据集可以是10000行,这就是为什么我需要模糊内部连接来实现语义连接
模糊连接库是最简单的,但是如果您认为另一种方法可以帮助我,那么我会很高兴。
RecordLink中的compare.linkage()不适合我,因为它需要
数据集中的行数相等,
否则将出现错误,即它们的数量不相等。
在我的例子中,行数的差异可能非常大。
例如,在一个数据集中(第2行和第二个101010101行)。
我加入这些数据集是因为我需要获取idsnar列您可以将match\u fun参数设置为TRUE。您需要提供一个返回值为TRUE/FALSE的函数。@user2474226,我该怎么做?对不起,我的意思是您在代码中将match_fun参数设置为TRUE,这就是错误消息的原因。但是文档要求使用一个返回真/假值的函数。这个函数应该是什么,我不完全确定。
df2=structure(list(NAME = structure(c(9L, 2L, 15L, 11L, 16L, 1L,
10L, 13L, 14L, 12L, 6L, 4L, 3L, 17L, 8L, 5L, 7L), .Label = c(" of driving conditions for trains with increased weight and increased length",
"2 passes of preliminary light signaling at night", "AT due to non-confirmation by the driver of operability at the request of TSKBM",
"AT due to the lack of confirmation of vigilance when following a prohibiting signal without passage",
"AT in case of violation of the sequence of traffic lights with a prohibition indication with CLUB-U (UP), BLOCK in / and something more",
"AT in situations not specified in the classifier", "AT in the absence of registration of pressing RB, RBS TGV",
"AT in the parking lot", "Incorrect actions when a malfunction is detected - \"push\" \"on the way --",
"Incorrect input of train characteristics in efficiency, KLUB-U (UP), BLOCK at / and the driver at the beginning of the trip",
"Reversing with a completely unused shunting route", "Setting the toggle switch DZ to the position WITHOUT ALSN in the coded area or untimely setting in ALS 400-500",
"Stop on limiting lift with critical weight without the need for an auxiliary locomotive",
"Stops of trains where on a stage with an enable signal was error",
"The inclusion of the Saut-Ts (TsM) KIO-Saut at a pressure in the TM, other than the charging",
"Violation of the algorithm for a single or periodic check of vigilance SAUT-Ts (TsM), KIO-SAUT",
"АТ due to excess of speed controlled by a safety 1000 device when following a prohibiting signal without passage"
), class = "factor"), idspnar = 1:17), .Names = c("NAME", "idspnar"
), class = "data.frame", row.names = c(NA, -17L))
library(fuzzyjoin)
rpairs_jar <- fuzzy_inner_join(df1, df2,
by = c("NAME"),match_fun=TRUE)
Error: Can't convert a logical vector to function
NAME
1 Incorrect actions when a malfunction is detected - "push" "on the way
2 2 passes of preliminary light signaling at night
3 The inclusion of the Saut-Ts (TsM) KIO-Saut at a pressure in the TM, other than the charging
4 Reversing with a completely unused shunting route
5 Violation of the algorithm for a single or periodic check of vigilance SAUT-Ts (TsM), KIO-SAUT
6 Violation of driving conditions for trains with increased weight and increased length
7 Incorrect input of train characteristics in efficiency, KLUB-U (UP), BLOCK at / and the driver at the beginning of the trip
8 Stop on limiting lift with critical weight without the need for an auxiliary locomotive
9 Stops of trains on a stage with an enable signal
10 Setting the toggle switch DZ to the position WITHOUT ALSN in the coded area or untimely setting in ALS
11 AT in situations not specified in the classifier
12 AT due to the lack of confirmation of vigilance when following a prohibiting signal without passage
13 AT due to non-confirmation by the driver of operability at the request of TSKBM
14 АТ due to excess of speed controlled by a safety device when following a prohibiting signal without passage
15 AT in the parking lot
16 AT in case of violation of the sequence of traffic lights with a prohibition indication with CLUB-U (UP), BLOCK in / and
17 AT in the absence of registration of pressing RB, RBS
NAME.1
1 Incorrect actions when a malfunction is detected - "push" "on the way --
2 2 passes of preliminary light signaling at night
3 The inclusion of the Saut-Ts (TsM) KIO-Saut at a pressure in the TM, other than the charging
4 Reversing with a completely unused shunting route
5 Violation of the algorithm for a single or periodic check of vigilance SAUT-Ts (TsM), KIO-SAUT
6 of driving conditions for trains with increased weight and increased length
7 Incorrect input of train characteristics in efficiency, KLUB-U (UP), BLOCK at / and the driver at the beginning of the trip
8 Stop on limiting lift with critical weight without the need for an auxiliary locomotive
9 Stops of trains where on a stage with an enable signal was error
10 Setting the toggle switch DZ to the position WITHOUT ALSN in the coded area or untimely setting in ALS 400-500
11 AT in situations not specified in the classifier
12 AT due to the lack of confirmation of vigilance when following a prohibiting signal without passage
13 AT due to non-confirmation by the driver of operability at the request of TSKBM
14 АТ due to excess of speed controlled by a safety 1000 device when following a prohibiting signal without passage
15 AT in the parking lot
16 AT in case of violation of the sequence of traffic lights with a prohibition indication with CLUB-U (UP), BLOCK in / and something more
17 AT in the absence of registration of pressing RB, RBS TGV
idspnar
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
13 13
14 14
15 15
16 16
17 17