Skip to content

Commit c7889d5

Browse files
authored
Merge pull request #453 from massimoaria/develop
Minor fixes
2 parents bc93aa8 + d1d4773 commit c7889d5

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

inst/biblioshiny/server.R

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2061,8 +2061,8 @@ To ensure the functionality of Biblioshiny,
20612061
output$AffOverTimeTable <- DT::renderDT({
20622062

20632063
AFFGrowth()
2064-
afftimeData=values$AffOverTime
2065-
DTformat(afftimeDATA, nrow=10, filename="Affiliation_over_Time", pagelength=TRUE, left=NULL, right=NULL, numeric=NULL, dom=FALSE,
2064+
afftimeData <- values$AffOverTime
2065+
DTformat(afftimeData, nrow=10, filename="Affiliation_over_Time", pagelength=TRUE, left=NULL, right=NULL, numeric=NULL, dom=FALSE,
20662066
size='100%', filter="none", columnShort=NULL, columnSmall=NULL, round=3, title="", button=TRUE, escape=FALSE,
20672067
selection=FALSE)
20682068
})
@@ -2351,6 +2351,7 @@ To ensure the functionality of Biblioshiny,
23512351
xx <- values$TABGlobDoc %>% select(1,3)
23522352
lab="Global Citations"} else {
23532353
xx <- values$TABGlobDoc %>% select(1,4)
2354+
xx[,2] <- round(xx[,2],1)
23542355
lab="Global Citations per Year"
23552356
}
23562357

@@ -3416,6 +3417,8 @@ To ensure the functionality of Biblioshiny,
34163417

34173418
CSfactorial <- eventReactive(input$applyCA,{
34183419
values <- CAmap(input,values)
3420+
values$plotCS <- ca2plotly(values$CS, method=input$method ,dimX = 1, dimY = 2, topWordPlot = Inf, threshold=0.05, labelsize = input$CSlabelsize*2, size=input$CSlabelsize*1.5)
3421+
values$dendCS <- dend2vis(values$CS$km.res, labelsize=input$CSlabelsize, nclusters=as.numeric(input$nClustersCS), community=FALSE)
34193422
})
34203423

34213424
output$FAplot.save <- downloadHandler(
@@ -3445,13 +3448,14 @@ To ensure the functionality of Biblioshiny,
34453448
CSfactorial()
34463449
#CS=values$CS
34473450
#save(CS,file="provaCS.rdata")
3448-
values$plotCS <- ca2plotly(values$CS, method=input$method ,dimX = 1, dimY = 2, topWordPlot = Inf, threshold=0.05, labelsize = input$CSlabelsize*2, size=input$CSlabelsize*1.5)
3451+
values$plotCS #<- ca2plotly(values$CS, method=input$method ,dimX = 1, dimY = 2, topWordPlot = Inf, threshold=0.05, labelsize = input$CSlabelsize*2, size=input$CSlabelsize*1.5)
34493452
})
34503453

34513454

34523455
output$CSPlot4 <- renderVisNetwork({
34533456
CSfactorial()
3454-
dend2vis(values$CS$km.res, labelsize=input$CSlabelsize, nclusters=as.numeric(input$nClustersCS), community=FALSE)
3457+
#dend2vis(values$CS$km.res, labelsize=input$CSlabelsize, nclusters=as.numeric(input$nClustersCS), community=FALSE)
3458+
values$dendCS
34553459
#values$CS$graph_dendogram)
34563460
})
34573461

@@ -3736,7 +3740,7 @@ To ensure the functionality of Biblioshiny,
37363740
validate(
37373741
need(values$nexus$check != FALSE, "\n\nNo topics in one or more periods. Please select a different set of parameters.")
37383742
)
3739-
for (i in 1:length(values$yearSlices)){
3743+
for (i in 1:(length(values$yearSlices)+1)){
37403744
values$nexus$TM[[i]]$words <- values$nexus$TM[[i]]$words[,-c(4,6)]
37413745
values$nexus$TM[[i]]$clusters <- values$nexus$TM[[i]]$clusters[,c(9,5:8,11)]
37423746
names(values$nexus$TM[[i]]$clusters) <- c("Cluster", "CallonCentrality","CallonDensity","RankCentrality","RankDensity","ClusterFrequency")
@@ -4149,7 +4153,7 @@ To ensure the functionality of Biblioshiny,
41494153
})
41504154

41514155
output$histTable <- DT::renderDT({
4152-
4156+
g <- Hist()
41534157
Data <- values$histResults$histData
41544158
DTformat(Data, nrow=10, filename="Historiograph_Network", pagelength=TRUE, left=NULL, right=NULL, numeric=NULL, dom=TRUE,
41554159
size='100%', filter="top", columnShort=NULL, columnSmall=NULL, round=3, title="", button=TRUE, escape=FALSE,

inst/biblioshiny/ui.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2746,7 +2746,7 @@ body <- dashboardBody(
27462746
label = "Clustering Algorithm",
27472747
choices = c("None" = "none",
27482748
"Edge Betweenness" = "edge_betweenness",
2749-
"Fast Greedy" = "fast_greedy",
2749+
#"Fast Greedy" = "fast_greedy",
27502750
"InfoMap" = "infomap",
27512751
"Leading Eigenvalues" = "leading_eigen",
27522752
"Leiden" = "leiden",
@@ -2900,7 +2900,7 @@ body <- dashboardBody(
29002900
label = "Clustering Algorithm",
29012901
choices = c("None" = "none",
29022902
"Edge Betweenness" = "edge_betweenness",
2903-
"Fast Greedy" = "fast_greedy",
2903+
#"Fast Greedy" = "fast_greedy",
29042904
"InfoMap" = "infomap",
29052905
"Leading Eigenvalues" = "leading_eigen",
29062906
"Leiden" = "leiden",
@@ -3194,7 +3194,7 @@ body <- dashboardBody(
31943194
label = "Clustering Algorithm",
31953195
choices = c("None" = "none",
31963196
"Edge Betweenness" = "edge_betweenness",
3197-
"Fast Greedy" = "fast_greedy",
3197+
#"Fast Greedy" = "fast_greedy",
31983198
"InfoMap" = "infomap",
31993199
"Leading Eigenvalues" = "leading_eigen",
32003200
"Leiden" = "leiden",
@@ -3363,7 +3363,7 @@ body <- dashboardBody(
33633363
label = "Clustering Algorithm",
33643364
choices = c("None" = "none",
33653365
"Edge Betweenness" = "edge_betweenness",
3366-
"Fast Greedy" = "fast_greedy",
3366+
#"Fast Greedy" = "fast_greedy",
33673367
"InfoMap" = "infomap",
33683368
"Leading Eigenvalues" = "leading_eigen",
33693369
"Leiden" = "leiden",
@@ -3731,7 +3731,7 @@ body <- dashboardBody(
37313731
label = "Clustering Algorithm",
37323732
choices = c("None" = "none",
37333733
"Edge Betweenness" = "edge_betweenness",
3734-
"Fast Greedy" = "fast_greedy",
3734+
#"Fast Greedy" = "fast_greedy",
37353735
"InfoMap" = "infomap",
37363736
"Leading Eigenvalues" = "leading_eigen",
37373737
"Leiden" = "leiden",
@@ -4031,7 +4031,7 @@ body <- dashboardBody(
40314031
label = "Clustering Algorithm",
40324032
choices = c("None" = "none",
40334033
"Edge Betweenness" = "edge_betweenness",
4034-
"Fast Greedy" = "fast_greedy",
4034+
#"Fast Greedy" = "fast_greedy",
40354035
"InfoMap" = "infomap",
40364036
"Leading Eigenvalues" = "leading_eigen",
40374037
"Leiden" = "leiden",

inst/biblioshiny/utils.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,8 @@ descriptive <- function(values,type){
711711
TAB <- countryCollab(values$M)
712712
TAB <- TAB %>%
713713
mutate(Freq = Articles/sum(Articles)) %>%
714-
mutate(MCP_Ratio = MCP/Articles)
714+
mutate(MCP_Ratio = MCP/Articles) %>%
715+
drop_na(Country)
715716
},
716717
"tab6"={
717718
if (!"AU1_CO" %in% names(values$M)){
@@ -1084,6 +1085,7 @@ CAmap <- function(input, values){
10841085
values$CS=list("NA")
10851086

10861087
}
1088+
return(values)
10871089
}
10881090

10891091
historiograph <- function(input,values){

0 commit comments

Comments
 (0)