我有一个收集数据的连续过程,我想写每小时收集的数据。 简而言之,我如何能够有条件地每小时将数据保存到数据档案中。
就此而言,我收集一份清单中的数据,希望将清单的标语保存到每小时存档、删除清单并重建。
我对以下法典进行了尝试,但并未奏效:
if (identical(format(Sys.time(), "%M:%S"), "00:00")) {
save(twt, file=fname_r)
}
任何帮助都将受到高度赞赏。
我有一个收集数据的连续过程,我想写每小时收集的数据。 简而言之,我如何能够有条件地每小时将数据保存到数据档案中。
就此而言,我收集一份清单中的数据,希望将清单的标语保存到每小时存档、删除清单并重建。
我对以下法典进行了尝试,但并未奏效:
if (identical(format(Sys.time(), "%M:%S"), "00:00")) {
save(twt, file=fname_r)
}
任何帮助都将受到高度赞赏。
你可能会以错误的方式来做到这一点。 并非所有工作都是R(因为R真正是单一阅读的),时间安排一直是主要的操作系统任务。 使用<代码>cron,或者如果你从西北地区重新担任这一市场领导职务,则看其时间安排选择。 然后编造了三维书。
连续的收集工作是否在现场收集结果,或者在现场或双手进行。 然后每小时收集一次垃圾堆。 一旦你们看到了时间安排,就能够在R这样做。
至于决定某一小时是否已经过去这一更狭隘的问题,使用像过去这样的东西。
then <- Sys.time()
# ... stuff happens ...
now <- Sys.time()
if (as.numeric(difftime(now, then, unit="mins") > 60) {
# .. do stuff
}
为在<代码>R上安排会议,请在<编码>tcltk2包装上使用
This is a really really simple question to which I seem to be entirely unable to get a solution. I would like to do a scatter plot of an observed time series in R, and over this I want to plot the ...
since the latest Ubuntu release (karmic koala), I noticed that the internal R package advertises on start-up the REvolution package. It seems to be a library collection for high-performance matrix ...
I am trying to run an analysis by invoking R through the command line as follows: R --no-save < SampleProgram.R > SampleProgram.opt For example, consider the simple R program below: mydata =...
I m trying to generate GOFrame objects to generate a gene ontology mapping in R for unsupported organisms (see http://www.bioconductor.org/packages/release/bioc/vignettes/GOstats/inst/doc/...
I have a dataframe df.all and I m plotting it in a bar plot with ggplot2 using the code below. I d like to make it so that the order of the dodged bars is flipped. That is, so that the bars labeled "...
I m getting a weird error when training a glmnet regression. invalid class "dgCMatrix" object: length(Dimnames[[2]]) must match Dim[2] It only happens occasionally, and perhaps only under larger ...
Sorry for the non-descriptive title but I don t know whether there s a word for what I m trying to achieve. Let s assume that I have a list of names of different classes like c( 1 , 2 , 3 , 4 ) ...
I m plotting a group of curves, using facet in ggplot2. I d like to have a smoother applied to plots where there are enough points to smooth, but not on plots with very few points. In particular I d ...