0

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

woodstck
  • 106
  • 1
  • 6
  • A working example might help. – Roman Luštrik Jul 23 '19 at 10:23
  • @RomanLuštrik `library(recommenderlab)` `recommenderRegistry$get_entries()` – woodstck Jul 24 '19 at 11:23
  • Just installed the package from CRAN and ran the code you suggested. I get no errors and a lot of output. – Roman Luštrik Jul 24 '19 at 14:35
  • @RomanLuštrik Yes, it should show you 15 recommender models with their details, but in my case, the output is truncated in the middle. Re-installing didn't resolve this issue. – woodstck Jul 27 '19 at 02:23
  • You should probably include more information about your system, perhaps? – Roman Luštrik Jul 27 '19 at 11:35
  • @RomanLuštrik Yes, you are right. > sessionInfo() 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 [5] datasets methods base loaded via a namespace (and not attached): [1] compiler_3.6.1 tools_3.6.1 [3] yaml_2.2.0 – woodstck Jul 29 '19 at 03:32
  • Please use the edit button to add extra information. Comments aren't really designed to handle these cases. – Roman Luštrik Jul 29 '19 at 06:45

1 Answers1

0

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")

Michael Hahsler
  • 2,965
  • 1
  • 12
  • 16
  • Sorry for the late update. The issue was cleared when I tried replicating it in my latest environment with R 4.2.0 and RStudio 2022.02.3. – woodstck Jun 23 '22 at 04:04