Running examples in ‘Diderot-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: heterocitation_authors
> ### Title: This function computes heterocitation metrics for authors
> ### Aliases: heterocitation_authors 'Author Heterocitation' 'Author
> ###   Hetero-citation'
> 
> ### ** Examples
> 
> ## Don't show: 
> # Generate corpora
> corp1<-data.frame(Authors=paste("Author",round(runif(45,1,20)),sep=""),Title=paste("Title",seq(1,45), sep=""), Year=round(runif(45,1990,2018)), References=NA,stringsAsFactors=FALSE)
> corp2<-data.frame(Authors=paste("Author",round(runif(65,15,35)),sep=""),Title=paste("Title",seq(46,110), sep=""), Year=round(runif(65,1990,2018)), References=NA, stringsAsFactors=FALSE)
> 
> len1<-length(corp1$Authors)
> len2<-length(corp2$Authors)
> lnall<-len1+len2
> 
> for (i in seq(1:lnall)) {
+   str<-""
+   for (j in seq(1:round(runif(1,1,4)))) {
+     rn<-round(runif(1,1,lnall))
+     if (rn > len1) { 
+       str<-sprintf("%s %s. %d. %s;", str, corp2$Authors[rn-len1], corp2$Year[rn-len1], corp2$Title[rn-len1])
+     } else {
+       str<-sprintf("%s %s. %d. %s;", str, corp1$Authors[rn], corp1$Year[rn], corp1$Title[rn])
+     }
+   }
+   if (i>len1) {
+     corp2$References[i-len1]<-str
+   } else corp1$References[i]<-str
+ }
> 
> # Create joint references
> for (i in seq(1:5)) {
+   corp1<-rbind(corp1, corp2[runif(1,1,len2),])
+   corp2<-rbind(corp2, corp1[runif(1,1,len1),])
+ }
> 
> # Add duplicate entry
> corp1<-rbind(corp1, corp1[1,])
> 
> tempfi1<-file.path(tempdir(),"corpus1.csv")
> tempfi2<-file.path(tempdir(),"corpus2.csv")
> write.csv(corp1, tempfi1)
> write.csv(corp2, tempfi2)
> ## End(Don't show)
> 
> labels<-c("Corpus1","Corpus2")
> 
> # Build a bibliographical dataset from Scopus exports
> db<-create_bibliography(corpora_files=c(tempfi1,tempfi2), 
+                         labels=labels, keywords=NA)
[1] "File /home/hornik/tmp/scratch/RtmpP0Oarv/corpus1.csv contains 51 records"
[1] "File /home/hornik/tmp/scratch/RtmpP0Oarv/corpus2.csv contains 70 records"
> ## Don't show: 
> unlink(c(tempfi1, tempfi2))
> ## End(Don't show)
> 
> # Build graph
> gr<-build_graph(db=db,small.year.mismatch=TRUE, attrs=c("Corpus","Year","Authors"), nb.cores=1)
starting worker pid=12362 on localhost:11482 at 17:28:49.496
Warning in length(vattrs[[name]]) <- vc :
  length of NULL cannot be changed
Loading required package: Diderot
Loading required package: foreach
Loading required package: igraph

Attaching package: ‘igraph’

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

    decompose, spectrum

The following object is masked from ‘package:base’:

    union

loaded Diderot and set parent environment
[1] "Graph built! Execution time: 2.19 seconds."
> 
> # Heterocitation
> gr<-precompute_heterocitation(gr,labels, 1990, 2018)
[1] "Summary of the nodes considered for computation (1990-2017)"
[1] "-------------------------------------------------------"
[1] "Corpus1     Corpus2     Corpus1|Corpus2"
[1] "41     60     9"
[1] "\n"
[1] "Edges summary"
[1] "-------------"
[1] "Corpus1->Corpus1/Corpus1->Other: 51/55 => Proportion of Corpus1->Other: 0.519"
[1] "Corpus2->Corpus2/Corpus2->Other: 89/76 => Proportion of Corpus2->Other: 0.461"
[1] "General Same/Other: 140/131 => Proportion of 0.483"
[1] "\n"
[1] "Heterocitation metrics"
[1] "----------------------"
[1] "Sx ALL /  Corpus1  /  Corpus2"
[1] "0.493 / 0.522 / 0.474"
[1] "Dx ALL /  Corpus1  /  Corpus2"
[1] "0.021 / -0.075 / 0.087"
> 
> # Author heterocitation
> heterocitation_authors(gr, 1990, 2018)
[1] "Will turn Corpus into numerical values depending on levels:"
NULL
Warning in mean.default(corpus, na.omit = T) :
  argument is not numeric or logical: returning NA
Warning in storage.mode(v) <- "double" : NAs introduced by coercion
Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : 
  NA/NaN/Inf in 'y'
Calls: heterocitation_authors -> <Anonymous> -> lm.fit
Execution halted