-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
I am trying to create dataframe from hierachy dataframe (STIC4) and i get an error. however if I read STIC3 sheet, everything works fine
utils::browseURL("https://unstats.un.org/unsd/classifications/Econ")
utils::download.file("https://unstats.un.org/unsd/classifications/Econ/Download/In%20Text/SITCCodeandDescription.xlsx", "SITCCodeandDescription.xlsx",
mode = "wb", quiet = TRUE)
dt1 <- readxl::read_excel("SITCCodeandDescription.xlsx", "SITC4") %>%
dplyr::rename_with(tolower) %>%
dplyr::select(parent = "parent code", child = code) %>%
tidyr::drop_na() %>%
data.tree::FromDataFrameNetwork() %>%
data.tree::ToDataFrameTypeCol()
Error is
Error in data.tree::FromDataFrameNetwork(.) :
Cannot find root name. network is not a tree!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels