用R画图的时候,报错,但其实代码是没问题的

1
2
3
4
5
6
Error in grid.Call(C_convert, x, as.integer(whatfrom), as.integer(whatto),  : 
VECTOR_ELT() can only be applied to a 'list', not a 'NULL'
                   
Error in grid.newpage() : 
  could not open file '/tmp/RtmpCWAOi6/5413447bbbfc43748734b70eb6a8f054.png'
Error in file(out, "wt") : cannot open the connection

升级fs包就行了。

1
install.packages("fs")

可能升级fs包适合我的例子。如果你的问题是下面的,你可能仅仅需要拉大Rstudio显示图片的面板,重新画图即可

1
2
3
4
viewport has zero dimension(s)
In addition: warning messages:
1: Transformation introduced infinite values in continuous x-axis
2: Transformation introduced infinite values in continuous x-axis

参考:https://github.com/r-lib/fs/issues/268

####################################################################

#版权所有 转载请告知 版权归作者所有 如有侵权 一经发现 必将追究其法律责任

#Author: Jason

#####################################################################