How to fix an invalid multibyte string error with recommenderRegistry$get_entries()?

169 views Asked by At

I'm trying "recommenderlab" package and getting an error with recommenderRegistry$get_entries() fuction.

To get the info about recommendation algorithms, I tried

library(recommenderlab)  
recommenderRegistry$get_entries()

But the output is truncated in the middle as below.

$AR_binaryRatingMatrix
Recommender method: AR for binaryRatingMatrix
Description: Recommender based on association rules.
Reference: NA
Parameters:
Error in dput(p, control = list()) : 
  invalid multibyte string at '<ff><fe><63><6f>nfidence<ff><fe>"

When I tried

names(recommenderRegistry[["AR", "binaryRatingMatrix"]][['parameters']])

all the parameters are displayed without an error.

[1] "support"         "confidence"      "maxlen"          "sort_measure"    "sort_decreasing" "apriori_control" "verbose"        

Additionally, I tried re-installing it, but the result is the same. recommenderRegistry$get_entries() should show 15 algorithms available in this pacakge. Has anyone encountered a similar problem?

The system information is like below
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale: [1] LC_COLLATE=Korean_Korea.949 [2] LC_CTYPE=Korean_Korea.949 [3] LC_MONETARY=Korean_Korea.949 [4] LC_NUMERIC=C [5] LC_TIME=Korean_Korea.949
attached base packages: [1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached): [1] compiler_3.6.1 tools_3.6.1 [3] yaml_2.2.0

1

There are 1 answers

1
Michael Hahsler On

Looks like your problem may be your locale setting:

locale: [1] LC_COLLATE=Korean_Korea.949 [2] LC_CTYPE=Korean_Korea.949 [3] LC_MONETARY=Korean_Korea.949 [4] LC_NUMERIC=C [5] LC_TIME=Korean_Korea.949

You can try Sys.setlocale("LC_ALL", "C")