English 中文(简体)
R ts( )的职能是规定在一天内收集超过10个性别的数据。
原标题:R ts( ) function to specify that data has been collected over 10mins interval in a single day

I have word frequencies observed in a data corpus in a single day, across 10minutes time interval. The data looks something like this:

word 00:00:00 00:11:00 00:22:00 00:33:00 . . . .  23:17:00 23:28:00 23:39:00
Robert  10       20        22       32   . . . .   10        11        10
Harvey  12       35        12       12   . . . .   15        26        9

I want to generate a time series object for this data using R. I know that the ts() function can be used to generate time series object where I can specify the start year and the time-interval being months or quarters. Example:

ts(data, frequency=12, start=c(1946,1))

但是,我不知道我如何利用ts来说明在一天10分钟内收集的数据。 任何cl?

Also, as you can see my data has time information in the header. Can that be used to generate time series object in R?

最佳回答

简言之,你的主要选择是:

  1. 使用<代码>(),但读到帮助页数,显示您可使用fpot=ordeltat=。 由于你的数据频率事实上是固定的,你可以尝试像<代码>deltat=24*60/11这样的东西。 查阅您的数据看来是11分钟,而不是10分钟。

  2. Use the zoo 页: 1 我发现zoo更便于与外界合作。

问题回答

暂无回答




相关问题
How to plot fitted model over observed time series

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 ...

REvolution for R

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 ...

R - capturing elements of R output into text files

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 =...

R statistical package: wrapping GOFrame objects

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/...

Changing the order of dodged bars in ggplot2 barplot

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 "...

Strange error when using sparse matrices and glmnet

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 ...

Generating non-duplicate combination pairs in R

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 ) ...

Per panel smoothing in ggplot2

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 ...

热门标签