应该很简单,但是我却被这个操作卡住了。我有兴趣提取块边缘数据:23,502 x 3。并指示节点的名称。简而言之,我需要通过名称知道每对节点的权重。
\n代码:
\n# A tbl_graph: 11539 nodes and 23502 edges\n#\n# An undirected simple graph with 2493 components\n#\n# Node Data: 11,539 x 3 (active)\n name neighbors groups\n <chr> <dbl> <int>\n1 CHANSATITPORN N 1 1540\n2 POBKEEREE V 1 1540\n3 SAINIS G 4 361\n4 HARITOS G 4 361\n5 KRIEMADIS T 4 361\n6 PAPASOLOMOU I 3 361\n# \xe2\x80\xa6 with 11,533 more rows\n#\n# Edge Data: 23,502 x 3\n from to weight\n <int> <int> <dbl>\n1 1 2 1\n2 3 4 2\n3 3 …Run Code Online (Sandbox Code Playgroud) 我正在尝试复制以下代码(thomasp85/gganimate)。我有两个问题:
geom_point;geom_point会显示最后几秒钟的标签(变量:partidos)。
dput(polls_)
structure(list(week = structure(c(1551571200, 1551571200, 1551571200,
1551571200, 1551571200, 1550966400, 1550966400, 1550966400, 1550966400,
1550966400, 1550361600, 1550361600, 1550361600, 1550361600, 1550361600,
1549756800, 1549756800, 1549756800, 1549756800, 1549756800, 1549152000,
1549152000, 1549152000, 1549152000, 1549152000, 1548547200, 1548547200,
1548547200, 1548547200, 1548547200, 1547942400, 1547942400, 1547942400,
1547942400, 1547942400, 1547337600, 1547337600, 1547337600, 1547337600,
1547337600, 1546732800, 1546732800, 1546732800, 1546732800, 1546732800,
1546128000, 1546128000, 1546128000, 1546128000, 1546128000, 1545523200,
1545523200, 1545523200, 1545523200, 1545523200, 1544918400, 1544918400,
1544918400, 1544918400, 1544918400, 1544313600, 1544313600, 1544313600,
1544313600, 1544313600, 1543708800, 1543708800, 1543708800, …Run Code Online (Sandbox Code Playgroud) 我收到了这条警告信息.我使用这些数据:
https://github.com/kbenoit/quanteda/tree/master/data/data_char_inaugural.RData
RStudio版本:版本1.0.136 - ©2009-2016 RStudio,Inc.
library(quanteda)
uk2010immigCorpus <- corpus(data_char_ukimmig2010, docvars = data.frame(party = names(data_char_ukimmig2010)),metacorpus = list(notes = "Immigration-related sections of 2010 UK party manifestos"))
mydfm <- dfm(uk2010immigCorpus, remove = c("will", stopwords("english")),removePunct = TRUE)
Error in validObject(.Object) : invalid class “dfmSparse” object: superclass "replValueSp" not defined in the environment of the object's class
Run Code Online (Sandbox Code Playgroud)
QUANTEDA有什么问题?
谢谢!majesus