Rare decay $Bto X_sl^+l^-$ in a CP spontaneously broken two Higgs doublet model
- 格式:pdf
- 大小:352.92 KB
- 文档页数:29
七年级英语分数和小数的表达单选题40题1.There are twenty-five students in our class. Three-quarters of them are boys. How many boys are there in our class?A.15B.18C.20D.22答案:B。
本题考查分数的表达和计算。
四分之三用three-quarters 表示。
25 的四分之三是18.75,约等于18。
选项A,15 是25 的五分之三,不符合。
选项C,20 是25 的五分之四,不符合。
选项D,22 也不符合题意。
2.In our school library, two-fifths of the books are English books. There are 50 books in total. How many English books are there?A.20B.25C.30D.35答案:A。
五分之二用two-fifths 表示。
50 的五分之二是20。
选项B,25 是50 的二分之一,不符合。
选项C,30 是50 的五分之三,不符合。
选项D,35 不符合题意。
3.There are 30 students in a music club. One-third of them can play the piano. How many students can play the piano?A.10B.15C.20D.25答案:A。
三分之一用one-third 表示。
30 的三分之一是10。
选项B,15 是30 的二分之一,不符合。
选项C,20 是30 的三分之二,不符合。
选项D,25 不符合题意。
4.In an art class, four-sevenths of the students are girls. There are 28 students in total. How many girls are there?A.16B.18C.20D.24答案:A。
Package‘dccmidas’October13,2022Type PackageTitle DCC Models with GARCH-MIDAS Specifications in the UnivariateStepVersion0.1.0Description Estimates a variety of Dynamic Conditional Correlation(DCC)models.More in de-tail,the'dccmidas'package allows the estimation of the cor-rected DCC(cDCC)of Aielli(2013)<doi:10.1080/07350015.2013.771027>,the DCC-MIDAS of Colacito et al.(2011)<doi:10.1016/j.jeconom.2011.02.013>,the Asymmet-ric DCC of Cappiello et al.<doi:10.1093/jjfinec/nbl005>,and the Dynamic Equicorrela-tion(DECO)of Engle and Kelly(2012)<doi:10.1080/07350015.2011.652048>.'dccmidas'of-fers the possibility of including standard GARCH<doi:10.1016/0304-4076(86)90063-1>,GARCH-MIDAS<doi:10.1162/REST_a_00300>and Double Asymmetric GARCH-MIDAS<doi:10.1016/j.econmod.2018.07.025>models in the univariate estimation.Fi-nally,the package calculates also the var-cov matrix under two non-parametric models:the Mov-ing Covariance and the RiskMetrics specifications.License GPL-3LinkingTo Rcpp,RcppArmadilloEncoding UTF-8LazyData trueRoxygenNote7.1.1RdMacros RdpackDepends R(>=4.0.0)Imports Rcpp(>=1.0.5),maxLik(>=1.3-8),rumidas(>=0.1.1),rugarch(>=1.4-4),roll(>=1.1.4),xts(>=0.12.0),tseries(>=0.10.47),Rdpack(>=1.0.0),lubridate(>=1.7.9),zoo(>=1.8.8),stats(>=4.0.2),utils(>=4.0.2)Suggests knitr,rmarkdownNeedsCompilation yesAuthor Vincenzo Candila[aut,cre]Maintainer Vincenzo Candila<****************************>Repository CRANDate/Publication2021-03-1510:00:07UTC12cov_eval R topics documented:cov_eval (2)dcc_fit (3)Det (7)ftse100 (7)indpro (8)Inv (9)nasdaq (9)plot_dccmidas (10)sp500 (11)Index13 cov_eval Var-cov matrix evaluationDescriptionEvaluates the estimated var-cov matrix H_t with respect to a covariance proxy,under different robust loss functions(Laurent et al.2013).The losses considered are also used in Amendola et al.(2020).Usagecov_eval(H_t,cov_proxy=NULL,r_t=NULL,loss="FROB")ArgumentsH_t Estimated covariance matrix,formatted as arraycov_proxy optional Covariance matrix,formatted as arrayr_t optional List of daily returns used to calculate H_t.If parameter’cov_proxy’is not provided,then r_t must be included.In this case,a(noise)proxy will beautomatically usedloss Robust loss function to use.Valid choices are:"FROB"for Frobenius(by de-fault),"SFROB"for Squared Frobenius,"EUCL"for Euclidean,"QLIKE"forQLIKE and"RMSE"for Root Mean Squared ErrorsValueThe value of the loss for each tReferencesAmendola A,Braione M,Candila V,Storti G(2020).“A Model Confidence Set approach to the combination of multivariate volatility forecasts.”International Journal of Forecasting,36(3),873-891.doi:10.1016/j.ijforecast.2019.10.001.Laurent S,Rombouts JV,Violante F(2013).“On loss functions and ranking forecasting perfor-mances of multivariate volatility models.”Journal of Econometrics,173(1),1–10.doi:10.1016/ j.jeconom.2012.08.004.Examplesrequire(xts)#open to close daily log-returnsr_t_s<-log(sp500[ 2010/2019 ][,3])-log(sp500[ 2010/2019 ][,1])r_t_n<-log(nasdaq[ 2010/2019 ][,3])-log(nasdaq[ 2010/2019 ][,1])r_t_f<-log(ftse100[ 2010/2019 ][,3])-log(ftse100[ 2010/2019 ][,1])db_m<-merge.xts(r_t_s,r_t_n,r_t_f)db_m<-db_m[complete.cases(db_m),]colnames(db_m)<-c("S&P500","NASDAQ","FTSE100")#list of returnsr_t<-list(db_m[,1],db_m[,2],db_m[,3])#estimationK_c<-144N_c<-36cdcc_est<-dcc_fit(r_t,univ_model="sGARCH",distribution="norm",corr_model="DCCMIDAS",N_c=N_c,K_c=K_c)cov_eval(cdcc_est$H_t,r_t=r_t)[(K_c+1):dim(cdcc_est$H_t)[3]]dcc_fit DCCfit(first and second steps)DescriptionObtains the estimation of a variety of DCC models,using as univariate models both GARCH and GARCH-MIDAS specifications.Usagedcc_fit(r_t,univ_model="sGARCH",distribution="norm",MV=NULL,K=NULL,corr_model="cDCC",lag_fun="Beta",N_c=NULL,K_c=NULL)Argumentsr_t List of daily returns on which estimate a DCC model.Each daily return must bean’xts’object.Note that the sample period of the returns should be the same.Otherwise,a merge is performeduniv_model Specification of the univariate model.Valid choices are:some of the specifica-tions used in the rugarch(ugarchspec)and rumidas(ugmfit)packages.Morein detail,the models coming from rugarch are:model Valid models(currentlyimplemented)are’sGARCH’,’eGARCH’,’gjrGARCH’,’iGARCH’,and’cs-GARCH’.The models implemented from rumidas are:’GM_skew’,’GM_noskew’,’DAGM_skew’,and’DAGM_noskew’distribution optional Distribution chosen for the univariate estimation.Valid choices are:"norm"(by default)and"std",respectively,for the Normal and Student’s t dis-tributionsMV optional MIDAS variable to include in the univariate estimation,if the modelspecificied is a GARCH-MIDAS(GM,Engle et al.(2013))or a Double Asym-metric GM(DAGM,Engle et al.(2013)).In the case of MIDAS-based models,please provide a list of the MIDAS variables obtained from the mv_into_matfunction.If the same MV variable is used,then provide always a list,with thesame(transformed)variable repeatedK optional The number of lagged realization of MV variable to use,if’univ_model’has a MIDAS termcorr_model Correlation model used.Valid choices are:"cDCC"(the corrected DCC ofAielli(2013)),"aDCC"(the asymmetric DCC model of Cappiello et al.(2006)),"DECO"(Dynamic equicorrelation of Engle and Kelly(2012)),and"DCCMI-DAS"(the DCC-MIDAS of Colacito et al.(2011)).By detault,it is"cDCC"lag_fun g function to use.Valid choices are"Beta"(by default)and"Al-mon",for the Beta and Exponential Almon lag functions,respectively,if’univ_model’has a MIDAS term and/or if’corr_model’is"DCCMIDAS"N_c optional Number of(lagged)realizations to use for the standarized residualsforming the long-run correlation,if’corr_model’is"DCCMIDAS"K_c optional Number of(lagged)realizations to use for the long-run correlation,if’corr_model’is"DCCMIDAS"DetailsFunction dcc_fit implements the two-steps estimation of the DCC models.In thefirst step,a variety of univariate models are considered.These models can be selected using for the pa-rameter’univ_model’one of the following choices:’sGARCH’(standard GARCH of Bollerslev (1986)),’eGARCH’of Nelson(1991),’gjrGARCH’of Glosten et al.(1993),’iGARCH’(Integrated GARCH of Engle and Bollerslev(1986)),’csGARCH’(the Component GARCH of Engle and Lee (1999)),’GM_noskew’and’GM_skew’(the GARCH-MIDAS model of Engle et al.(2013),respec-tively,without and with the asymmetric term in the short-run component),and’DAGM_noskew’and’DAGM_skew’(the Double Asymmetric GARCH-MIDAS model of Amendola et al.(2019), respectively,without and with the asymmetric term in the short-run component).Valuedcc_fit returns an object of class’dccmidas’.The function summary.dccmidas can be used to print a summary of the results.Moreover,an object of class’dccmidas’is a list containing the following components:•assets:Names of the assets considered.•model:Univariate model used in thefirst step.•est_univ_model:List of matrixes of estimated coefficients of the univariate model,with the QML(Bollerslev and Wooldridge1992)standard errors.•corr_coef_mat:Matrix of estimated coefficients of the correlation model,with the QML stan-dard errors.•mult_model:Correlation model used in the second step.•obs:The number of daily observations used for the estimation.•period:The period of the estimation.•H_t:Conditional covariance matrix,reported as an array.•R_t:Conditional correlation matrix,reported as an array.•R_t_bar:Conditional long-run correlation matrix,reported as an array,if the correlation ma-trix includes a MIDAS specification.•est_time:Time of estimation.•Days:Days of the sample period.•llk:The value of the log-likelihood(for the second step)at the maximum.ReferencesAielli GP(2013).“Dynamic conditional correlation:on properties and estimation.”Journal of Business&Economic Statistics,31(3),282–299.doi:10.1080/07350015.2013.771027.Amendola A,Candila V,Gallo GM(2019).“On the asymmetric impact of macro–variables on volatility.”Economic Modelling,76,135–152.doi:10.1016/j.econmod.2018.07.025.Bollerslev T(1986).“Generalized autoregressive conditional heteroskedasticity.”Journal of Econo-metrics,31(3),307–327.doi:10.1016/03044076(86)900631.Bollerslev T,Wooldridge JM(1992).“Quasi-maximum likelihood estimation and inference in dy-namic models with time-varying covariances.”Econometric Reviews,11,143–172.doi:10.1080/ 07474939208800229.Cappiello L,Engle RF,Sheppard K(2006).“Asymmetric dynamics in the correlations of global equity and bond returns.”Journal of Financial Econometrics,4(4),537–572.doi:10.1093/jjfinec/ nbl005.Colacito R,Engle RF,Ghysels E(2011).“A component model for dynamic correlations.”Journalof Econometrics,164(1),45–59.doi:10.1016/j.jeconom.2011.02.013.Engle R,Kelly B(2012).“Dynamic equicorrelation.”Journal of Business&Economic Statis-tics,30(2),212–228.doi:10.1080/07350015.2011.652048.Engle RF,Bollerslev T(1986).“Modelling the persistence of conditional variances.”Econometric Reviews,5(1),1–50.doi:10.1080/07474938608800095.Engle RF,Ghysels E,Sohn B(2013).“Stock market volatility and macroeconomic fundamen-tals.”Review of Economics and Statistics,95(3),776–797.doi:10.1162/REST_a_00300.Engle RF,Lee GJ(1999).“A Long-run and Short-run Component Model of Stock Return V olatil-ity.”In Engle RF,White H(eds.),Cointegration,Causality,and Forecasting:A Festschrift in Honor of Clive W.J.Granger,475–497.Oxford University Press,Oxford.Glosten LR,Jagannathan R,Runkle DE(1993).“On the relation between the expected value and the volatility of the nominal excess return on stocks.”The Journal of Finance,48(5),1779–1801.doi:10.1111/j.15406261.1993.tb05128.x.Nelson DB(1991).“Conditional heteroskedasticity in asset returns:A new approach.”Econo-metrica,59,347–370.doi:10.2307/2938260.Examplesrequire(xts)#open to close daily log-returnsr_t_s<-log(sp500[ 2005/2008 ][,3])-log(sp500[ 2005/2008 ][,1])r_t_n<-log(nasdaq[ 2005/2008 ][,3])-log(nasdaq[ 2005/2008 ][,1])r_t_f<-log(ftse100[ 2005/2008 ][,3])-log(ftse100[ 2005/2008 ][,1])db_m<-merge.xts(r_t_s,r_t_n,r_t_f)db_m<-db_m[complete.cases(db_m),]colnames(db_m)<-c("S&P500","NASDAQ","FTSE100")#list of returnsr_t<-list(db_m[,1],db_m[,2],db_m[,3])#MV transformation(same MV for all the stocks)require(rumidas)mv_m<-mv_into_mat(r_t[[1]],diff(indpro),K=12,"monthly")#list of MVMV<-list(mv_m,mv_m,mv_m)#estimationK_c<-144N_c<-36dccmidas_est<-dcc_fit(r_t,univ_model="GM_noskew",distribution="norm",MV=MV,K=12,corr_model="DCCMIDAS",N_c=N_c,K_c=K_c)dccmidas_estsummary.dccmidas(dccmidas_est)Det7 Det Matrix determinantDescriptionCalculates the determinant of a numeric matrix.UsageDet(x)Argumentsx a numeric matrixValueThe determinant of x.Examplesx<-matrix(sample(1:25,25,replace=TRUE),ncol=5)Det(x)ftse100FTSE100dataDescriptionDaily data on FTSE100collected from the realized library of the Oxford-Man Institute(Heber et al.2009).Usagedata(ftse100)FormatAn object of class"xts".Detailsftse100includes the open price(open_price),the realized variance(rv5),and the close price(close_price).The realized variance has been calculated using intradaily intervals offive minutes(Andersen and Bollerslev1998).8indproSourceRealized library of the Oxford-Man InstituteReferencesAndersen TG,Bollerslev T(1998).“Answering the Skeptics:Yes,Standard V olatility Models do Provide Accurate Forecasts.”International Economic Review,39,885–905.doi:10.2307/2527343.Heber G,Lunde A,Shephard N,Sheppard K(2009).“OMI’s realised library,version0.1.”Oxford–Man Institute,University of Oxford.Exampleshead(ftse100)summary(ftse100)indpro Monthly U.S.Industrial ProductionDescriptionMonthly data on the U.S.Industrial Production index(IP,index2012=100,seasonally adjusted) collected from the Federal Reserve Economic Data(FRED)archive.The IP has been used as MIDAS term in different contributions(see,for instance,Engle et al.(2013),Conrad and Loch (2015),and Amendola et al.(2017)).Usagedata(indpro)FormatAn object of class"xts".SourceArchive of the Federal Reserve Economic Data(FRED)ReferencesAmendola A,Candila V,Scognamillo A(2017).“On the influence of US monetary policy on crude oil price volatility.”Empirical Economics,52(1),155–178.doi:10.1007/s0018101610695.Conrad C,Loch K(2015).“Anticipating Long-Term Stock Market V olatility.”Journal of Applied Econometrics,30(7),1090–1114.doi:10.1002/jae.2404.Engle RF,Ghysels E,Sohn B(2013).“Stock market volatility and macroeconomic fundamentals.”Review of Economics and Statistics,95(3),776–797.doi:10.1162/REST_a_00300.Inv9Exampleshead(indpro)summary(indpro)plot(indpro)Inv Inverse of a matrixDescriptionCalculates the inverse of a numeric matrixUsageInv(x)Argumentsx a numeric matrixValueThe inverse of x.Examplesx<-matrix(sample(1:25,25,replace=TRUE),ncol=5)Inv(x)nasdaq NASDAQ dataDescriptionDaily data on NASDAQ collected from the realized library of the Oxford-Man Institute(Heber et al.2009).Usagedata(nasdaq)FormatAn object of class"xts".10plot_dccmidas Detailsnasdaq includes the open price(open_price),the realized variance(rv5),and the close price(close_price).The realized variance has been calculated using intradaily intervals offive minutes(Andersen and Bollerslev1998).SourceRealized library of the Oxford-Man InstituteReferencesAndersen TG,Bollerslev T(1998).“Answering the Skeptics:Yes,Standard V olatility Models do Provide Accurate Forecasts.”International Economic Review,39,885–905.doi:10.2307/2527343.Heber G,Lunde A,Shephard N,Sheppard K(2009).“OMI’s realised library,version0.1.”Oxford–Man Institute,University of Oxford.Exampleshead(nasdaq)summary(nasdaq)plot_dccmidas Plot method for’dccmidas’classDescriptionPlots of the conditional volatilities on the main diagonal and of the conditional correlations on the extra-diagonal elements.Usageplot_dccmidas(x,K_c=NULL,vol_col="black",long_run_col="red",cex_axis=0.75,LWD=2,asset_sub=NULL)sp50011Argumentsx An object of class’dccmidas’,that is the result of a call to dcc_fit.K_c optional Number of(lagged)realizations to use for the long-run correlation,,if ’corr_model’is"DCCMIDAS"vol_col optional Color of the volatility and correlation plots."black"by defaultlong_run_col optional Color of the long-run correlation plots,if present."red"by default cex_axis optional Size of the x-axis.Default to0.75LWD optional Width of the plotted lines.Default to2asset_sub optional Numeric vector of selected assets to consider for the plot.NULL by defaultValueNo return value,called for side effectsExamplesrequire(xts)#open to close daily log-returnsr_t_s<-log(sp500[ 2010/2019 ][,3])-log(sp500[ 2010/2019 ][,1])r_t_n<-log(nasdaq[ 2010/2019 ][,3])-log(nasdaq[ 2010/2019 ][,1])r_t_f<-log(ftse100[ 2010/2019 ][,3])-log(ftse100[ 2010/2019 ][,1])db_m<-merge.xts(r_t_s,r_t_n,r_t_f)db_m<-db_m[complete.cases(db_m),]colnames(db_m)<-c("S&P500","NASDAQ","FTSE100")#list of returnsr_t<-list(db_m[,1],db_m[,2],db_m[,3])#estimationK_c<-144N_c<-36cdcc_est<-dcc_fit(r_t,univ_model="sGARCH",distribution="norm",corr_model="DCCMIDAS",N_c=N_c,K_c=K_c)plot_dccmidas(cdcc_est,K_c=144)sp500S&P500dataDescriptionDaily data on S&P500collected from the realized library of the Oxford-Man Institute(Heber et al.2009).Usagedata(sp500)12sp500FormatAn object of class"xts".Detailssp500includes the open price(open_price),the realized variance(rv5),and the close price(close_price).The realized variance has been calculated using intradaily intervals offive minutes(Andersen and Bollerslev1998).SourceRealized library of the Oxford-Man InstituteReferencesAndersen TG,Bollerslev T(1998).“Answering the Skeptics:Yes,Standard V olatility Models do Provide Accurate Forecasts.”International Economic Review,39,885–905.doi:10.2307/2527343.Heber G,Lunde A,Shephard N,Sheppard K(2009).“OMI’s realised library,version0.1.”Oxford–Man Institute,University of Oxford.Exampleshead(sp500)summary(sp500)Index∗datasetsftse100,7indpro,8nasdaq,9sp500,11cov_eval,2dcc_fit,3,11Det,7ftse100,7indpro,8Inv,9mv_into_mat,4nasdaq,9plot_dccmidas,10sp500,11summary.dccmidas,5ugarchspec,4ugmfit,413。
节约浪费的对话作文英文Title: Conversations on Conservation: A Spontaneous Dialogue。
1.In the bustling marketplace of life, a casual exchange caught my ear, like a whisper in the wind. "What's your name?" someone asked, curious about the entity that stood still, observing the waste around.2. "Chatgpt, you might say," I replied, my voice soft, as if echoing the rhythm of the city. "A name, just a label for the thoughts that seek to conserve."3. "Chatgpt, huh? So, you're here to talk about saving, right?" They probed, their eyes scanning the discarded items. "Well, I'm here to spark conversations, to remind us of the power in every choice we make."4. "Each time we reuse a bottle, or turn off a light, we're not just saving resources, but connecting with the cycle of life," I responded, my words like a gentle reminder in the midst of chaos.5. "You know, it's not just about big actions, but small ones too. Like choosing to walk instead of drive, or eating leftovers," I continued, my tone light, as if sharing a personal anecdote.6. "It's about understanding that every bit counts,like grains of sand in a beach, forming a vast, unbroken shore of conservation."7. "And when we engage in these conversations, we create a ripple effect, spreading awareness and inspiring others to join the cause," I concluded, my voice tinged with hope.8. "So, let's keep talking, because every chat is a chance to change, to be part of the change we wish to see in the world," I said, my words a testament to the power ofdialogue.9. "Chatgpt, here, ready to listen and learn, ready to dialogue on the path to a more sustainable tomorrow," I finished, my purpose clear, as the sun set, casting a glow on the potential for change.10. And thus, in the realm of waste and conservation, our conversation continued, a testament to the power of simple acts and the dialogue that drives transformation.。
去批次效应 r语言在R语言中,可以使用tapply()和aggregate()等函数来进行批次效应的分析。
1. 使用tapply()函数进行批次效应的分析:```{r}# 示例数据data <- data.frame(batch = rep(c("A", "B", "C"), times = 5),value = c(1, 2, 3, 4, 5, 3, 4, 5, 6, 7, 5, 6, 7, 8, 9))# 使用tapply()计算每个批次的平均值batch_mean <- tapply(data$value, data$batch, mean)# 打印结果print(batch_mean)```该示例中,使用tapply()函数按照`batch`列进行分组,并计算每个批次对应的`value`列的平均值。
2. 使用aggregate()函数进行批次效应的分析:```{r}# 示例数据data <- data.frame(batch = rep(c("A", "B", "C"), times = 5),value = c(1, 2, 3, 4, 5, 3, 4, 5, 6, 7, 5, 6, 7, 8, 9))# 使用aggregate()计算每个批次的平均值batch_mean <- aggregate(value ~ batch, data = data, mean)# 打印结果print(batch_mean)```该示例中,使用aggregate()函数按照`batch`列进行分组,并计算每个批次对应的`value`列的平均值。
以上是在R语言中使用tapply()和aggregate()函数进行批次效应分析的示例。
实际分析中,可以根据数据的特点选择适当的方法进行批次效应的处理和分析。
CucumberAboutthe T utorialCucumber i s a test i ng too l that supports Behav i or Dr i ven Deve l opment (BDD) framework. It def i nes app li cat i on behav i or us i ng s i mp l e Eng li sh text, def i ned by a l anguage ca ll ed Gherk i n.Cucumber a ll ows automat i on funct i ona l va li dat i on that i s eas il y read and understood. Cucumber was i n i t i a ll y i mp l emented i n Ruby and then extended to Java framework. Both the too l s support nat i ve JUn i t.Th i s tutor i a l i s fa i r l y comprehens i ve and covers a ll the necessary aspects on Cucumber us i ng examp l es for easy understand i ng.AudienceTh i s tutor i a l i s des i gned for software profess i ona l s such as ana l ysts, deve l opers, and testers who are keen on l earn i ng the fundamenta l s of Cucumber and want to put i t i nto pract i ce.PrerequisitesBefore proceed i ng w i th th i s tutor i a l, you need to have a bas i c know l edge on test i ng as we ll as some hands-on exper i ence of some test i ng too l s. You shou l d have a command i ng know l edge on Java, and some fam ili ar i ty w i th JUn i t and Ruby.Copyright&Disclaimer© Copyr i ght 2016 by Tutor i a l s Po i nt (I) Pvt. Ltd.A ll the content and graph i cs pub li shed i n th i s e-book are the property of Tutor i a l s Po i nt (I) Pvt. Ltd. The user of th i s e-book i s proh i b i ted to reuse, reta i n, copy, d i str i bute or repub li sh any contents or a part of contents of th i s e-book i n any manner w i thout wr i tten consent of the pub li sher.We str i ve to update the contents of our webs i te and tutor i a l s as t i me l y and as prec i se l y as poss i b l e, however, the contents may conta i n i naccurac i es or errors. Tutor i a l s Po i nt (I) Pvt. Ltd. prov i des no guarantee regard i ng the accuracy, t i me li ness or comp l eteness of our webs i te or i ts contents i nc l ud i ng th i s tutor i a l. If you d i scover any errors on our webs i te or i n th i s tutor i a l, p l ease not i fy us at **************************1T able ofContentsAbout the Tuto r ial (1)Audien c e (1)P r e r equisites (1)Copy r ight&Dis c laime r (1)Table o f Contents (2)1.C U C UM B E R–O V E RVI E W (1)2.C U C UM B E R– E N VIR ONM E NT (3)P r e r equisites f o r Envi r onment Setup (3)Con f igu r e Cu c umbe r with Maven (6)3.C U C UM B E R–GH E RKI NS (11)4.C U C UM B E R– FE A TU R E S (13)Featu r e Files (13)Steps De f initions (15)5.C U C UM B E R–S CE N ARI OS (16)6.C U C UM B E R–A NNOT A T I ONS (18)E x ample S c ena r io (19)7.C U C UM B E R–S CE N ARI O OUT L I N E (25)8.C U C UM B E R–T A GS (31)9.C U C UM B E R–D A T A T AB LE S (35)10.C U C UM B E R– C OMM E NTS (41)11.C U C UM B E R–HOO K S (42)212.C U C UM B E R– C OMM A ND L I N E O P T I ONS (45)13.C U C UM B E R–J UN I T R UNN E R (50)14.C U C UM B E R–R E P O R TS (57)P r etty Fo r mat(HTML Repo r t) (57)JSON Repo r t (60)15.C U C UM B E R–D E B UGG I NG (62)16.C U C UM B E R–JAVA T E ST I NG (63)17.C U C UM B E R–R U B Y T E ST I NG (70)3In order to get better advantage of the software test i ng, organ i zat i ons are nowadays tak i ng a step forward. They i mp l ement i mportant acceptance test scenar i os wh il e deve l opment i s i n-progress. Th i s approach i s common l y known as Behavior Driven Development (BDD).Behav i or Dr i ven Deve l opment g i ves us an opportun i ty to create test scr i pts from both the deve l oper’s and the customer’s prospect i ve as we ll. So i n the beg i nn i ng, deve l opers, project managers, QAs, user acceptance testers and the product owner (stockho l der), a ll get together and bra i nstorm about wh i ch test scenar i os shou l d be passed i n order to ca ll th i s software/app li cat i on successfu l. Th i s way they come up w i th a set of test scenar i os.A ll these test scr i pts are i n s i mp l e Eng li sh l anguage, so i t serves the purpose of documentat i on a l so.ExampleIf we are deve l op i ng a user authent i cat i on feature, then the fo ll ow i ng can be few key test scenar i os, wh i ch needs to get passed i n order to ca ll i t a success.∙ The user shou l d be ab l e to l og i n w i th correct username and correct password.∙ T he user shou l d not be ab l e to l og i n w i th i ncorrect username and correct password.∙ T he user shou l d not be ab l e to l og i n w i th correct username and i ncorrect password.How it WorksBy the t i me the code i s ready, test scr i pts are ready too. The code has to pass the test scr i pts def i ned i n BDD. If i t does not happen, code refactor i ng w ill be needed. Code gets freezed on l y after successfu l execut i on of def i ned test scr i pts.1Cucumber It i s a very s i mp l e not i on, but what we need i n order to get th i s concept i mp l emented. The answer i s, Behav i or Dr i ven Deve l opment (BDD) Framework. Cucumber i s one such open source too l, wh i ch supports behav i or dr i ven deve l opment. To be more prec i se, Cucumber can be def i ned as a test i ng framework, dr i ven by p l a i n Eng li sh text. It serves as documentat i on, automated tests, and a deve l opment a i d – a ll i n one.So what does Cucumber do? It can be descr i bed i n the fo ll ow i ng steps:Cucumber reads the code wr i tten i n p l a i n Eng li sh text (Language Gherk i n –to be i ntroduced l ater i n th i s tutor i a l) i n the feature f il e (to be i ntroduced l ater).It f i nds the exact match of each step i n the step def i n i t i on (a code f il e - deta il s prov i ded l ater i n the tutor i a l).The p i ece of code to be executed can be d i fferent software frameworks li ke Selenium, Ruby on Rails, etc. Not every BDD framework too l supports every too l.Th i s has become the reason for Cucumber's popu l ar i ty over other frameworks, li ke JBehave, JDave, Easyb, etc.Cucumber supports over a dozen d i fferent software p l atforms li ke:∙ Ruby on Ra il s∙ Se l en i um∙ P i coConta i ner∙ Spr i ng Framework∙ Wat i rAdvantages of Cucumber Over Other Tools∙ Cucumber supports d i fferent l anguages li ke and Ruby.∙ It acts as a br i dge between the bus i ness and techn i ca l l anguage. We can accomp li sh th i s by creat i ng a test case i n p l a i n Eng li sh text.∙ It a ll ows the test scr i pt to be wr i tten w i thout know l edge of any code, i t a ll ows thei nvo l vement of non-programmers as we ll.∙ It serves the purpose of end-to-end test framework un li ke other too l s.∙ Due to s i mp l e test scr i pt arch i tecture, Cucumber prov i des code reusab ili ty.2In th i s chapter, we w ill see the env i ronment setup for Cucumber w i th Se l en i um WebDr i ver and Java, on W i ndows Mach i ne.Prerequisites for EnvironmentSetupFo ll ow i ng are the prerequ i s i tes requ i red to set up w i th:JavaWhy we need: Java i s a robust programm i ng l anguage. Cucumber supports Java p l atform for the execut i on.How to install:Step(1): Down l oad jdk and jre from the fo ll ow i ng li nk/technetwork/java/javase/downloads/index.htmlStep(2): Accept li cense agreement.Step(3): Insta ll JDK and JRE.Step(4): Set the env i ronment var i ab l e as shown i n the fo ll ow i ng screenshots.34Eclipse∙ Why we need: Ec li pse i s an Integrated Deve l opment Env i ronment (IDE). It conta i ns a base workspace and an extens i b l e p l ug-i n system for custom i z i ng the env i ronment.How to install:Step(1): Make sure JAVA i s i nsta ll ed on your mach i ne.Step(2): Down l oad Ec li pse from http://www.ec li /down l oads.Step(3): Unz i p and Ec li pse i s i nsta ll ed.Maven∙ Why we need: Maven i s a bu il d automat i on too l used pr i mar il y for Java projects.It prov i des a common p l atform to perform act i v i t i es li ke generat i ng source code, comp ili ng code, packag i ng code to a jar, etc. Later i f any of the software vers i ons gets changed, Maven prov i des an easy way to mod i fy the test projectaccord i ng l y.5Cucumber ∙ How to install:Step(1): Down l oad Maven from the fo ll ow i ng li nk:https:///download.cgiStep(2): Unz i p the f il e and remember the l ocat i on.Step(3): Create env i ronment var i ab l e MAVEN_HOME as shown i n the fo ll ow i ng screenshot.Step(4): Ed i t Path var i ab l e and i nc l ude Maven as shown i n the fo ll ow i ng screenshot.Step(5): Down l oad MAVEN p l ug i n from Ec li pse.Step(6): Open Ec li pse.Step(7): Go to He l p -> Ec li pse Marketp l ace -> Search Maven -> Maven Integrat i on for Ec li pse -> INSTALL.Configure CucumberwithMavenStep(1): Create a Maven project.∙ Go to F il e -> New -> Others -> Maven -> Maven Project -> Next.∙ Prov i de group Id (group Id w ill i dent i fy your project un i que l y across a ll projects).6Cucumber ∙ Prov i de art i fact Id(art i fact Id i s the name of the jar w i thout vers i on. You can choose any name, wh i ch i s i n l owercase). C li ck on F i n i sh.Step(2): Open pom.xm l:∙ Go to package exp l orer on the l eft hand s i de of Ec li pse.∙ Expand the project CucumberTest.∙ Locate pom.xml f il e.∙ R i ght-c li ck and se l ect the opt i on, open w i th “Text Ed i tor”.Step(3): Add dependency for se l en i um: Th i s w ill i nd i cate Maven wh i ch Se l en i um jar f il es are to be down l oaded from the centra l repos i tory to the l oca l repos i tory.∙ Open pom.xml i s i n the ed i t mode, create dependenc i es tag (<dependenc i es></dependenc i es>), i ns i de the project tag.∙ Ins i de the dependenc i es tag, create dependency tag(<dependency></dependency>).7Cucumber ∙ Prov i de the fo ll ow i ng i nformat i on w i th i n the dependency tag.<dependency><groupId>org.seleniumhq.selenium</groupId><artifactId>selenium-java</artifactId><version>2.47.1</version></dependency>Step(4): Add dependency for Cucumber-Java: Th i s w ill i nd i cate Maven, wh i ch Cucumber f il es are to be down l oaded from the centra l repos i tory to the l oca l repos i tory.∙ Create one more dependency tag.∙ Prov i de the fo ll ow i ng i nformat i on w i th i n the dependency tag<dependency><groupId>info.cukes</groupId><artifactId>cucumber-java</artifactId><version>1.0.2</version><scope>test</scope></dependency>Step(5): Add dependency for Cucumber-JUn i t: Th i s w ill i nd i cate Maven, wh i ch Cucumber JUn i t f il es are to be down l oaded from the centra l repos i tory to the l oca l repos i tory.∙ Create one more dependency tag.∙ Prov i de the fo ll ow i ng i nformat i on w i th i n the dependency tag<dependency><groupId>info.cukes</groupId><artifactId>cucumber-junit</artifactId><version>1.0.2</version><scope>test</scope></dependency>8Cucumber Step(6): Add dependency for JUn i t: Th i s w ill i nd i cate Maven, wh i ch JUn i t f il es are to be down l oaded from the centra l repos i tory to the l oca l repos i tory.∙ Create one more dependency tag.∙ Prov i de the fo ll ow i ng i nformat i on w i th i n the dependency tag.<dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>4.10</version><scope>test</scope></dependency>Step(7): Ver i fy b i nar i es.∙ Once pom.xml i s ed i ted successfu ll y, save i t.∙ Go to Project -> C l ean: It w ill take a few m i nutes.You w ill be ab l e to see a Maven repos i tory li ke shown i n the fo ll ow i ng screenshot.9Cucumber∙ Create a feature f il e (to be covered l ater).∙ Create a step def i n i t i on f il e (to be covered l ater).∙ Create a JUn i t runner to run the test (to be covered l ater).10So far, we have got an understand i ng of Cucumber and what i t does. It executes the test scr i pts, wh i ch have been def i ned i n the feature f il e(to be covered i n subsequent chapters). The l anguage, i n wh i ch th i s executab l e feature f il es i s wr i tten, i s known as Gherkin. Gherk i n i s a p l a i n Eng li sh text l anguage, wh i ch he l ps the too l - Cucumber to i nterpret and execute the test scr i pts.One may th i nk that, i t has been d i scussed many t i mes that Cucumber supports s i mp l e Eng li sh text then why we need a separate l anguage - Gherk i ns. The answer li es i n the concept of the Behav i or Dr i ven Deve l opment.As d i scussed ear li er, we had seen that BDD i ncorporates d i fferent prospect i ves wh il e creat i ng test scr i pts. It can be deve l opment prospect i ve, bus i ness prospect i ve, etc. That sa i d, we w ill need peop l e from d i fferent commun i ty li ke deve l opers, project managers, product owners, and testers wh il e deve l op i ng test scr i pts. As these peop l e do not be l ong to the same category, there i s a r i sk of not us i ng the common l anguage for test scr i pt conceptua li z i ng. Th i s was the evo l ut i on po i nt for Gherk i ns.Gherk i n prov i des the common set of keywords i n Eng li sh text, wh i ch can be used by peop l e amongst the d i fferent commun i ty and yet get the same output i n the form of testscr i pts. ExampleFeature: Log i n funct i ona li ty for a soc i a l network i ng s i te. G i ven I am a soc i a l network i ng s i te user. When I enter username as username1. And I enter password as password1. Then I shou l d be red i rected to the home page of the s i te.The above-ment i oned scenar i o i s of a feature ca ll ed user l og i n. A ll the words h i gh li ghted i n bo l d are Gherk i n keywords.Examp l e of few other keywords:∙ Background∙ But∙ *∙ Scenar i o Out li ne∙ Examp l esGherk i n w ill parse each step wr i tten i n step def i n i t i on f il e (to be covered l ater). So the steps ment i oned i n the feature f il e and the step def i n i t i on f il e (to be covered l ater)shou l d match.11Cucumber You can l ocate the Gherk i n jars i n the Maven Dependency fo l der i n the Package Exp l orer. It gets down l oaded a l ong w i th the other Cucumber jars. It w ill l ook li ke the fo ll ow i ng screenshot:Another i nterest i ng fact about Gherk i n i s, i t supports not on l y Eng li sh but many other nat i ve l anguages such as French, F i nn i sh, Indones i an, Hungar i an, H i nd i, Urdu, Gujarat i, etc.12A Feature can be def i ned as a standa l one un i t or funct i ona li ty of a project. L et’s take a very common examp l e of a soc i a l network i ng s i te. How does the feature of th i s product/project l ook li ke? Few bas i c features can be determ i ned as:∙ Create and remove the user from the soc i a l network i ng s i te.∙ User l og i n funct i ona li ty for the soc i a l network i ng s i te.∙ Shar i ng photos or v i deos on the soc i a l network i ng s i te.∙ Send i ng a fr i end request.∙ Logout.By now, i t i s c l ear that, each i ndependent funct i ona li ty of the product under test can be termed as a feature when we ta l k about Cucumber. It i s a best pract i ce l ater when you start test i ng, that before der i v i ng the test scr i pts, we shou l d determ i ne the features to be tested.A feature usua ll y conta i ns a li st of scenar i os to be tested for that feature. A f il e i n wh i ch we store features, descr i pt i on about the features and scenar i os to be tested i s known as Feature File. We w ill see more about feature f il es i n the fo ll ow i ng chapter.The keyword to represent a feature under test i n Gherk i ns i s “Fea ture”. The suggested best pract i ce i s, to wr i te a sma ll descr i pt i on of the feature beneath the feature t i t l e i n the feature f il e. Th i s w ill fu l f ill the need of a good documentat i on as we ll.ExampleFeature: Log i n funct i ona li ty for a soc i a l network i ng s i te.The user shou l d be ab l e to l og i n i nto the soc i a l network i ng s i te i f the username and the password are correct.The user shou l d be shown the error message i f the username and the password arei ncorrect.The user shou l d be nav i gated to home page, i f the username and password are correct. Feature FilesThe f il e, i n wh i ch Cucumber tests are wr i tten, i s known as feature file s. It i s adv i sab l e that there shou l d be a separate feature f il e, for each feature under test. The extens i on of the feature f il e needs to be “.featur e”.One can create as many feature f il es as needed. To have an organ i zed structure, each feature shou l d have one feature f il e.13For Examp l e:Sr.No. Feature Feature File name1 User Log i n userLog i n.feature2 Share the Post sharePost.feature3 Create Account createAccount.feature4 De l ete Account de l eteAccount.featureThe nam i ng convent i on to be used for feature name, feature f il e name depends on the i nd i v i dua l’s cho i ce. There i s no ground ru l e i n Cucumber about names.A s i mp l e feature f il e cons i sts of the fo ll ow i ng keywords/parts:∙ Feature: Name of the feature under test.∙ Description (opt i ona l): Descr i be about feature under test.∙ Scenario: What i s the test scenar i o.∙ Given: Prerequ i s i te before the test steps get executed.∙ When: Spec i f i c cond i t i on wh i ch shou l d match i n order to execute the next step.∙ Then: What shou l d happen i f the cond i t i on ment i oned i n WHEN i s sat i sf i ed. ExampleFeature: User l og i n on soc i a l network i ng s i te.The user shou l d be ab l e to l og i n i nto the soc i a l network i ng s i te when the username and the password are correct.The user shou l d be shown an error message when the username and the password are i ncorrect.The user shou l d be nav i gated to the home page i f the username and the password are correct.Outline: Log i n funct i ona li ty for a soc i a l network i ng s i te.The g i ven user nav i gates to Facebook. When I enter Username as "<username>" and Password as "<password>". Then, l og i n shou l d be unsuccessfu l.|username |password ||username1 |password1 |* AND keyword i s used to show conjunct i on between two cond i t i ons. AND can be used w i th any other keywords li ke GIVEN, WHEN and THEN.There are no l og i c deta il s wr i tten i n the feature f il e.14Steps DefinitionsWe have got our feature f il e ready w i th the test scenar i os def i ned. However, th i s i s not the comp l ete job done. Cucumber do esn’t rea ll y know wh i ch p i ece of code i s to be executed for any spec i f i c scenar i o out li ned i n a feature f il e.Th i s ca ll s the need of an i ntermed i ate – Step Def i n i t i on f il e. Steps def i n i t i on f il e stores the mapp i ng between each step of the scenar i o def i ned i n the feature f il e w i th a code of funct i on to be executed.So, now when Cucumber executes a step of the scenar i o ment i oned i n the feature f il e, i t scans the step def i n i t i on f il e and f i gures out wh i ch funct i on i s to be ca ll ed.Example of Step Definition Filepublic void goToFacebook(){ driver = newFirefoxDriver();driver.navigate().to("https:///");}@When "^user logs in using Username as \"([^\"]*)\" and Password as\"([^\"]*)\"$"public void I_enter_Username_as_and_Password_as(String arg1, String arg2){ driver.findElement(By.id("email")).sendKeys(arg1);driver.findElement(By.id("pass")).sendKeys(arg2);driver.findElement(By.id("u_0_v")).click();}@Then"^login should be unsuccessful$"public void validateRelogin() {if(driver.getCurrentUrl().equalsIgnoreCase("https:///login.php? login_attempt=1&lwv=110")){System.out.println("TestPass"); }else {System.out.println("TestFailed"); }driver.close();}So w i th each funct i on, whatever code you want to execute w i th each test step (i.e. GIVEN/THEN/WHEN), you can wr i te i t w i th i n Step Def i n i t i on f il e. Make sure that code/funct i on has been def i ned for each of the steps.Th i s funct i on can be Java funct i ons, where we can use both Java and Se l en i um commandsi n order to automate our test steps.15Scenario i s one of the core Gherk i n structures. Every scenar i o starts w i th the keyword “Sc enar i o:” (or l oca li zed one) and i s fo ll owed by an opt i ona l scenar i o t i t l e. Each feature can have one or more scenar i os and every scenar i o cons i sts of one or more steps. A very s i mp l e examp l e of scenar i o can be:Scenario: Ver i fy He l p Funct i ona li ty.G i ven user nav i gates to Facebook.When the user c li cks on He l p, then the He l p page opens.Cons i der a case, where we need to execute a test scenar i o more than once. Suppose, we need to make sure that the l og i n funct i ona li ty i s work i ng for a ll types of subscr i pt i on ho l ders. That requ i res execut i on of l og i n funct i ona li ty scenar i o mu l t i p l e t i mes. Copy paste the same steps i n order to just re-execute the code, does not seem to be a smart i dea. For th i s, Gherk i n prov i des one more structure, wh i ch i s scenar i o out li ne.Scenar i o out li ne i s s i m il ar to scenar i o structure; the on l y d i fference i s the prov i s i on of mu l t i p l e i nputs. As you can see i n the fo ll ow i ng examp l e, the test case rema i ns the same and non-repeatab l e. At the bottom we have prov i ded mu l t i p l e i nput va l ues for the var i ab l es “Userna me”and “Pa ssword”.Wh il e runn i ng the actua l test, Cucumber w ill rep l ace the var i ab l e w i th i nput va l ues prov i ded and i t w ill execute the test. Once pass-1 has been executed, the test w ill rerun for second i terat i on w i th another i nput va l ue. Such var i ab l e or p l aceho l ders can be represented w i th ”<>” wh il e ment i on i ng w i th gherk i n statements.ExampleScenario Outline: Log i n funct i ona li ty for a soc i a l network i ng s i te.The g i ven user nav i gates to Facebook.When the user l ogs i n us i ng the Username as "<username>" and the Password as"<password>", then l og i n shou l d be successfu l.|username |user1|user2 |password | |password1 | |password2 |There are a few t i ps and tr i cks to smart l y def i ne the Cucumber scenar i os.∙ Each step shou l d be c l ear l y def i ned, so that i t does not create any confus i on for the reader.∙ Do not repeat the test scenar i o, i f needed use scenar i o out li ne to i mp l ement repet i t i on.16∙ Deve l op a test step i n a way that, i t can be used w i th i n mu l t i p l e scenar i os and scenar i o out li nes.∙ As far as poss i b l e, keep each step comp l ete l y i ndependent. For examp l e: “G i ven the user i s l ogged i n”. T h i s can be d i v i ded i nto two steps:o G i ven the user enters the user name.o C li cks on l og i n.17End of ebook previewIf you liked what you saw…Buy it from our store @ https://18。
Package‘uniqtag’October12,2022Type PackageTitle Abbreviate Strings to Short,Unique IdentifiersVersion1.0.1Description For each string in a set of strings,determine a unique tag that is a sub-string offixed size k unique to that string,if it has one.If no such unique substring ex-ists,the least frequent substring is used.If multiple unique substrings exist,the lexicographi-cally smallest substring is used.This lexicographically smallest sub-string of size k is called the``UniqTag''of that string.License MIT+file LICENSEEncoding UTF-8RoxygenNote7.1.2URL https:///sjackman/uniqtagBugReports https:///sjackman/uniqtag/issuesSuggests testthatNeedsCompilation noAuthor Shaun Jackman[aut,cph,cre]Maintainer Shaun Jackman<******************>Repository CRANDate/Publication2022-06-1006:10:02UTCR topics documented:uniqtag-package (2)cumcount (2)kmers_of (3)make_unique (3)uniqtag (4)Index612cumcount uniqtag-package Abbreviate strings to short,unique identifiers.DescriptionFor each string in a set of strings,determine a unique tag that is a substring offixed size k unique to that string,if it has one.If no such unique substring exists,the least frequent substring is used.If multiple unique substrings exist,the lexicographically smallest substring is used.This lexicograph-ically smallest substring of size k is called the"UniqTag"of that string.Author(s)Shaun Jackman<******************>cumcount Cumulative count of strings.DescriptionReturn an integer vector counting the number of occurrences of each string up to that position in the vector.Usagecumcount(xs)Argumentsxs a character vectorValuean integer vector of the cumulative string countsExamplescumcount(abbreviate(,3,strict=TRUE))kmers_of3 kmers_of Return the k-mers of a string.DescriptionReturn the k-mers(substrings of size k)of the string x,or return the string x itself if it is shorter than k.Usagekmers_of(x,k)vkmers_of(xs,k)Argumentsx a character stringk the size of the substrings,an integerxs a character vectorValuekmers_of:a character vector of the k-mers of xvkmers_of:a list of character vectors of the k-mers of xsFunctions•kmers_of:Return the k-mers of the string x.•vkmers_of:Return the k-mers of the strings xs.make_unique Make character strings unique.DescriptionAppend sequence numbers to duplicate elements to make all elements of a character vector unique. Usagemake_unique(xs,sep="-")make_unique_duplicates(xs,sep="-")make_unique_all(xs,sep="-")make_unique_all_or_none(xs,sep="-")Argumentsxs a character vectorsep a character string used to separate a duplicate string from its sequence numberFunctions•make_unique:Append a sequence number to duplicated elements,including thefirst occur-rence.•make_unique_duplicates:Append a sequence number to duplicated elements,except the first occurrence.This function behaves similarly to make.unique•make_unique_all:Append a sequence number to every element.•make_unique_all_or_none:Append a sequence number to every element or no elements.Return xs unchanged if the elements of the character vector xs are already unique.Otherwise append a sequence number to every element.See Alsomake.uniqueExamplesabcb<-c("a","b","c","b")make_unique(abcb)make_unique_duplicates(abcb)make_unique_all(abcb)make_unique_all_or_none(abcb)make_unique_all_or_none(c("a","b","c"))x<-make_unique(abbreviate(,3,strict=TRUE))x[grep("-",x)]uniqtag Abbreviate strings to short,unique identifiers.DescriptionAbbreviate strings to unique substrings of k characters.Usageuniqtag(xs,k=9,uniq=make_unique_all_or_none,sep="-")Argumentsxs a character vectork the size of the identifier,an integeruniq a function to make the abbreviations unique,such as make_unique,make_unique_duplicates, make_unique_all_or_none,make_unique_all,make.unique,or to disable thisfunction,identity or NULLsep a character string used to separate a duplicate string from its sequence numberDetailsFor each string in a set of strings,determine a unique tag that is a substring offixed size k uniqueto that string,if it has one.If no such unique substring exists,the least frequent substring is used.Ifmultiple unique substrings exist,the lexicographically smallest substring is used.This lexicograph-ically smallest substring of size k is called the UniqTag of that string.The lexicographically smallest substring depend on the locale’s sort order.You may wish tofirstcall Sys.setlocale("LC_COLLATE","C")Valuea character vector of the UniqTags of the strings xSee Alsoabbreviate,locales,make.uniqueExamplesSys.setlocale("LC_COLLATE","C")states<-sub("","",)uniqtags<-uniqtag(states)uniqtags4<-uniqtag(states,k=4)uniqtags3<-uniqtag(states,k=3)uniqtags3x<-uniqtag(states,k=3,uniq=make_unique)table(nchar(states))table(nchar(uniqtags))table(nchar(uniqtags4))table(nchar(uniqtags3))table(nchar(uniqtags3x))uniqtags3[grep("-",uniqtags3x)]Indexcumcount,2kmers_of,3make_unique,3make_unique_all(make_unique),3make_unique_all_or_none(make_unique),3 make_unique_duplicates(make_unique),3 uniqtag,4uniqtag-package,2vkmers_of(kmers_of),36。