Comments (4)
- Session info?
- Why doesn't the last one work? (What's the error message?)
- What do you get by typing just
dplyr::row_number()
?
The row_number
function of dplyr
seems to be recent enough (added in 2013 but tagged as 0.7.2), so many things might explain the error.
from tidygraph.
fair enough, included are session info (1) and the two pieces of not working code with error messages (2) and the call to dplyr::row_number()
alone (3)
1:
─ Session info ─────────────────────────────────────────────────────────────────
setting value
version R version 3.4.1 (2017-06-30)
os Windows >= 8 x64
system x86_64, mingw32
ui RStudio
language (EN)
collate Dutch_Netherlands.1252
tz Europe/Berlin
date 2017-08-10
─ Packages ─────────────────────────────────────────────────────────────────────
package * version date source
assertthat 0.2.0 2017-04-11 CRAN (R 3.4.1)
backports 1.1.0 2017-05-22 CRAN (R 3.4.0)
base64enc 0.1-3 2015-07-28 CRAN (R 3.4.0)
bindr 0.1 2016-11-13 CRAN (R 3.4.1)
bindrcpp * 0.2 2017-06-17 CRAN (R 3.4.1)
clisymbols 1.2.0 2017-05-21 CRAN (R 3.4.1)
digest 0.6.12 2017-01-27 CRAN (R 3.4.1)
dplyr 0.7.2 2017-07-20 CRAN (R 3.4.1)
evaluate 0.10.1 2017-06-24 CRAN (R 3.4.1)
glue 1.1.1 2017-06-21 CRAN (R 3.4.1)
htmltools 0.3.6 2017-04-28 CRAN (R 3.4.1)
igraph 1.1.2 2017-07-21 CRAN (R 3.4.1)
jsonlite 1.5 2017-06-01 CRAN (R 3.4.1)
knitr 1.16 2017-05-18 CRAN (R 3.4.1)
magrittr 1.5 2014-11-22 CRAN (R 3.4.1)
pkgconfig 2.0.1 2017-03-21 CRAN (R 3.4.1)
R6 2.2.2 2017-06-17 CRAN (R 3.4.1)
Rcpp 0.12.12 2017-07-15 CRAN (R 3.4.1)
rlang 0.1.1 2017-05-18 CRAN (R 3.4.1)
rmarkdown 1.6 2017-06-15 CRAN (R 3.4.1)
rprojroot 1.2 2017-01-16 CRAN (R 3.4.1)
sessioninfo 1.0.0 2017-06-21 CRAN (R 3.4.1)
stringi 1.1.5 2017-04-07 CRAN (R 3.4.0)
stringr 1.2.0 2017-02-18 CRAN (R 3.4.1)
tibble 1.3.3 2017-05-28 CRAN (R 3.4.1)
tidygraph * 1.0.0 2017-07-07 CRAN (R 3.4.1)
tidyr 0.6.3 2017-05-15 CRAN (R 3.4.1)
withr 2.0.0 2017-07-28 CRAN (R 3.4.1)
yaml 2.1.14 2016-11-12 CRAN (R 3.4.1)
2:
#second version:
play_erdos_renyi(10, 0.5, directed = FALSE) %>%
+ activate(nodes) %>%
+ mutate( rownbr = row_number())
Error in mutate_impl(.data, dots) :
Evaluation error: could not find function "row_number".
# third version:
play_erdos_renyi(10, 0.5, directed = FALSE) %>%
activate(nodes) %>%
mutate( rownbr = dplyr::row_number())
Error in mutate_impl(.data, dots) :
Evaluation error: argument "x" is missing, with no default.
3: Row number call alone:
dplyr::row_number())
Error in rank(x, ties.method = "first", na.last = "keep") :
argument "x" is missing, with no default
from tidygraph.
For a (very long) explanation of why you see different behaviour have a look at tidyverse/dplyr#2792 - as for your error messages you need to supply a an x variable to row_number()
. The reason why it is not exported by tidygraph is that they are not required functionality and I don't want to import and reexport everything from dplyr - simply load dplyr in order to get the functionality...
from tidygraph.
alright that is quite sensible
from tidygraph.
Related Issues (20)
- Invalid (non-finite or NaN) vertex HOT 1
- Add node_is_connected()
- add "resolution" argument to group_louvain
- Error: unable to load R code in package ‘tidygraph’ HOT 1
- access .orig_data after a graph contraction HOT 1
- New CRAN release timeline? HOT 1
- Release tidygraph 1.2.3
- `trunc_mat()` deprecated in tibble
- betweenness_centrality() does not return normalized values HOT 1
- Size aesthetic is deprecated for edges HOT 1
- Upkeep for tidygraph (2023)
- Feature request: add support for class "dagitty" to as_tbl_graph HOT 1
- Release tidygraph 1.3.0 HOT 5
- Printing grouped til_graphs will error if grouping is an expression
- Creating a tbl_graph from data frames with sticky columns
- Add new features from igraph HOT 2
- bind_graphs() for list of tbl_graph objects has broken HOT 1
- igraph 2.0.0 installation failed HOT 1
- dfs_rank seems to give wrong results with v1.3.1
- bfs_rank returns 0 instead of NA for unreachable nodes with tidygraph v1.3.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tidygraph.