useDynLib(collapse, .registration=TRUE) # , .fixes = "C_"
importFrom(Rcpp, evalCpp)
importFrom("graphics", "hist", "par", "plot")
importFrom("grDevices", "rainbow")
# importFrom("lfe", "demeanlist")
importFrom("parallel", "mclapply")
importFrom("utils", "packageVersion", "head", "tail", "capture.output")
importFrom("stats", "as.formula", "complete.cases", "cor", "cov", "var", "pt",
           "setNames", "terms.formula", "ts", "ts.plot", "model.matrix.default",
           "quantile", ".lm.fit", "cov2cor")

 export(pivot)
 export(add_stub)
 export(rm_stub)
 export(all_identical)
 export(all_obj_equal)
 export(all_funs)
 # export(as.factor.GRP)
 export(as_factor_GRP)
 # export(as.factor_GRP)
 export(as_factor_qG)
 # export(as.factor_qG)
 export(atomic_elem)
 export(`atomic_elem<-`)
 export(B)
 export(fbetween)
 export(fbetween.data.frame)
 export(fbetween.default)
 export(fbetween.matrix)
 export(fselect)
 export(slt)
 export(`fselect<-`)
 export(`slt<-`)
 export(ss)
 export(fsubset)
 export(sbt)
 export(fsubset.data.frame)
 export(fsubset.default)
 export(fsubset.matrix)
 export(fsummarise)
 export(fsummarize)
 export(smr)
 export(ftransform)
 export(tfm)
 export(`ftransform<-`)
 export(`tfm<-`)
 export(ftransformv)
 export(tfmv)
 export(settransform)
 export(settfm)
 export(settransformv)
 export(settfmv)
 export(fmutate)
 export(mtt)
 export(fcompute)
 export(fcomputev)
 export(BY)
 export(BY.data.frame)
 export(BY.default)
 export(BY.matrix)
 export(cat_vars)
 export(`cat_vars<-`)
 export(char_vars)
 export(`char_vars<-`)
 export(collap)
 export(collapv)
 export(collapg)
 export(D)
 export(Dlog)
 export(dapply)
 export(date_vars)
 export(`date_vars<-`)
 # export(Date_vars)
 # export(`Date_vars<-`)
 # export(F)
 export(fFtest)
 export(fFtest.default)
 export(fact_vars)
 export(`fact_vars<-`)
 export(fdiff)
 export(fdiff.data.frame)
 export(fdiff.default)
 export(fdiff.matrix)
 export(ffirst)
 export(ffirst.data.frame)
 export(ffirst.default)
 export(ffirst.matrix)
 export(fgrowth)
 export(fgrowth.data.frame)
 export(fgrowth.default)
 export(fgrowth.matrix)
 export(flag)
 export(flag.data.frame)
 export(flag.default)
 export(flag.matrix)
 export(fcumsum)
 export(fcumsum.data.frame)
 export(fcumsum.default)
 export(fcumsum.matrix)
 export(flast)
 export(flast.data.frame)
 export(flast.default)
 export(flast.matrix)
 export(fmax)
 export(fmax.data.frame)
 export(fmax.default)
 export(fmax.matrix)
 export(fmean)
 export(fmean.data.frame)
 export(fmean.default)
 export(fmean.matrix)
 export(fmedian)
 export(fmedian.data.frame)
 export(fmedian.default)
 export(fmedian.matrix)
 export(fnth)
 export(fnth.data.frame)
 export(fnth.default)
 export(fnth.matrix)
 export(fmin)
 export(fmin.data.frame)
 export(fmin.default)
 export(fmin.matrix)
 export(fmode)
 export(fmode.data.frame)
 export(fmode.default)
 export(fmode.matrix)
 export(fndistinct)
 export(fndistinct.data.frame)
 export(fndistinct.default)
 export(fndistinct.matrix)
 export(fNdistinct)
 # export(fNdistinct.data.frame)
 # export(fNdistinct.default)
 # export(fNdistinct.matrix)
 export(fnobs)
 export(fnobs.data.frame)
 export(fnobs.default)
 export(fnobs.matrix)
 export(fNobs)
 # export(fNobs.data.frame)
 # export(fNobs.default)
 # export(fNobs.matrix)
 export(varying)
 export(varying.data.frame)
 export(varying.default)
 export(varying.matrix)
 export(fprod)
 export(fprod.data.frame)
 export(fprod.default)
 export(fprod.matrix)
 export(fscale)
 export(fscale.data.frame)
 export(fscale.default)
 export(fscale.matrix)
 export(fsd)
 export(fsd.data.frame)
 export(fsd.default)
 export(fsd.matrix)
 export(fsum)
 export(fsum.data.frame)
 export(fsum.default)
 export(fsum.matrix)
 export(fvar)
 export(fvar.data.frame)
 export(fvar.default)
 export(fvar.matrix)
 export(G)
 export(get_elem)
 export(get_vars)
 export(`get_vars<-`)
 export(gv)
 export(gvr)
 export(`gv<-`)
 export(`gvr<-`)
 export(add_vars)
 export(av)
 export(`add_vars<-`)
 export(`av<-`)
 export(radixorder)
 export(radixorderv)
 export(seqid)
 export(timeid)
 export(is_irregular)
 export(groupid)
 export(GRP)
 export(GRP.default)
 export(fgroup_by)
 export(gby)
 export(group_by_vars)
 export(fgroup_vars)
 export(fungroup)
 export(findex_by)
 export(iby)
 export(findex)
 export(ix)
 export(reindex)
 export(unindex)
 export(to_plm)
 export(GRPnames)
 export(GRPN)
 export(GRPid)
 export(fcount)
 export(fcountv)
 export(fslice)
 export(fslicev)
 # export(group_names.GRP)
 export(has_elem)
 export(flm)
 export(flm.default)
 export(cinv)
 export(vec)
 export(HDB)
 export(fhdbetween)
 export(fhdbetween.default)
 export(fhdbetween.matrix)
 export(fhdbetween.data.frame)
 export(fHDbetween)
 # export(fHDbetween.default)
 # export(fHDbetween.matrix)
 # export(fHDbetween.data.frame)
 export(HDW)
 export(fhdwithin)
 export(fhdwithin.default)
 export(fhdwithin.matrix)
 export(fhdwithin.data.frame)
 export(fHDwithin)
 # export(fHDwithin.default)
 # export(fHDwithin.matrix)
 # export(fHDwithin.data.frame)
 export(irreg_elem)
 export(is_categorical)
 export(is_date)
 export(is_GRP)
 export(is_qG)
 export(is_unlistable)
 # export(is.categorical)
 # export(is.Date)
 # export(is.GRP)
 # export(is.qG)
 # export(is.unlistable)
 # export(is.regular)
 export(L)
 export(ldepth)
 export(list_elem)
 export(`list_elem<-`)
 export(logi_vars)
 export(`logi_vars<-`)
 export(mctl)
 export(mrtl)
 export(namlab)
 export(num_vars)
 export(`num_vars<-`)
 export(nv)
 export(`nv<-`)
 export(psacf)
 export(psacf.default)
 export(psacf.data.frame)
 export(pspacf)
 export(pspacf.default)
 export(pspacf.data.frame)
 export(psccf)
 export(psccf.default)
 export(psmat)
 export(psmat.default)
 export(psmat.data.frame)
 export(plot.psmat)
 export(qDF)
 export(qDT)
 export(qTBL)
 export(qF)
 export(qG)
 export(qM)
 export(qsu)
 export(qsu.default)
 export(qsu.matrix)
 export(qsu.data.frame)
 export(qtab)
 export(qtable)
 export(descr)
 export(descr.default)
 export(rapply2d)
 export(t_list)
 export(gsplit)
 export(greorder)
 export(rsplit)
 export(rsplit.default)
 export(rsplit.matrix)
 export(rsplit.data.frame)
 export(fdroplevels)
 export(fdroplevels.factor)
 export(fdroplevels.data.frame)
 export(reg_elem)
 export(STD)
 export(TRA)
 export(setTRA)
 export(TRA.data.frame)
 export(TRA.default)
 export(TRA.matrix)
 export(unlist2d)
 export(vlabels)
 export(vclasses)
 export(vtypes)
 export(vlengths)
 export(vgcd)
 export(`vlabels<-`)
 export(setLabels)
 export(W)
 export(fwithin)
 export(fwithin.data.frame)
 export(fwithin.default)
 export(fwithin.matrix)
 export(seq_row)
 export(seq_col)
 export(.c)
 export(setRownames)
 export(setColnames)
 export(setDimnames)
 export(unattrib)
 # export(setAttr)
 export(setAttrib)
 export(setattrib)
 export(copyAttrib)
 export(copyMostAttrib)
 export(pwcor)
 export(pwcov)
 export(pwnobs)
 # export(pwNobs)
 export(whichv)
 export(`%==%`)
 export(`%!=%`)
 export(whichNA)
 export(copyv)
 export(setv)
 export(setop)
 export(`%+=%`)
 export(`%-=%`)
 export(`%*=%`)
 export(`%/=%`)
 export(alloc)
 export(frange)
 export(.range)
 export(fquantile)
 export(.quantile)
 export(fdist)
 export(allv)
 export(anyv)
 export(allNA)
 export(missing_cases)
 export(na_rm)
 export(na_locf)
 export(na_focb)
 export(na_omit)
 export(na_insert)
 export(massign)
 export(`%=%`)
 export(`%rr%`)
 export(`%r+%`)
 export(`%r-%`)
 export(`%r*%`)
 export(`%r/%`)
 export(`%cr%`)
 export(`%c+%`)
 export(`%c-%`)
 export(`%c*%`)
 export(`%c/%`)
 export(join)
 export(fmatch)
 export(ckmatch)
 export(`%!in%`)
 export(`%iin%`)
 export(`%!iin%`)
 # export(Recode)
 export(recode_num)
 export(recode_char)
 export(replace_na)
 export(replace_NA)
 export(pad)
 export(replace_inf)
 export(replace_Inf)
 # export(replace_non_finite)
 export(replace_outliers)
 export(print.qsu)
 export(print.pwcor)
 export(print.pwcov)
 export(fnlevels)
 export(roworder)
 export(roworderv)
 export(rowbind)
 export(frename)
 export(rnm)
 export(setrename)
 export(relabel)
 export(setrelabel)
 export(colorder)
 export(colorderv)
 export(group)
 export(groupv)
 export(funique)
 export(funique.default)
 export(funique.data.frame)
 export(fnunique)
 export(fduplicated)
 export(any_duplicated)
 export(finteraction)
 export(itn)
 export(fnrow)
 export(fncol)
 export(fdim)
 export(as_numeric_factor)
 export(as_integer_factor)
 export(as_character_factor)
 # export(as.numeric_factor)
 # export(as.character_factor)

 # export(.NA_RM)
 export(.FAST_FUN)
 export(.FAST_STAT_FUN)
 export(.OPERATOR_FUN)
 export(.COLLAPSE_TOPICS)
 export(.COLLAPSE_ALL)
 export(.COLLAPSE_GENERIC)
 export(.COLLAPSE_DATA)
 export(.COLLAPSE_OLD)
 export(set_collapse)
 export(get_collapse)


 S3method(B, data.frame)
 S3method(B, list)
 S3method(B, default)
 S3method(B, grouped_df)
 S3method(B, matrix)
 S3method(B, zoo)
 S3method(B, units)
 S3method(B, pdata.frame)
 S3method(B, pseries)
 S3method(fbetween, data.frame)
 S3method(fbetween, list)
 S3method(fbetween, default)
 S3method(fbetween, grouped_df)
 S3method(fbetween, matrix)
 S3method(fbetween, zoo)
 S3method(fbetween, units)
 S3method(fbetween, pdata.frame)
 S3method(fbetween, pseries)
 S3method(fsubset, data.frame)
 S3method(fsubset, pseries)
 S3method(fsubset, pdata.frame)
 S3method(fsubset, grouped_df)
 S3method(fsubset, default)
 S3method(fsubset, matrix)
 S3method(fsubset, zoo)
 S3method(fsubset, units)
 S3method(rsplit, default)
 S3method(rsplit, matrix)
 S3method(rsplit, data.frame)
 S3method(rsplit, zoo)
 S3method(rsplit, units)
 S3method(fdroplevels, default)
 S3method(fdroplevels, factor)
 S3method(fdroplevels, list)
 S3method(fdroplevels, data.frame)
 S3method(BY, data.frame)
 S3method(BY, list)
 S3method(BY, default)
 S3method(BY, grouped_df)
 S3method(BY, matrix)
 S3method(BY, zoo)
 S3method(BY, units)
 S3method(D, data.frame)
 S3method(D, list)
 S3method(D, default)
 S3method(D, expression)
 S3method(D, call)
 S3method(D, name)
 S3method(D, grouped_df)
 S3method(D, matrix)
 S3method(D, zoo)
 S3method(D, units)
 S3method(D, pdata.frame)
 S3method(D, pseries)
 S3method(Dlog, data.frame)
 S3method(Dlog, list)
 S3method(Dlog, default)
 S3method(Dlog, grouped_df)
 S3method(Dlog, matrix)
 S3method(Dlog, zoo)
 S3method(Dlog, units)
 S3method(Dlog, pdata.frame)
 S3method(Dlog, pseries)
 S3method(fdiff, data.frame)
 S3method(fdiff, list)
 S3method(fdiff, default)
 S3method(fdiff, grouped_df)
 S3method(fdiff, matrix)
 S3method(fdiff, zoo)
 S3method(fdiff, units)
 S3method(fdiff, pdata.frame)
 S3method(fdiff, pseries)
 S3method(ffirst, data.frame)
 S3method(ffirst, list)
 S3method(ffirst, default)
 S3method(ffirst, grouped_df)
 S3method(ffirst, matrix)
 S3method(ffirst, zoo)
 S3method(ffirst, units)
 S3method(fgrowth, data.frame)
 S3method(fgrowth, list)
 S3method(fgrowth, default)
 S3method(fgrowth, grouped_df)
 S3method(fgrowth, matrix)
 S3method(fgrowth, zoo)
 S3method(fgrowth, units)
 S3method(fgrowth, pdata.frame)
 S3method(fgrowth, pseries)
 S3method(flag, data.frame)
 S3method(flag, list)
 S3method(flag, default)
 S3method(flag, grouped_df)
 S3method(flag, matrix)
 S3method(flag, zoo)
 S3method(flag, units)
 S3method(flag, pdata.frame)
 S3method(flag, pseries)
 S3method(fcumsum, data.frame)
 S3method(fcumsum, list)
 S3method(fcumsum, default)
 S3method(fcumsum, grouped_df)
 S3method(fcumsum, matrix)
 S3method(fcumsum, zoo)
 S3method(fcumsum, units)
 S3method(fcumsum, pdata.frame)
 S3method(fcumsum, pseries)
 S3method(flast, data.frame)
 S3method(flast, list)
 S3method(flast, default)
 S3method(flast, grouped_df)
 S3method(flast, matrix)
 S3method(flast, zoo)
 S3method(flast, units)
 S3method(fmax, data.frame)
 S3method(fmax, list)
 S3method(fmax, default)
 S3method(fmax, grouped_df)
 S3method(fmax, matrix)
 S3method(fmax, zoo)
 S3method(fmax, units)
 S3method(fmean, data.frame)
 S3method(fmean, list)
 S3method(fmean, default)
 S3method(fmean, grouped_df)
 S3method(fmean, matrix)
 S3method(fmean, zoo)
 S3method(fmean, units)
 S3method(fmedian, data.frame)
 S3method(fmedian, list)
 S3method(fmedian, default)
 S3method(fmedian, grouped_df)
 S3method(fmedian, matrix)
 S3method(fmedian, zoo)
 S3method(fmedian, units)
 S3method(fnth, data.frame)
 S3method(fnth, list)
 S3method(fnth, default)
 S3method(fnth, grouped_df)
 S3method(fnth, matrix)
 S3method(fnth, zoo)
 S3method(fnth, units)
 S3method(fmin, data.frame)
 S3method(fmin, list)
 S3method(fmin, default)
 S3method(fmin, grouped_df)
 S3method(fmin, matrix)
 S3method(fmin, zoo)
 S3method(fmin, units)
 S3method(fmode, data.frame)
 S3method(fmode, list)
 S3method(fmode, default)
 S3method(fmode, grouped_df)
 S3method(fmode, matrix)
 S3method(fmode, zoo)
 S3method(fmode, units)
 S3method(fndistinct, data.frame)
 S3method(fndistinct, list)
 S3method(fndistinct, default)
 S3method(fndistinct, grouped_df)
 S3method(fndistinct, matrix)
 S3method(fndistinct, zoo)
 S3method(fndistinct, units)
 S3method(fNdistinct, data.frame)
 S3method(fNdistinct, default)
 S3method(fNdistinct, matrix)
 S3method(funique, data.frame)
 S3method(funique, list)
 S3method(funique, sf)
 S3method(funique, default)
 # S3method(funique, grouped_df)
 S3method(funique, pseries)
 S3method(funique, pdata.frame)
 S3method(fnobs, data.frame)
 S3method(fnobs, list)
 S3method(fnobs, default)
 S3method(fnobs, grouped_df)
 S3method(fnobs, matrix)
 S3method(fnobs, zoo)
 S3method(fnobs, units)
 S3method(fNobs, data.frame)
 S3method(fNobs, default)
 S3method(fNobs, matrix)
 S3method(varying, data.frame)
 S3method(varying, pdata.frame)
 S3method(varying, pseries)
 S3method(varying, list)
 S3method(varying, sf)
 S3method(varying, default)
 S3method(varying, grouped_df)
 S3method(varying, matrix)
 S3method(varying, zoo)
 S3method(varying, units)
 S3method(fprod, data.frame)
 S3method(fprod, list)
 S3method(fprod, default)
 S3method(fprod, grouped_df)
 S3method(fprod, matrix)
 S3method(fprod, zoo)
 S3method(fprod, units)
 S3method(fscale, data.frame)
 S3method(fscale, list)
 S3method(fscale, default)
 S3method(fscale, grouped_df)
 S3method(fscale, matrix)
 S3method(fscale, zoo)
 S3method(fscale, units)
 S3method(fscale, pdata.frame)
 S3method(fscale, pseries)
 S3method(fsd, data.frame)
 S3method(fsd, list)
 S3method(fsd, default)
 S3method(fsd, grouped_df)
 S3method(fsd, matrix)
 S3method(fsd, zoo)
 S3method(fsd, units)
 S3method(fsum, data.frame)
 S3method(fsum, list)
 S3method(fsum, default)
 S3method(fsum, grouped_df)
 S3method(fsum, matrix)
 S3method(fsum, zoo)
 S3method(fsum, units)
 S3method(fvar, data.frame)
 S3method(fvar, list)
 S3method(fvar, default)
 S3method(fvar, grouped_df)
 S3method(fvar, matrix)
 S3method(fvar, zoo)
 S3method(fvar, units)
 S3method(G, data.frame)
 S3method(G, list)
 S3method(G, default)
 S3method(G, grouped_df)
 S3method(G, matrix)
 S3method(G, zoo)
 S3method(G, units)
 S3method(G, pdata.frame)
 S3method(G, pseries)
 S3method(GRP, default)
 S3method(GRP, GRP)
 S3method(GRP, factor)
 S3method(GRP, grouped_df)
 S3method(GRP, pdata.frame)
 S3method(GRP, pseries)
 S3method(GRP, qG)
 S3method(HDB, data.frame)
 S3method(HDB, default)
 S3method(HDB, matrix)
 S3method(HDB, zoo)
 S3method(HDB, units)
 S3method(HDB, pdata.frame)
 S3method(HDB, pseries)
 S3method(HDB, list)
 S3method(fhdbetween, default)
 S3method(fhdbetween, matrix)
 S3method(fhdbetween, zoo)
 S3method(fhdbetween, units)
 S3method(fhdbetween, data.frame)
 S3method(fhdbetween, pdata.frame)
 S3method(fhdbetween, list)
 S3method(fhdbetween, pseries)
 S3method(fHDbetween, default)
 S3method(fHDbetween, matrix)
 S3method(fHDbetween, data.frame)
 S3method(HDW, list)
 S3method(HDW, data.frame)
 S3method(HDW, default)
 S3method(HDW, matrix)
 S3method(HDW, zoo)
 S3method(HDW, units)
 S3method(HDW, pdata.frame)
 S3method(HDW, pseries)
 S3method(fhdwithin, default)
 S3method(fhdwithin, matrix)
 S3method(fhdwithin, zoo)
 S3method(fhdwithin, units)
 S3method(fhdwithin, data.frame)
 S3method(fhdwithin, pdata.frame)
 S3method(fhdwithin, list)
 S3method(fhdwithin, pseries)
 S3method(fHDwithin, default)
 S3method(fHDwithin, matrix)
 S3method(fHDwithin, data.frame)
 S3method(L, data.frame)
 S3method(L, list)
 S3method(L, default)
 S3method(L, grouped_df)
 S3method(L, matrix)
 S3method(L, zoo)
 S3method(L, units)
 S3method(L, pdata.frame)
 S3method(L, pseries)
 S3method(length, GRP)
 S3method(plot, GRP)
 S3method(print, GRP)
 S3method(print, GRP_df)
 # S3method(head, GRP_df)
 # S3method(tail, GRP_df)
 S3method(print, indexed_frame)
 S3method(print, indexed_series)
 S3method(print, index_df)
 S3method(print, qsu)
 S3method(print, descr)
 S3method(print, pwcor)
 S3method(print, pwcov)
 S3method(print, fFtest)
 S3method(print, psmat)
 S3method(print, invisible)
 S3method(aperm, psmat)
 S3method(aperm, qsu)
 S3method('[', psmat)
 S3method('[', qsu)
 S3method('[', descr)
 S3method('[', pwcor)
 S3method('[', pwcov)
 S3method('[', GRP_df)
 S3method('[[', GRP_df)
 S3method('[<-', GRP_df)
 S3method('[[<-', GRP_df)
 S3method('names<-', GRP_df)
 S3method('[', indexed_series)
 S3method(Math, indexed_series)
 S3method(Ops, indexed_series)
 S3method('[', indexed_frame)
 S3method('[', index_df)
 S3method('[[', indexed_frame)
 S3method('$', indexed_frame)
 S3method('[<-', indexed_frame)
 S3method('[[<-', indexed_frame)
 S3method('$<-', indexed_frame)
 S3method(as.data.frame, descr)
 S3method(as.data.frame, qsu)
 S3method(psacf, data.frame)
 S3method(psacf, default)
 S3method(psacf, pdata.frame)
 S3method(psacf, pseries)
 S3method(psccf, default)
 S3method(psccf, pseries)
 S3method(psmat, data.frame)
 S3method(psmat, default)
 S3method(psmat, pdata.frame)
 S3method(psmat, pseries)
 S3method(plot, psmat)
 S3method(pspacf, data.frame)
 S3method(pspacf, default)
 S3method(pspacf, pdata.frame)
 S3method(pspacf, pseries)
 S3method(qsu, data.frame)
 S3method(qsu, default)
 S3method(qsu, matrix)
 S3method(qsu, zoo)
 S3method(qsu, units)
 S3method(qsu, grouped_df)
 S3method(qsu, pdata.frame)
 S3method(qsu, list)
 S3method(qsu, sf)
 S3method(qsu, pseries)
 S3method(descr, default)
 S3method(descr, grouped_df)
 S3method(STD, data.frame)
 S3method(STD, list)
 S3method(STD, default)
 S3method(STD, grouped_df)
 S3method(STD, matrix)
 S3method(STD, zoo)
 S3method(STD, units)
 S3method(STD, pdata.frame)
 S3method(STD, pseries)
 S3method(TRA, data.frame)
 S3method(TRA, list)
 S3method(TRA, default)
 S3method(TRA, grouped_df)
 S3method(TRA, matrix)
 S3method(TRA, zoo)
 S3method(TRA, units)
 S3method(W, data.frame)
 S3method(W, list)
 S3method(W, default)
 S3method(W, grouped_df)
 S3method(W, matrix)
 S3method(W, zoo)
 S3method(W, units)
 S3method(W, pdata.frame)
 S3method(W, pseries)
 S3method(fwithin, data.frame)
 S3method(fwithin, list)
 S3method(fwithin, default)
 S3method(fwithin, grouped_df)
 S3method(fwithin, matrix)
 S3method(fwithin, zoo)
 S3method(fwithin, units)
 S3method(fwithin, pdata.frame)
 S3method(fwithin, pseries)
