0
为什么我的地块没有写入磁盘有什么原因吗?我按照this description保存我的地块,但它不起作用。每个情节只是一个白色的图像。为什么?为什么我的绘图不能写入磁盘?
这是我正在使用的完整脚本;
library(rAltmetric)
library(aRxiv)
print('Load DOIs ..')
doi_list <- list()
categ <- c(AP = 'cat:stat.AP',
CO = "cat:stat.CO", # I'm naming these elements so
ME = "cat:stat.ME", # that the corresponding elements
TH = "cat:stat.TH", # in the list are named as well.
ML = "cat:stat.ML") # Could also just set 'names(doi_list)' to 'categ'.
doi_list <-
lapply(categ, function(ctg)
(doi <- arxiv_search(ctg)$doi)[nchar(doi) > 0])
print('Showing altmetrics ..')
num = 0
for(category in doi_list) {
for(mydoi in category) {
print(paste('Searching DOI:', mydoi))
#acuna <- altmetrics(doi=mydoi)
acuna <- altmetrics(doi="10.1038/489201a")
if(is.null(acuna)) {
next
}
print(acuna)
acuna_data <- altmetric_data(acuna)
jpeg(filename=paste(num, ".jpg", sep=""))
plot(acuna, main=paste(num, ".jpg", sep=""))
dev.off()
num <- num + 1
}
}
print('All done.')
如果是喜欢xyplot,您可以尝试这个http://stackoverflow.com/questions/13114594/problems-saving-several-pdf-files-in-r – user1436187