Skip to content

Can't replicate #14

@emretoros

Description

@emretoros

Hi,
I was trying to set some text networks with my data but received some error.
Then, when I tried to replicate the code on package's github page. I received the same error.
I am on R v3.6, and made a clean install on every pack needed for textnetworks.
The error I receive for both cases (for my own data and for sotu data) is as follows


library(textnets)
Loading required package: dplyr

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

filter, lag

The following objects are masked from ‘package:base’:

intersect, setdiff, setequal, union

Loading required package: udpipe
Loading required package: ggraph
Loading required package: ggplot2
Loading required package: networkD3
Warning messages:
1: replacing previous import ‘dplyr::union’ by ‘igraph::union’ when loading ‘textnets’
2: replacing previous import ‘dplyr::as_data_frame’ by ‘igraph::as_data_frame’ when loading ‘textnets’
3: replacing previous import ‘dplyr::groups’ by ‘igraph::groups’ when loading ‘textnets’

data("sotu")
sotu_firsts <- sotu %>% group_by(president) %>% slice(1L)
sotu_firsts_nouns <- PrepText(sotu_firsts, groupvar = "president", textvar = "sotu_text", node_type = "groups", tokenizer = "words", pos = "nouns", remove_stop_words = TRUE, compound_nouns = TRUE)
Downloading udpipe model from https://raw.githubusercontent.com/jwijffels/udpipe.models.ud.2.4/master/inst/udpipe-ud-2.4-190531/english-ewt-ud-2.4-190531.udpipe to C:/Users/.../english-ewt-ud-2.4-190531.udpipe
Visit https://github.com/jwijffels/udpipe.models.ud.2.4 for model license details
trying URL 'https://raw.githubusercontent.com/jwijffels/udpipe.models.ud.2.4/master/inst/udpipe-ud-2.4-190531/english-ewt-ud-2.4-190531.udpipe'
Content type 'application/octet-stream' length 16477964 bytes (15.7 MB)
downloaded 15.7 MB

Error in check_input(x) :
Input must be a character vector of any length or a list of character
vectors, each of which has a length of 1.
In addition: Warning message:
'unnest_tokens_' is deprecated.
Use 'unnest_tokens' instead.
See help("Deprecated")


my input is a character vector....

Any help would be greatly appreciated.
best
E.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions