R频率表绘制y轴对数标度

R频率表绘制y轴对数标度,r,plot,scale,frequency,logarithm,R,Plot,Scale,Frequency,Logarithm,绘制频率表时是否有任何选项,如log='y'。我的代码如下: df = read.table(myfile, header=F, sep=',') freq = table(df[[1]]) # make frequency table for the first column plot(freq, log='y') 但是,它不能显示对数。错误消息是: Warning messages: 1: In plot.window(...) : nonfinite axis limits [GSc

绘制频率表时是否有任何选项,如log='y'。我的代码如下:

df = read.table(myfile, header=F, sep=',')
freq = table(df[[1]]) # make frequency table for the first column
plot(freq, log='y')
但是,它不能显示对数。错误消息是:

Warning messages:
1: In plot.window(...) :
  nonfinite axis limits [GScale(-inf,7.0814,2, .); log=1]
2: In axis(...) : "log" is not a graphical parameter

谢谢

也许你想做这样的事情:

plot(as.numeric(names(freq)),as.numeric(freq),log='y',xlab='',ylab='freq')

也许你想做这样的事情:

plot(as.numeric(names(freq)),as.numeric(freq),log='y',xlab='',ylab='freq')