Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的脚本会生成包含越来越多字符的行名和列名。
R 矩阵的行名或列名中是否有最大字符数?
行名和列名是数据框或矩阵对象的属性。因此,它们仅受 R 可用的系统资源的限制。
x <- data.frame(col = 0) object.size(x) # 680 bytes # Huge name for a column colnames(x)=paste(rep("x",10^8),collapse="") object.size(x) # 100000680 bytes