Skip to content

Commit 74f1a3c

Browse files
committed
bibliometrix v4.2.1 (Release date: 2024-05-01)
Changes: * Major fixes in convert2df for Scopus and Lens export files * Many improvements in Biblioshiny tables and figures
1 parent 9b7b768 commit 74f1a3c

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

NEWS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
bibliometrix v4.2.1 (Release date: 2024-05-01)
2+
3+
Changes:
4+
* Major fixes in convert2df for Scopus and Lens export files
5+
* Many improvements in Biblioshiny tables and figures
6+
7+
18
bibliometrix v4.2.0 (Release date: 2024-04-18)
29

310
Features:

inst/biblioshiny/server.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3376,7 +3376,7 @@ To ensure the functionality of Biblioshiny,
33763376
list_plot <- list(values$degreePlot)
33773377
res <- addDataScreenWb(list_df, wb=values$wb, sheetname=sheetname)
33783378
#values$wb <- res$wb
3379-
values$wb <- addGgplotsWb(list_plot, wb=res$wb, sheetname, col=res$col+16, width=10, height=7, dpi=75)
3379+
values$wb <- addGgplotsWb(list_plot, wb=res$wb, res$sheetname, col=res$col+16, width=10, height=7, dpi=75)
33803380
#values$fileTFP <- screenSh(selector = "#cocPlot") ## screenshot
33813381
values$fileCOC <- screenSh(values$COCnetwork$VIS, zoom = 2, type="vis")
33823382
values$list_file <- rbind(values$list_file, c(sheetname=res$sheetname,values$fileCOC,res$col))
@@ -4121,7 +4121,7 @@ To ensure the functionality of Biblioshiny,
41214121
list_plot <- list(values$degreePlot)
41224122
res <- addDataScreenWb(list_df, wb=values$wb, sheetname=sheetname)
41234123
#values$wb <- res$wb
4124-
values$wb <- addGgplotsWb(list_plot, wb=res$wb, sheetname, col=res$col+15, width=12, height=8, dpi=75)
4124+
values$wb <- addGgplotsWb(list_plot, wb=res$wb, res$sheetname, col=res$col+15, width=12, height=8, dpi=75)
41254125
#values$fileTFP <- screenSh(selector = "#cocitPlot") ## screenshot
41264126
values$fileCOCIT <- screenSh(values$COCITnetwork$VIS, zoom = 2, type="vis")
41274127
values$list_file <- rbind(values$list_file, c(sheetname=res$sheetname,values$fileCOCIT,res$col))
@@ -4252,7 +4252,7 @@ To ensure the functionality of Biblioshiny,
42524252
list_df <- list(values$colnet$params, values$colnet$cluster_res)
42534253
list_plot <- list(values$degreePlot)
42544254
res <- addDataScreenWb(list_df, wb=values$wb, sheetname=sheetname)
4255-
values$wb <- addGgplotsWb(list_plot, wb=res$wb, sheetname, col=res$col+15, width=12, height=8, dpi=75)
4255+
values$wb <- addGgplotsWb(list_plot, wb=res$wb, res$sheetname, col=res$col+15, width=12, height=8, dpi=75)
42564256
#values$fileTFP <- screenSh(selector = "#colPlot") ## screenshot
42574257
values$fileCOL <- screenSh(values$COLnetwork$VIS, zoom = 2, type="vis")
42584258
values$list_file <- rbind(values$list_file, c(sheetname=res$sheetname,values$fileCOL,res$col))

inst/biblioshiny/utils.R

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2152,19 +2152,6 @@ addGgplotsWb <- function(list_plot, wb, sheetname, col, width=10, height=7, dpi=
21522152
return(wb)
21532153
}
21542154

2155-
# screenSh <- function(selector){
2156-
# fileName <- tempfile(pattern = "figureImage",
2157-
# tmpdir = "",
2158-
# fileext = "") %>% substr(.,2,nchar(.))
2159-
# if (is.null(selector)){
2160-
# shinyscreenshot::screenshot(filename=fileName, download=FALSE, server_dir = tempdir())
2161-
# } else {
2162-
# shinyscreenshot::screenshot(selector=selector, filename=fileName, download=FALSE, server_dir = tempdir())
2163-
# }
2164-
# file <- paste(tempdir(),"/",fileName,".png",sep="")
2165-
# return(file)
2166-
# }
2167-
21682155
screenSh <- function(p, zoom = 2, type="vis"){
21692156
tmpdir = tempdir()
21702157
fileName <- tempfile(pattern = "figureImage",
@@ -2186,7 +2173,12 @@ screenShot <- function(p, filename, type){
21862173

21872174
# setting up the main directory
21882175
#filename <- paste0(file.path(home,"downloads/"),filename)
2189-
filename <- paste0(file.path(home,"downloads"),"/",filename)
2176+
if ("downloads" %in% tolower(dir(home))){
2177+
filename <- paste0(file.path(home,"downloads"),"/",filename)
2178+
} else {
2179+
filename <- paste0(home,"/",filename)
2180+
}
2181+
21902182
plot2png(p, filename, zoom = 2, type=type, tmpdir = tempdir())
21912183

21922184
}
@@ -2202,6 +2194,9 @@ plot2png <- function(p, filename, zoom = 2, type="vis", tmpdir){
22022194
htmlwidgets::saveWidget(p, file=html_name)
22032195
})
22042196
webshot2::webshot(url = html_name, zoom = zoom, file = filename)#, verbose=FALSE)
2197+
popUpGeneric(title=NULL, type="success", color=c("#1d8fe1"),
2198+
subtitle=paste0("Plot was saved in the following path: ",filename),
2199+
btn_labels="OK", size="40%")
22052200
}
22062201

22072202
addScreenWb <- function(df, wb, width=14, height=8, dpi=75){

0 commit comments

Comments
 (0)