timeBins | R Documentation |
Function for calculating timebins.
timeBins(x, binsize, pos = 0.5)
x |
Numerical vector with timestamp information. |
binsize |
Size of the timebin, measured in the same units (often ms)
as |
pos |
Numerical value that determines the label of the binsize as proportion of the binsize. A value of 0 will provide the minimum timestamp within the bin as label, a value of 1 will provide the maximum value within the bin as label. Defaults to 0.5, the center of the bin. |
Anumerical vector of the same size as x
with timebin
information.
Jacolien van Rij
Other Utility functions:
convertNonAlphanumeric()
,
corfit()
,
diff_terms()
,
find_difference()
,
missing_est()
,
modeledf()
,
observations()
,
print_summary()
,
refLevels()
,
res_df()
,
summary_data()
data(simdat) # grouping Time values in bins: simdat$Timebin <- timeBins(simdat$Time, 200) head(simdat) # different labels: simdat$Timebin2 <- timeBins(simdat$Time, 200, pos=0) head(simdat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.