1

所以,我不得不更改行的名称来计算 Anova。现在我想恢复以前的行名。有什么办法吗?数据:

head(tbl_reo)
    id          Sequence         variable      value        pv
    75   AAAAGAAAVANQGKK BiotinControl1   3893050.50   0.8523174
   192   AAAAGAAAVANQGKK BiotinControl2    900604.61   0.8523174
  3770     AAFTKLDQVWGSE BiotinControl3     90008.14   0.8523174
   934 AAIKFIKFINPKINDGE BiotinTreatment1  656399.20   0.8523174
  1012 AAIKFIKFINPKINDGE BiotinTreatment2  359937.85   0.8523174
  1970 AAIKFIKFINPKINDGE BiotinTreatment3  447089.35   0.8523174

代码:

levels(tbl_reo$variable) <- c("Control","Control","Control","Treat","Treat","Treat")

新数据:

  head(tbl_reo)
    id          Sequence         variable      value        pv
    75   AAAAGAAAVANQGKK         Control   893050.50   0.8523174
   192   AAAAGAAAVANQGKK         Control   900604.61   0.8523174
  3770     AAFTKLDQVWGSE         Control    90008.14   0.8523174
   934 AAIKFIKFINPKINDGE           Treat   656399.20   0.8523174
  1012 AAIKFIKFINPKINDGE           Treat   359937.85   0.8523174
  1970 AAIKFIKFINPKINDGE           Treat   447089.35   0.8523174

不知道是否有必要在这样的大数据上使用 dput,但是你去吧。

    > dput(head(tbl_reo,4))
