/** * Time Series Analysis. */ import type { array, matrix } from "../types"; /** * Convert a time series to a weekly frequency. * * Convert a time series to a weekly frequency. Default: all days * in the range. Example: daily dates [Wed,...Fri,...Mon,...Fri,...Thu] will become * [Wed,...,Fri...,Fri...,Thu] * * @param nd array of unix dates * @param nv array or matrix of values * @return matrix of weekly dates and values * * @example Convert daily data to weekly frequency (simplified) * ```ts * import { assertEquals } from "jsr:@std/assert"; * * const dates = [1421280000, 1421366400, 1421452800, 1421539200]; * const values = [100, 99, 102, 103]; * const result = toweekly(dates, values); * assertEquals(result.length, 2); // Returns [dates, values] array * ``` */ export default function toweekly(nd: array, nv: array | matrix): [array, array | matrix]; //# sourceMappingURL=toweekly.d.ts.map