A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/brodieG/diffobj/issues/81 below:

Error ... number of characters is not computable in "bytes" encoding, element 1 · Issue #81 · brodieG/diffobj · GitHub

I'm trying to compare two lists. Sorry this not a very minimal reprex but maybe it's easy for you to spot the problem?

I'm making a package of recursive lists to use in teaching and examples. I make the list available as an R object and also as JSON (and XML). I'm comparing the source list to the list I get from importing the JSON. Was hoping to use diffObj() to see the diffs but it immediately errors.

#devtools::install_github("jennybc/repurrrsive@4d9daf6")
library(repurrrsive)
library(diffobj)
## this makes a list of GitHub users available
str(gh_users, max.level = 1)
#> List of 6
#>  $ :List of 30
#>  $ :List of 30
#>  $ :List of 30
#>  $ :List of 30
#>  $ :List of 30
#>  $ :List of 30
## also the path to the corresponding JSON
ghuj <- jsonlite::fromJSON(gh_users_json(), simplifyDataFrame = FALSE)
str(ghuj, max.level = 1)
#> List of 6
#>  $ :List of 30
#>  $ :List of 30
#>  $ :List of 30
#>  $ :List of 30
#>  $ :List of 30
#>  $ :List of 30

## try comparing the first elements of these lists
diffObj(gh_users[[1]], ghuj[[1]])
#> Error in (function (u, so, ml) : number of characters is not computable in "bytes" encoding, element 1

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4