Closed RMHogervorst closed 5 years ago
Ah, thanks @RMHogervorst for opening that issue!
Can you confirm this : https://github.com/neo4j-examples/game-of-thrones is the example you're playing with?
I wonder what the output should be in that case.
Does the null here account for books without an ID? (so it should be NA)
i think NA would work for null there
Yes NA would be better here
Hey,
null
are now turned to NA
through https://github.com/neo4j-rstats/neo4r/blob/master/R/api_result_parsing.R#L25
library(neo4r)
con <- neo4j_api$new(url = "http://localhost:7474",
user = "neo4j", password = "neo4j")
'MATCH ()-[r]->()
RETURN r.book as book, count(r) ORDER BY book' %>%
call_neo4j(con)
$book
# A tibble: 1 x 1
value
<lgl>
1 NA
$`count(r)`
# A tibble: 1 x 1
value
<int>
1 1485
attr(,"class")
[1] "neo" "neo" "list"
Which seems to be the desired behavior.
Does it sound good to you?
yes!
I'm using the game of thrones dataset and ask back the relationships per book
The browser returns a table
╒══════╤══════════╕ │"book"│"count(r)"│ ╞══════╪══════════╡ │1 │684 │ ├──────┼──────────┤ │2 │775 │ ├──────┼──────────┤ │3 │1008 │ ├──────┼──────────┤ │45 │1329 │ ├──────┼──────────┤ │null │2823 │ └──────┴──────────┘
neo4r seems to ignore the null, but can't return a data frame either because of the unequal lengths, so it returns a list with a tibble of nrow 4 and a tibble with nrow 5