在R中的XML::xmlValue()的多个输出之间添加空格

在R中的XML::xmlValue()的多个输出之间添加空格,xml,r,xml-parsing,whitespace,space,Xml,R,Xml Parsing,Whitespace,Space,我正在应用xmlValue的对象具有这种结构(已翻译): 我尝试将xmlValue与paste(xpathsaply(解析为'pattern',paste(xmlValue,”))一起使用,但收到了一个错误。如果我理解正确(不能阅读俄语),您可以使用getChildrenStrings: interests[31:32] [1] "applied econometrics Empirical analysis of markets" [2] "modern legal theory so

我正在应用
xmlValue
的对象具有这种结构(已翻译):


我尝试将
xmlValue
paste
xpathsaply(解析为'pattern',paste(xmlValue,”)
)一起使用,但收到了一个错误。

如果我理解正确(不能阅读俄语),您可以使用
getChildrenStrings

 interests[31:32]
 [1] "applied econometrics Empirical analysis of markets"
 [2] "modern legal theory sociology of law"

您可以分享错误吗?@ouistti
粘贴中的错误(xmlValue,“”):无法强制将类型“closure”强制为类型为“character”的向量。
肯定也会更快。
interests[31:32]
[1] "applied econometricsEmpirical analysis of markets"
[2] "modern legal theorysociology of law"
[[1]]
<div class="with-indent small">
  <a class="tag" href="/org/persons/?intst=62024792">applied econometrics</a>
  <a class="tag" href="/org/persons/?intst=62247389">empirical analysis of markets</a>
  (...)
</div> 

[[2]]
<div class="with-indent small">
  <a class="tag" href="/org/persons/?intst=132077027">modern legal theory</a>
  (...)
  <a class="tag" href="/org/persons/?intst=52953762">sociology of law</a>
</div> 
 interests[31:32]
 [1] "applied econometrics Empirical analysis of markets"
 [2] "modern legal theory sociology of law"
sapply(parsed['/html/body/div/div/div/div[2]/div/div/div/div/div/div/div/div', fun = getChildrenStrings], paste, collapse = ";")
# ...
# [30] "экономика образования;мониторинг образования;качество образования;оплата труда;06.71.45 Экономика образования"                                                                                                                                                                    
# [31] "прикладная эконометрика;Эмпирический анализ рынков;Количественные маркетинговые исследования;прикладная статистика;06.00.00 Экономика. Экономические науки"                                                                                                                    
# [32] "современная теория права;чистое учение о праве;проблемы суверенитета;социология права" 
# ...