Question

Is there any option such as log='y' when plotting frequency table. My code is as following:

df = read.table(myfile, header=F, sep=',')
freq = table(df[[1]]) # make frequency table for the first column
plot(freq, log='y')

However it cannot display logarithm. The error message is :

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

Thanks!

Was it helpful?

Solution

Maybe you want to do something like this:

plot(as.numeric(names(freq)),as.numeric(freq),log='y',xlab='',ylab='freq')
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top