structure(list(id = c(75L, 192L, 3770L, 934L), Sequence = structure(c(1L, 
1L, 3L, 5L), .Label = c("AAAAGAAAVANQGKK", "AAANILFSDHAD", "AAFTKLDQVWGSE", 
"AAIELRE", "AAIKFIKFINPKINDGE", "AAIYKLLKSHFRNE", "AAKKFEE", 
"AAKYFRE", "AANVKKTLVE", "AARAGELLKE", "AARDSKSPIILQTSNGGAAYFAGKGISNE", 
"AAVKARVASIDE", "AAVKASAPGSVILLE", "AEKLKAE", "AEQVKKE", "AFAKRQGKE", 
"AFGSGTAAVVSPIKE", "AGIPAGVVNILPGSGRVVGE", "AGISKDGQTRE", "AGSHGKDAWGVFRVHAFE", 
"AHSFSSSLASAE", "AIDALNGMLLNGQE", "AITYSWTLLTE", "AKAKKAAKKAANAKQQQE", 
"AKALVAQGVKFIAE", "AKAQGVAVQLKRQPAQPRE", "AKIGKKVE", "AKKVVKKAFEE", 
"AKNKKYALDIIKE", "ALANAGVTDIVLAVNYRPE", "ALDFFARGLVKSPIKVVGLSTLPE", 
"ALFHPSVLGLE", "ALKIWKRFRE", "ALKPDSQKSYAE", "ALLLKVNQIGTLSE", 
"ALRIGSE", "ALRLVE", "AMRIGSE", "ANIIKLVE", "ANNKWNKLFSE", "ANVTGLRDAMFKGE", 
"AQKVRDQITSLKE", "AQRVQAKNQLE", "ARINFGIEKAKE", "ASAGIQLSPKFVKLVSWYDNE", 
"ASFVLPTWAAKE", "ASKLAAYNKKSTISARE", "ATSSIVMFSLNE", "ATTNAPWYKGWEKE", 
"ATVGAGLPIISFLRE", "AVDATHLAE", "AVIRLSKE", "AVSKVYARSVYDSRGNPTVE", 
"AVVTVPAYFNDSQRQATKD", "AVWYGPPKAANLGGVAVSGLE", "AWFPYQKE", "AYSPFGSANAPLLKE", 
"DGWVPGKNLFTVE", "DHSFINYKQNVE", "DILYKIYKGVSE", "DLYQTFARTVE", 
"DNVKAHPRIE", "DQVRNYVMQYIQE", "DSVYLAKLAE", "DVHNLFTYAKE", "DVKISAGTLLKGTE", 
"DVQKFRHE", "EAVAKAAE", "EKPLFLVFHGGSGSTVQE", "EQRPGTPLFTVKAYLPVNE", 
"ERIAALE", "FAKSLPRLDGLSVQE", "FALKHFPDYE", "FAPYGTITSAKVMRTE", 
"FASLFPLKQAPAFLGPKGLKLTE", "FEQKNAGGVGE", "FFIDRPE", "FFIRDTKNLE", 
"FGINTTVQE", "FGNRPMILHQIE", "FGVTKARWPAKSVKFVQGLLQNAAANAE", 
"FIFSKYQILE", "FKMAKPE", "FKSMIKNNE", "FKTKYNSDPYQLE", "FLAADKE", 
"FLKKILVDNKLE", "FLLSYGKE", "FMIAPTGAKTFAE", "FMISQLGLQKKNIKIHGF", 
"FNRGLALE", "FNSQPDYRE", "FQKDAKRFE", "FQKTGPFE", "FRNGMINVSPIGRNASTEE", 
"FRTASAQLE", "FSGSLLRSKFNTSNE", "FSRWFNHIASKADE", "FSTNVKDE", 
"FTADGKVKPE", "FTPETPSPLIGILE", "FVADGLLQGFGNE", "FVAYPIQLLVTKE", 
"FVAYPIQLVVTKE", "FVDIINSRN", "FVSSKHGSVSAE", "FYKSLKLPYRIVGIVSGE", 
"GAAPGGFPGGAPPAPE", "GAIWNINSFDQWGVE", "GARYGPSLMPGGSEE", "GEKTMGAKITKSLE", 
"GGLGPINIPLLADTNHSLSRD", "GGTLIGTARSME", "GGVAPNIQTAEE", "GGVIIITHSAE", 
"GIFSGTLSYIFNE", "GIKVPIHIVQE", "GILQRWTKGFDIPNIE", "GILQRWTKGFDIPNVE", 
"GILVASPFVELE", "GIPAGWQGLDNGPE", "GIPPDQQRLIFAGKQLE", "GISKKTRIAGVVYHPSNNE", 
"GKKIATYQE", "GKLKGVLGYTE", "GLDKIFQE", "GLGWGNNASAAIQRVGLGE", 
"GLNHLPVQKQIVE", "GMMANGIAAGGQLTTTTE", "GMRWAGNANE", "GNDIHALAAKLLQE", 
"GQALKKKKGKSAE", "GRGINSSYAVWNDVTGKAHE", "GRHSGYGKRKGTRE", "GSDVLNTWKKE", 
"GSRKVDGQKVKASKE", "GTAVSQADVTVFKAFQSAYPE", "GTERSAYYTWAAE", 
"GTRAVTKYSSSTQA", "GVVLGVEKRATSPLLE", "GWGTPHIKPYGNLSLDPSACVFHYAFE", 
"GYSGVEVRVTPTKTE", "GYVGRTQPKKGGEGE", "GYWNGKITVDE", "HDHAGVPLKISPPVVAYRE", 
"HIIQAKADAQRE", "HIVPGTYIQE", "HKFAIPAINVTSSSTAVAALE", "HKVVNGNSADAAYAQVE", 
"HLQPHFTTNDGLE", "HNLRVISE", "HQIRAKFVE", "HQKYTREQVGCKE", "IAKLNIPTGIPLVFE", 
"IAQHIFTKLNSNGYLEE", "IDASKPVKLTLLISE", "IDPINALQAAME", "IDVAWLKANAKE", 
"IEAISSPLMGIFE", "IFDANVQRLKE", "IFFKIKKTTPLRRLME", "IFGGYLYFAQAPSAAE", 
"IFGGYLYFAQAPSAAEFHTE", "IFGPVVTVAKFKTLEE", "IFGPVVTVTKFKSADE", 
"IFLHSLPVKE", "IFSTYADNQPGVLIQVFE", "IGATTSVFPFNKSMIEYLE", "IGNSGMFRPEMLE", 
"IGSLTRQGAKGGLLE", "IHPLLPQDE", "IIAGNVATRE", "IIGGTTRIPTLKQSISE", 
"IIKKNFDLRPGVLVKE", "IISNAKGQVVGSIIALDRQE", "IKGFFSFATQKLDE", 
"IKHLPFNVVNKDGKPAVE", "IKKVVKAAAE", "IKLFNKWSFEE", "IKLVKLIQE", 
"ILIVTKDGVRKE", "ILKIVPGRVSTE", "ILKKLDE", "ILLARNLI", "ILNKLALRILKNE", 
"ILNSQAPEE", "ILSKLASAGATE", "ILWRQKE", "IMLPVFDAPQNLVE", "IMLQLGIPREE", 
"IMLWNLAAKKAMYTLSAQDE", "INLPFITADASGPKHINMKFSRAQFE", "INLWFKKEE", 
"IQLNGGSISE", "IQPRANIQLDFPE", "IRVFQGE", "ISAMVLTKMKE", "ISDTMWPGQAMTLKVE", 
"ISDVFAKWNNGVLD", "ISLAAFGRKE", "ISTMIRWGLKPYLFVLNNDGYTIE", "ITDIKQFLE", 
"ITHPTIVDGWFRE", "ITLGKYLFE", "ITQLMSLIINTVYSNKE", "ITVDAPKAHE", 
"ITYLNNRAAAEYE", "IVERLNTASIPE", "IVFASPPRKSDGKVSPE", "IVFNMSREE", 
"IVNLTLPDGTVRQGQVLE", "IVPKLME", "IVRVNKNAPAVE", "IVSRFKTE", 
"IYEKME", "IYFSLNNGVRIPALGLGTANPHEKLAE", "IYNHIQLRE", "IYNHIQLREE", 
"IYPYGSRGPKGLKE", "KAAKVTKAAQKAAKK", "KAALQTYLPKIKE", "KAEQVFQNVKNILAE", 
"KAITYSHAAKE", "KAKIGQKE", "KAKKANNPQHSITKDE", "KALTYTPPKKQKAEKPKAE", 
"KAQRAPLEE", "KAVAYWKTLKTDE", "KDFATFAKE", "KDYASVVPPRHNE", "KEKLTQQKKE", 
"KFAAGTKALLDE", "KFINSEIE", "KFNAVPIFLSDE", "KFSERLLNE", "KGAQTYVKKVIGSFKDWE", 
"KGCDIIVKNHE", "KGLLSATQFTQPALTLME", "KGLSKKGGNIPMIPGWVMDFPTGKE", 
"KGQIVGRYVVDTSK", "KGTGKSNKITITNDKGRLSKE", "KGVFRSIVPSGASTGVHE", 
"KGVFRSIVPSGASTGVHEALE", "KGVITTQAE", "KGWVPVTKLGRLVKAGKITTIEE", 
"KIFTVPTETLQAVTKHFISE", "KIGDLNFLIGPKLYE", "KKAADALLLKVNQIGTLSE", 
"KKAGKTLDVVE", "KKAPAAAPAASKKKEE", "KKIDLASIRE", "KKPKTKKVKEE", 
"KKQAIRSKQE", "KKTISLKTPLKTLVILHSDE", "KKVYPDVLYTSKLSRAIQTANIALE", 
"KKYIATIGVE", "KLAAQRKAE", "KLIHGPKAQYNE", "KLIHNDSSYNHE", "KLKAAYSYMFDSLRE", 
"KLKAERE", "KLKKVLSANTNAPFSVE", "KLSGIANNRDE", "KLVAVLK", "KLYVGRAQKKNE", 
"KMIKPKEGRIE", "KMSSGYYLGE", "KMSTRAAPFEQRLPE", "KNLFTGWVDVKLSAKGQQE", 
"KNLKPLAIIKGWGE", "KNMDAATALVGSGPAFVLLMLE", "KNVPLYQHLAD", "KQLYSFDLE", 
"KQNLLAVE", "KRVSGMFLGE", "KSPFLDALKAKNFE", "KTFVNVAKPFHKE", 
"KTKLQGMLNKAEE", "KTMGAKITKSLE", "KTQAFKKHVDE", "KTVRKHLERQGWIE", 
"KVFNAYPAARE", "KVGLRLSPYGVFNSMSGGAE", "KVILKMKE", "KVIRFQEE", 
"KVSVLKALGAE", "KYFPGLLRATNE", "KYSLAPVAKE", "LAKKQKKLE", "LDALIAQGRE", 
"LDASNKAAKE", "LDLARPIYLPTASYGHFTNQE", "LDTAQKHID", "LDTIRNME", 
"LEARIPE", "LFAKFGPIVSASLE", "LFAKHGE", "LFDTHRVIVNE", "LFLKQLVVGGLDRVYE", 
"LFRSIGGE", "LGAVALKGALAKVPE", "LGAVNLHE", "LGDKAVYAGE", "LGDNAVFAGE", 
"LGGEKKQKGQALQF", "LGGKSPNIVFADAE", "LGGTVVSLSDSKGCIISE", "LGILPRDILTKE", 
"LGIYSHE", "LGKGSFKYAWVLD", "LGKVLAKVIGKE", "LGMLAGADRVE", "LGTPFGVTIDFE", 
"LHGNAKKAAEE", "LICSYRSKIETE", "LIGGSADLTPSNLTRWKE", "LIHQNEVPLVLLSSGVGVTPLLAMLE", 
"LIHSKVGGE", "LIKLTGKLIE", "LILNGGFSPLTGFLNE", "LINNLGTIAKSGTKAFME", 
"LKADLRPLQIKSIRE", "LKAHNINVVDK", "LKAQSKPHVGDE", "LKHLVGPEKAAE", 
"LKIQRPLHE", "LKKKGILFVGSGVSGGEE", "LKKQKTAE", "LKKQQKEAE", "LKKSANVGKKKE", 
"LKPTVILKLLKE", "LKRAIDLNKE", "LKRIMINCFNE", "LKRIPE", "LKTNGKFQVDKSIIE", 
"LKYFGKALE", "LLAAFKAYLE", "LLAVPVVKGRKTEKE", "LLAYQFASPVRWIE", 
"LLESPNNKVVPATNQIE", "LLKTNRISNE", "LLKTNRISNEQYE", "LLLLDVAPLSLGIE", 
"LLLQQRATE", "LLRLVLLE", "LMAKLANDSPLAIE", "LNAATGSKTSLYDKKE", 
"LNAAYAADGYARIKGMSCIITTFGVGE", "LNKGLTKKGGNIPMIPGWVMEFPTGKE", 
"LNNAAAKKYDLE", "LNQLLKLVSE", "LPAWSKLQKIYE", "LPGVAFLSEKK", 
"LPKNSTSSKDKKKKN", "LQAQLDYLNAE", "LQDIANPIMSKLYQAGGAPGGAAGGAPGGFPGGAPPAPE", 
"LQGKLTGMAFRVPTVD", "LQGKLTGMAFRVPTVDVSVVD", "LRPLQFKSIRE", "LRQATGGQAFPQMVFD", 
"LSALNGIAGSYAE", "LSFALIHKE", "LSFPFEWAFAGTNE", "LSGIPPAPRGVPQIE", 
"LSKISGVDSSLIFPALE", "LSKSKTSPYVLPVPFLNVLNGGSHAGGALALQE", "LSLLFNVIPDRYTKYD", 
"LSNVINMFFE", "LSQGTWLNKPKSVFQE", "LSRIGEFE", "LTQFPAFVTPMGKGSIDE", 
"LTQLKKE", "LTSLTDYVTRMPE", "LTVKLNKE", "LVARVQGGEE", "LVFGQTFTDHMLTIPWSAKE", 
"LVGRINGQFGTVE", "LVILGDSNVVRE", "LVKVGHDNLVGE", "LVRDNKLIGNFTLAGIPPAPKGVPQIE", 
"LVRFSYGQDLE", "LVSLPNIILTPHIGGSTEE", "LVTAPLDGTILE", "LYGNIVMSGGTTMFPGIAE", 
"LYGTAIGARSQGAKTYLE", "LYPGRPLAIALD", "LYPGRPLAIALDTKGPE", "LYSTSSSSTSSSATKN", 
"MATLYDGLE", "MAVAIKKE", "MAVKFGKNAF", "MFFVSKVMNNE", "MFNDFLNAGAE", 
"MGQKKAPDGRIVE", "MIGSVVGIYNGKAFNQVE", "MIGSVVGIYNGKAFNQVEIRPE", 
"MIISSPSDGQVKE", "MIVLHLPSPVTAQAYRAE", "MKPTSIEKE", "MLAQDKLVAE", 
"MLGHYLGE", "MLGNWSFGDYFKKE", "MLNRISPKILDE", "MLRAAGKE", "MNNIIAASRRH", 
"MPPQIPNE", "MQTAAQSSSIE", "MQTEIKE", "NAHLKKNFKPQGSIE", "NALKLAKWLE", 
"NAVDRLLVE", "NFAPFLKTILPE", "NFIQSIME", "NGFINNPIVISPTTTVGE", 
"NGHSPSEAFNE", "NGITFPKDAPSPFIFKTLE", "NGIVTYAAKE", "NGLLSFVQYVIAPIQE", 
"NGLTAYRLGKE", "NGSFLLYIDRHLVHE", "NGTVTAANASPINDGAAAVILVSE", 
"NGVAKGSFKD", "NISNNYMIGAINAE", "NKERILTE", "NKIIRMPLVE", "NKIVRKPLME", 
"NKKVIITGAPAAFSPTCTVSHIPGYINYLDE", "NKVQYIAGARPWTHVQKVDIALPCATQNE", 
"NKVSPADAAKKAL", "NLHILE", "NLKDTSSGGVTHANE", "NLKKGSTVTSNGLNWE", 
"NLKPSKPSYYLDPE", "NLLPLQSGIGNIANAVIE", "NLTVNPNVNE", "NMKLKLIEPLRE", 
"NNIFNMVVE", "NNIFNMVVEIPRWTNAKLE", "NNMLHGNTMTVTGDTLAE", "NNYKKRLLGTAFKSSPFGGSSHAKGIVLE", 
"NQGLKTATYPYWANE", "NQQGVNNFDE", "NRGIKVANPVWSTIPFISE", "NRKISAVSTYFE", 
"NRNVGKTLVNKSTGLKNASDALKGRVVE", "NRNVGKTLVNKSTGLKSASDALKGRVVE", 
"NRVKSDMLKE", "NSLLSSGTSQDSLRE", "NTQLMNRDNIE", "NTSLSPKFVYQGE", 
"NVKTDSRNMPVKE", "NVQLYNGFVFHTGSLEE", "NVQNGEVRFE", "NVRDKGNSALLE", 
"NVSSNIVKNAE", "NYNLLDTSGVAKVIE", "NYTVERVNE", "PKLVLVRHGQSE", 
"PKLVLVRHGQSEWNE", "QAKLTAATNAKQ", "QAVGGIYSVLNKKRGQVVSE", "QDKKKKSNH", 
"QDPSKSKVVVFE", "QDVPLIVPVVNPE", "QGAQVLFASTDSE", "QGKPYISLPKGKGIKLSIAEE", 
"QGLKIDGPGFE", "QHPRYGGVYVGTLSKPE", "QHPRYGGVYVGTLSKPEVKE", "QISSMVLGKMKE", 
"QIVYALKLPGIIHIDAAE", "QLADYLIGVQY", "QLASQLVDLKKE", "QLGIHYE", 
"QLYKNDSNNNNNNNGNNAE", "QQGKNATVSVEE", "QRPGTPLFTVKAYLPVNE", 
"QRTKVEHVRE", "QSPRPGQQAFE", "QSPYVSWVSYPGLASHSHHE", "QSTKFGTEIITE", 
"QTYKKPTGGIVTVRSE", "QVADISSAKVNFKSLE", "QVAKWVNLAQKE", "RAVPHGKWQDE", 
"RDLIKKKTKNNE", "RFLNVFPKLVEE", "RGEIKKGE", "RGLPVKLTYTDNKTSKE", 
"RHIQVGDGLE", "RLAIVGVE", "RLLWYLARE", "RLNTASIPE", "RLNTASIPENVE", 
"RLTSLNVVAGSDLRRTSIIGTIGPKTNNPE", "RLVAIAEQD", "RMHVLKKQYE", 
"RNAAYQKE", "RNAAYQKEYE", "RNKIHQYLFQE", "RQLNAVLE", "RQLNAVLEE", 
"RTSLFLNLANDPTIE", "RTVLFPIKYHE", "RVKANAAKRAE", "RYKLVPGIFADVKNLKE", 
"RYKYVDPNVLPE", "RYVFLLDPMLATGGSAIMATE", "SALSYAALILADSE", "SCKMPQTVE", 
"SDKSKWLTGVE", "SEYWPRLTKE", "SFAANWGVMVSHRSGETE", "SFQAVYNKLTGKQIVFE", 
"SGSKLKFYVLHGDGVE", "SGTLGTKGNTQVIIPRLTE", "SGTVFDSSYSRGSPIAFE", 
"SHIGVAKKLE", "SHLIPSATTGE", "SIAVLSAMKME", "SIAYSLKNTISE", "SIQKTKE", 
"SIRVGEYNAE", "SISDSLSSKPHNFE", "SKFAKAYAQGVSKKE", "SKFKGDITWLPVRRKAYWE", 
"SKLPTYTAKDSAVATRKLSE", "SLDQAWSLLRIYPKE", "SLGSPSGATKARIVVAKSGEL", 
"SLIDAKTGLPKE", "SLKTGNAGPRPACGVIGLTN", "SLQNKGQEVKE", "SLRGLGGILLNPITGRRFVNE", 
"SLSSKLSVQD", "SNLKKITLE", "SNPTAKLNLIWPATPIHIKKYE", "SQGKTLSVKQE", 
"SQLTNLFNEE", "SQRIASKNQLE", "SRFQEIVKE", "SRKLFAATVAKAKTIVWNGPPGVFE", 
"SSANRKIVKE", "STKNGTETKRSLE", "STPDTPSPLIAVNE", "STVAGFLVGSE", 
"STVLQFKE", "SVKLTKAVAE", "SVLAHL", "SYQKSQKSQKE", "SYVDKHPVVTFNQE", 
"TAGLTVGDPVLRTGKPLSVE", "TAIGPSGQLKGYLRPE", "TAKGNYPINAVTTMAE", 
"TAQGQFLNFNKLLE", "TARSTATGPSEAVWYGPPKAANLGGVAVSGLE", "TDPFKLSGAQVVD", 
"TEPLGTAGPLKLAE", "TFKLFNKYRPE", "TFRTTNTL", "TGGPISVPVGRE", 
"TGIVAQYAYVLGELE", "TGVIKPGMVVTFAPAGVTTE", "THINLKVSDGSSE", "TIGNPKYNVPDFE", 
"TIQDKSSAGAVVVANAKSLE", "TKAGVVKGKTLLE", "TKKSCCSGK", "TKNFTPEQISSMVLGKMKE", 
"TKTFSPQE", "TKYLSGIAKRLNKE", "TLKKFGEE", "TLKQLNASLADKSYIE", 
"TLKVVDPE", "TLRKVVKHFIDE", "TMKAVVIE", "TMWDTKKE", "TNPGTDVTVSSVE", 
"TQALLLAPIAPHFAE", "TQKGVIFYE", "TRLSLTHMVE", "TSGSTVNDPLANYE", 
"TSNFIKKVGYNPKTVPFVPISGWNGDNMIE", "TSSKKPKHPLE", "TTAMITDIATAPAE", 
"TTHIKFASDPGCAFTKSIGFE", "TTTGVHHLYRMVKE", "TVAASAVAAVFE", "TVAKSKNAE", 
"TVFAGQKP", "TVLRQALGE", "TVQVNLPVSLE", "TVSKMAYLDKTGE", "VAAIMQDPVMQSILQQAQQNPAALQE", 
"VAALAAENK", "VAKVVGANPAAIKQAIAANA", "VANPIMSKLYQAGGAPE", "VARVILTQVGSGPQETNE", 
"VATRAKQGELLE", "VDASGFRIPQQE", "VDSVLKHMKE", "VEGMRWAGNANE", 
"VFIDFTKE", "VFKFFGFTPE", "VFKFFGFTPEGVAE", "VFLNEHPE", "VFVATKE", 
"VGAKGVQLLSSYITEE", "VGASMTRSIQTLE", "VGKSVAVDSSE", "VGLKRVVTKAMSSR", 
"VGTMNVFFVFLNKVTGKKE", "VGVHVLPKILDE", "VHFVSNIDGTHIAE", "VIAGNVVTRE", 
"VIDTILALVKD", "VKILNGFAFVE", "VKVVLFNHSQRD", "VLANYLTSALSE", 
"VLAVQKKLIAKSNLAGKPVICATQMLE", "VLGPFAFRIGSVKE", "VLIKRGVKPE", 
"VLLLDVTPLSLGIE", "VLLVAVGRRPYIAGLGAE", "VLNPQIIKDVLE", "VLPRAVGSLTFDE", 
"VLVLRGTLE", "VLVVRGSKKGQE", "VLYTSKLSRAIQTANIALE", "VMSIGRTFEE", 
"VMTKNPVTGIKGITLKE", "VQNSTLAQLTSKLIPE", "VQSAVLGFPRIGPNRE", 
"VRVTPTKTE", "VSAAYKNSLE", "VSDVAQKAE", "VSGLQYIDLLLIHSPLE", 
"VSNPNIIFFRGTYAAVSPE", "VSNPPAYGAKIVAKLLETPE", "VSNRSTPSVVGFGPKNRYLGE", 
"VSSMPTLIFYKGGKE", "VSVVDLTVKLNKE", "VTAALRVTD", "VTPLVQNVTGDKE", 
"VTRVVGANPAAIKQAIASNV", "VTSSFFYRGNYTDFE", "VVALNDPFITND", "VVKILRE", 
"VVLPVDFIIAD", "VVLTHPADE", "VVNIGIGGSDLGPVMVTE", "VVTSASAPPENASE", 
"VVVITKNVSGQDVAAALE", "VYHNLKSLTKKRYGASAGNVGDE", "VYKIGGIGTVPVGRVE", 
"WAGLGKIDRE", "WFDIKAPSTFE", "WFRIYKIPDGKPE", "WGKFLTCVEVE", 
"WLFKLREE", "WMWNQLGNFLQE", "WSKLISE", "WSLTAPLGKALHDLS", "WTKIFKAIHE", 
"YAQLLAKRLSE", "YAQLLAKRLSERKAE", "YFATHITE", "YFATHITERE", "YFQLLNSALTE", 
"YGYSARVVDLIE", "YGYSTRVVD", "YGYSTRVVDLVE", "YIALVDQLIAKYSS", 
"YIASKKGSISAE", "YKDIPVPKPKANE", "YKPLFTE", "YLLKAIKE", "YLNLPEHIVPGTYIQE", 
"YNKIGDILSGRLKLRAE", "YQSKIIVFPRDGKAPE", "YQTQVLKNAKALE", "YQYLRSVVNE", 
"YRKVLPIVSVPE", "YRLSVLPDNVPIMSVE", "YSLLAWTNIPRKE", "YVAKVSARE", 
"YVNKGQDFHIAGE", "YVPSVIEPSFGIGRIIYSVFE", "YVQAAKNSIAAGADGVE"
), class = "factor"), variable = structure(c(1L, 1L, 1L, 1L), .Label = c("Control", 
"Treat"), class = "factor"), value = c(3893050.501, 900604.6087, 
90008.14298, 656399.2021), pv = c(0.852317422616546, 0.852317422616546, 
0.852317422616546, 0.852317422616546)), .Names = c("id", "Sequence", 
"variable", "value", "pv"), row.names = c(NA, 4L), class = "data.frame") 
4

1 回答 1

3

只需在更改之前保存原始变量。

var.save <- tbl_reo$variable
levels(tbl_reo$variable) <- c("Control","Control","Control","Treat","Treat","Treat")
# do whatever you need to do with changed variables
# ... 
# ... 
tbl_reo$variable <- var.save # change back 
于 2013-10-28T13:08:03.387 回答