简体   繁体   English

使用textplot()进行文本对齐(PerformanceAnalytics软件包)

[英]text alignment with textplot() (PerformanceAnalytics package)

I would like to align text in a table using textplot(). 我想使用textplot()将表格中的文本对齐。 Here's my code: 这是我的代码:

liste<-list(1,2)
tabindex<-data.frame(liste)
colnames(tabindex)<-c("Abreviation","Definition")
tabindex[1,]<-c("SAI : ","Strategy AI : stock's weight depending on AI")
tabindex<-rbind(tabindex,"")
tabindex[2,]<-c("SBH : ","Strategy BH : constant stock's weight")
textplot(tabindex,hadj=0,cex=0.8)

How can I align a text properly (in any direction) in each column? 如何在每一列中正确对齐文本(在任何方向上)?

If you modify your textplot call, is this what you want? 如果您修改textplot调用,这是您想要的吗?

textplot(tabindex, halign="left", valign="center", cmar = 0.5, cex=0.8)

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用textplot(gplots或PerformanceAnalytics)左对齐列 - Left justify a column using textplot (gplots or PerformanceAnalytics) 使用PerformanceAnalytics套件计算风险价值 - Calculating Value at Risk with performanceanalytics package 从PerformanceAnalytics包中保存图表对象 - Save chart object from performanceanalytics package 使用“PerformanceAnalytics”包来计算性能度量 - Using 'PerformanceAnalytics' package to calculate Performance Measures 使用PerformanceAnalytics包下标超出范围 - Subscript out of bound using the PerformanceAnalytics package R包'performanceanalytics'优化器中的最大资产数量 - Maximum number of assets in R package 'performanceanalytics' optimizer 如何修改PerformanceAnalytics程序包中的提取函数以获得价值 - How to modify drawdown functions in PerformanceAnalytics package for value PerformanceAnalytics + data.frame:使用包函数时的格式问题 - PerformanceAnalytics + data.frame: Formatting issue when using package functions 如何更改 RStudio 中 PerformanceAnalytics 包生成的绘图的大小(宽度和高度)? - How to change size (width & height) of a plot produced by PerformanceAnalytics package in RStudio? PerformanceAnalytics 包中的某些函数在与 zoo::rollapply 一起使用时失败 - Some functions in PerformanceAnalytics package are failing when use with zoo::rollapply
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM