ECDF在R中的显示

时间:2018-12-17 09:45:41

标签: r ecdf

我想显示一些CDF数据(下面的R代码),方法是在X轴上使用一组数字的BREAKS,以彼此等距的距离显示(尽管在数字上,BREAKS在log10轴上)并且不会反映相等的距离):

df <- data.frame(
  x = c(rnorm(100, 0, 3), rnorm(100, 0, 10)),
  g = gl(2, 100)
)

breaks=c(0.001, 0.01, 0.1, 1, 5, 10, 20, 30, 100)

ggplot(df, aes(x, colour = g)) + 
stat_ecdf()  + 
scale_x_log10(breaks=breaks), 

我该怎么办?

1 个答案:

答案 0 :(得分:0)

最后,我使用了以下R代码:

const cron = require('cron');

client.on('message', ...); // You don't need to add anything to the message event listener

let scheduledMessage = new cron.CronJob('00 30 10 * * *', () => {
  // This runs every day at 10:30:00, you can do anything you want
  let channel = yourGuild.channels.get('id');
  channel.send('You message');
});

// When you want to start it, use:
scheduledMessage.start()
// You could also make a command to pause and resume the job