我有一份作者名单.我希望自动检索/计算每位作者的(理想年度)引文索引(h-index,m-quotient,g-index,HCP indicator或...).
Author Year Index
first 2000 1
first 2001 2
first 2002 3
Run Code Online (Sandbox Code Playgroud)
考虑到每位研究人员每篇论文的引用次数,我可以计算所有这些指标.
Author Paper Year Citation_count
first 1 2000 1
first 2 2000 2
first 3 2002 3
Run Code Online (Sandbox Code Playgroud)
尽管我付出了努力,但我还没有找到能够满足这一要求的API /抓取方法.
我的机构可以使用包括Web of Science在内的多种服务.
我想使用ggplot2为地图上的每个位置生成一个条形图,就像xingmowang使用基本图形和许多包一样:
http://nzprimarysectortrade.wordpress.com/2011/10/02/let-r-fly-visualizing-export-data-using-r/

这与在图中嵌入微型图有关.
目前,我能做的最好的事情是在抖动的点图中将值与点大小匹配:
require(ggplot2)
require(maps)
#Get world map info
world_map <- map_data("world")
#Creat a base plot
p <- ggplot() + coord_fixed()
#Add map to base plot
base_world <- p + geom_polygon(data=world_map,
aes(x=long,
y=lat,
group=group))
#Create example data
geo_data <- data.frame(long=c(20,20,100,100,20,20,100,100),
lat=c(0,0,0,0,0,0,0,0),
value=c(10,30,40,50,20,20,100,100),
Facet=rep(c("Facet_1", "Facet_2"), 4),
colour=rep(c("colour_1", "colour_2"), each=4))
#Creat an example plot
map_with_jitter <- base_world+geom_point(data=geo_data,
aes(x=long,
y=lat,
colour=colour,
size=value),
position="jitter",
alpha=I(0.5))
#Add faceting
map_with_jitter <- map_with_jitter + facet_wrap(~Facet)
map_with_jitter <- map_with_jitter + theme(legend.position="none")
print(map_with_jitter)
Run Code Online (Sandbox Code Playgroud)

有一个不优雅的解决方法:
subset_data <- …Run Code Online (Sandbox Code Playgroud) 使用https://gist.github.com/low-decarie/5886616上的代码 可以生成双树枝状瓷砖图:
dual_dendogram_tile_plot(as.matrix(USArrests),main ="USA Arrests")

问题:将垂直树形图与瓷砖绘图区域对齐.(和/或改善水平树状图的对齐)
这个问题涉及到:
虽然手册指出这将是未来的功能:
arrow.size箭头的大小.目前这是一个常数,所以每个边缘都是一样的.如果提交了一个向量,那么只使用第一个元素,即.如果这是从边缘属性获取的,那么只有第一条边的属性用于所有箭头.这可能会在未来发生变化.
默认值为1.
我想知道是否有一个黑客围绕允许箭头大小匹配边缘宽度(每个边缘有自己的宽度).
d <- data.frame(start=c("a","a","b","c"),end=c("b","b","c","b"), size=rnorm(4))
graph <- graph.data.frame(d, directed=T)
plot(graph,
vertex.color="white",
edge.width=E(graph)$size*20,
edge.arrow.size=E(graph)$size)
Run Code Online (Sandbox Code Playgroud)

特定
test<-"Low-Decarie, Etienne"
Run Code Online (Sandbox Code Playgroud)
我希望用空格替换所有标点符号
gsub(pattern="[:punct:]", x=test, replacement=" ")
Run Code Online (Sandbox Code Playgroud)
但这会产生
"Low-De arie, E ie e"
Run Code Online (Sandbox Code Playgroud)
没有替换标点符号并删除明显随机的字母(尽管它们可能与标点符号相关联,标签为t,下一行为n).
为了防止过度绘图,我想要一种替代抖动的方法,只需将点一个堆叠在另一个上面的平均值(通过给定量的增量垂直偏移它们而不是像抖动那样添加随机值).
由此:
example <- data.frame(x=c(1,1,1,2,2,2,2), y=c(1,1,1,2,2,2,2))
qplot(data=example,x=x, y=y)
Run Code Online (Sandbox Code Playgroud)
我想要的是这样的:

这可能是可能的stat_bindot().
有什么建议?
给定y轴上的缩放和x轴上的平移(t)的参数,当目的是最大化曲线叠加(不是最小化距离)时,如何缩放和对齐两条不重合的曲线?
正如@DWin所说,这可以改名为"如何与R完美地玩俄罗斯方块",尽管它的应用程度远远超过了赢得俄罗斯方块游戏.
这个问题的变体可能涉及任意数量的刚体变换(旋转,平移和缩放).
给定曲线1
curve1<-data.frame(x=c(1,1,2,2,3),
y=c(9,6,6,3,3))
with(curve1, plot(x=x, y=y, type="l", xlim=c(0,10), ylim=c(0,10)))
Run Code Online (Sandbox Code Playgroud)

和曲线2
curve2<-data.frame(x=c(4,5,5,6,6,7),
y=c(2,2,1,1,2,3))
with(curve2, plot(x=x, y=y, type="l", xlim=c(0,10), ylim=c(0,10)))
Run Code Online (Sandbox Code Playgroud)

我希望找到最大化两条曲线之间叠加的s和t.
理想情况下,该方法将在R中使用optim.
在这个组成的例子中,t = 3且s = 1/3,所以
t=3
s=1/3
with(curve2, plot(x=x, y=y, type="l", xlim=c(0,10), ylim=c(0,10)))
with(curve1, lines(x=x+t, y=y*s, col="red"))
Run Code Online (Sandbox Code Playgroud)

注意,为了获得这样的拟合,可以具有共识的区域必须具有比不能叠加的区域更高的参数化权重,并且共识区域越大,权重越高.
我一直在探索的小径:
使用最大似然的方法的加分点(假设误差的正态分布).
autocurve.edges在igraph图中弯曲边缘做了一个了不起的工作,这样当它们指向同一方向时它们不会重叠.但是,当它们指向相反的方向时,不会施加曲率.
d <- data.frame(start=c("a","a","b","c"),end=c("b","b","c","b"))
graph <- graph.data.frame(d, directed=T)
plot(graph,
vertex.color="white")
Run Code Online (Sandbox Code Playgroud)

问题是b和c(或c和b)之间的箭头.
除了手动指定曲率,任何建议?
要在ggplot中绘制箭头,我使用geom_segment和arrow = arrow().我希望箭头大小与段宽(或大小)相匹配.但是,箭头不能直接从ggplot中的data参数识别变量,并且必须使用$运算符指定包含变量的data.frame.这会导致用于绘制线的值与用于绘制箭头的值之间的分离(最大箭头可以在最近的线段上).
例:
d <- structure(list(Process = structure(c(2L, 1L, 1L, 1L, 2L, 2L,
1L, 1L, 2L, 1L, 2L), .Label = c("First", "Second"), class = "factor"),
x.sink = c(1, 3, 1, 2, 2, 3, 3, 2, 2, 2, 2), y.sink = c(1,
1, 1, 2, 2, 1, 1, 1, 1, 2, 2), x.source = c(2, 2, 2, 2, 2,
2, 2, 1, 1, 1, 3), y.source = c(2, 2, 2, 1, 1, 1, 1, 1, 1,
2, 1), offset = …Run Code Online (Sandbox Code Playgroud)