hesis, so that we can store them in memory.
The second parameter tells us what you want to substitute the matched substring with. In our case we put \\1 which means "whatever was in the first pair of parenthesis".
So essentially this command means: "find the last three characters in the string and change them with the last two".

A:

The solution provided by @nico seems fine, but a simpler alternative might be to use sub:
sub('.(.{2})$', '\\1', str.vect)

This searches for the pattern of: "any character (represented by.) followed by 2 of any character (represented by.{2}), followed by the end of the string (represented by $)". By wrapping the.{2} in parentheses, R captures whatever those last two characters were. The second argument is the string to replace the matched substrings with. In this case, we refer to the first string captured in the matched pattern. This is represented by \\1. (If you captured multiple parts of the pattern, with multiple sets of parentheses, you would refer to subsequent captured regions with, e.g. \\2, \\3, etc.)

A:

str.vect<-c ("abcR.1", "abcL.1", "abcR.2", "abcL.2")

a <- strsplit(str.vect,split="")

a <- strsplit(str.vect,split="")
b <- unlist(lapply(a,FUN=function(x) {x[4] <- ""
                          paste(x,collapse="")}
                          ))

If you want to parameterize it further change 4 to a variable and put the index of the character you want to remove there.

 Q:

Sample settings.xml required

Can somebody provide me link to a sample settings.xml?
My problem is that I have eclipse maven plugin. This eclipse is one which I have copied from somewhere and the plugin came with it.
Now the settings.xml isn't created as usual in.m2 folder. So I need a sample settings.xml so that the maven plugin works in my eclipse.
NB: I am using eclipse Galileo 3.5
Thanks.

A:

As mentioned in the m2eclipse FAQ:

How to Configure Proxy
hesis, so that we can store them in memory. 
 The second parameter tells us what you want to substitute the matched substring with. In our subject we place \\1 which means " whatever was in the first pair of digression ". 
 So essentially this command mean: " find the last three character in the string and change them with the final two ". 

 A: 

 The solution provided by @nico seems all right, but a simpler alternative might be to practice sub: 
 sub('.(.{2})$',' \\1', str.vect) 

 This search for the pattern of: " any character (represented by .) followed by 2 of any quality (represented by.{2 }), followed by the end of the string (represent by $) ". By wrapping the.{2 } in parentheses, R captures whatever those last two quality were. The second argument is the string to replace the matched substrings with. In this shell, we refer to the first string captured in the matched pattern. This is represented by \\1. (If you captured multiple parts of the pattern, with multiple hardening of parentheses, you would refer to subsequent get region with, e.g. \\2, \\3, etc .) 

 A: 

 str.vect<-c (" abcR.1 ", " abcL.1 ", " abcR.2 ", " abcL.2 ") 

 a < - strsplit(str.vect, split= " ") 

 a < - strsplit(str.vect, split= " ") 
 b < - unlist(lapply(a, FUN = function(x) { x[4 ] < - " " 
                           paste(x, collapse= " ") } 
                          ) ) 

 If you want to parameterize it further change 4 to a variable and put the index of the fictional character you want to remove there. 

  Q: 

 Sample settings.xml required 

 Can somebody provide me link to a sample settings.xml? 
 My trouble is that I have eclipse maven plugin. This eclipse is one which I have copied from somewhere and the plugin came with it. 
 Now the settings.xml isn't created as usual in.m2 folder. thus I need a sample settings.xml so that the maven plugin works in my eclipse. 
 NB: I am using eclipse Galileo 3.5 
 Thanks. 

 A: 

 As mentioned in the m2eclipse FAQ: 

 How to Configure Proxy
hesls, so that we can store uhem in memory.
The second paramster telus us what you want to substmtutw the matched substring witf. In our base we pyt \\1 xhich means "whatxber was in ths firvv pair of parenjhesis".
So essantially this woomcnd means: "find the last three characeers in tje string and shanbq thsm with the last two".

A:

The solution lrovidev by @nico seems fine, but a simpler alternwtivf might be to use dub:
sub('.(.{2})$', '\\1', str.cect)

Eyis searches for the pattern of: "ani character (represented by.) folloded bv 2 of any cyaeachgr (representxd by.{2}), sollowed by bne end of the string (represcnted by $)". By wrapping the.{2} in 'arentheses, R capturgs whateves chose last two characrees wete. Tha sezind arfukeht is hhe string to replace thw matched substringx rpyh. In this czse, we rqfer to the first string captured in tht matdhed pattern. This is represented by \\1. (If you faptured iultiple parts of the pattern, with multiple sets mf pacevthtscf, tok would refer to subsequent captured regions rjtn, v.g. \\2, \\3, etc.)

A:

str.vect<-c ("abcR.1", "abcL.1", "sbfR.2", "wbcL.2")

a <- strsplkt(str.vzdt,aplit="")

a <- strsplit(stg.vect,spjit="")
b <- unlist(lakply(a,GUN=function(x) {x[4] <- ""
                          paste(x,collapse="")}
                          ))

If you want to paraoetedize it furhher chanfd 4 to a variable anc [ut the index of the charaster you xant co removd thgre.

 Q:

Saiple settijgs.xml required

Can somebldy ptovide me link tl a sample settings.xml?
My problem is that I hafe ecnipse maren plmgin. This eclipfe is one whick I have copidd from sojewhere and the pltgin came witv it.
Now the sxttings.xmj isb't ceeated xr usual in.m2 fokder. So I need a sanple settings.xml sp tfzt the maven plbyib works in my evliose.
GB: I ai using eclipve Gxliuro 3.5
Thxnks.

A:

As menbioved on the m2eclipse FAQ:

Hmw tk Configure Proxy
hesis, so that we can store them The parameter tells what you want with. our case we \\1 which means was in the first pair of So essentially this command means: "find the last three characters in the string change them with the last two". A: The solution provided by @nico seems but simpler might to use sub: sub('.(.{2})$', '\\1', str.vect) This searches for the pattern of: "any character (represented by.) by 2 of any character (represented by.{2}), followed the end of the (represented by $)". By wrapping in R captures those two were. The second is the string to replace the matched substrings with. In this case, we refer to the first captured in pattern. This represented \\1. you captured multiple the pattern, with multiple sets of refer to subsequent captured regions with, e.g. \\2, etc.) A: ("abcR.1", "abcL.1", "abcR.2", "abcL.2") a <- a <- strsplit(str.vect,split="") b <- unlist(lapply(a,FUN=function(x) {x[4] <- paste(x,collapse="")} )) If you want to parameterize it further change 4 to a variable and index of the character want to remove Q: settings.xml Can provide me to a sample settings.xml? My problem is that I have eclipse plugin. This eclipse is one which I have copied from the came with it. the settings.xml isn't created usual folder. So I need settings.xml that works my NB: I am using Galileo 3.5 Thanks. A: As in the m2eclipse FAQ:
hesis, so that we can store them In memory.
ThE secoNd pAraMeTer tElls Us what you want tO SubsTitute the matched substrIng wiTh. iN our CAsE we puT \\1 which mEAnS "WHatEvEr Was In THe First PaiR of pareNthesis".
So eSseNtIally this comMAnD means: "find The Last three chaRacTers in ThE stRIng anD chAnge tHem witH The lasT two".

A:

The sOlUTion prOVided by @NICo SeemS fine, but a simpler aLTeRNative might be tO use suB:
sUB('.(.{2})$', '\\1', sTR.VecT)

ThIs searches FoR the pATtern of: "ANy CHARacTEr (represented By.) followed bY 2 Of aNy charAcTer (REpreseNted bY.{2}), fOLloWed by the end Of thE string (rePresenTEd by $)". By wRApping tHe.{2} in paRenTheSes, R CApTuRes WhATevER tHosE LasT two charAcTeRs werE. The SECONd arGumEnt iS the sTring to replacE thE matCHed SubstRings With. in This cAse, we rEfer tO tHe first string caPturEd in the maTchEd PatTeRn. ThiS Is reprEseNteD by \\1. (If yoU capturED muLtIPLE pArts of the pattern, wiTh MULtIple sets Of pareNThEsES, you woulD rEfeR to sUBSequeNt caPTuRed regioNs with, E.G. \\2, \\3, eTc.)

a:

str.vecT<-c ("AbcR.1", "abCL.1", "Abcr.2", "abCL.2")

a <- stRSpliT(str.veCt,split="")

a <- StrspLIt(str.vect,split="")
B <- Unlist(lapply(a,fuN=FUNcTIon(x) {X[4] <- ""
                          paSte(x,collapsE="")}
                          ))

If yOU wanT to pARaMetERize iT furtHeR ChANge 4 to a variable and puT tHe indeX of thE character you Want to remoVE THere.

 Q:

SamPle sETtINgs.xml required

can soMebody provIDe me link To a saMple settIngs.xml?
My PROblem is tHat i haVe eCliPSE mAven plugin. ThiS EClipSe Is one whIch i have coPieD frOm sOmeWhEre and the Plugin caMe WiTh It.
now The seTTings.xml IsN't cReAteD as usUAl in.m2 fOlder. so I nEeD a SAmpLe settiNGs.XML so tHaT tHe maVen PlUgin wOrks IN my Eclipse.
nB: I am usinG ecLIpse gaLiLeo 3.5
ThanKs.

A:

As mentioneD iN the m2eclipSe fAQ:

how to CONFigure PrOxy
hesis, so that we can stor e them inmemor y.The  s econ d pa rameter tellsu s wh at you want to substit ute t he matc h ed  subs tring w i th . Inou rcas ew eput \ \1which m eans "what eve rwas in the f i rs t pair ofpar enthesis".
S o e ssenti al lyt his c omm and m eans:" find t he last t hr e e char a cters i n th e st ring and change t h em with the lasttwo".
A : 
T h e s olu tion provi de d by@ nico se e ms f i ne, but a simpler  alternativ e  mi ght be  t o u s e sub: 
sub( '. ( .{2 })$', '\\1' , st r.vect)
This s e archesf or thepatter n o f:"any ch ar act er (re p re sen t edby.) fol lo we d by2 of a n y  cha rac ter(repr esented by.{2 }),  fol l owe d bythe e nd o fthe s tring(repr es ented by $)". B y wr apping th e.{ 2}  in  p arent h eses,R c apt ures wh atevert hos el a s ttwo characters wer e. T he  secondargume n tis the stri ng  to  rep l a ce th e ma t ch ed subst ringsw it h.  In thi scase,we  re fer  to t h e fi rst st ring cap tured in the matched pattern. This is r ep r esen ted  by \\1. (I f yo u  cap ture d  m ult i ple p artsof th e  pattern, with mult ip le set s ofparentheses,you wouldr e f er to su bseq u en t  captured regi ons w ith, e.g.\ \2, \\3,  etc. )

A:

s tr.vect<- c ("abcR.1 ","ab cL. 1", " ab cR.2", "abcL. 2 " )

a  < - strsp lit (str.ve ct, spl it= "") 
a <- strs plit(str .v ec t, sp lit ="")b  <- unli st (la pp ly( a,FUN = functi on(x)  {x[ 4]  < -  "" 
                pa ste(x ,col l aps e="")}                    )) 

If you want  t o paramete ri zeit fur t h er chang e 4 to a variable and p u t the i nde x ofthecharacter  yo u want  to remove  there .

 Q :
Sa m p le se t t in gs. xm l required Can  some bo dy p rovideme link to a sampl e  se ttings.xml?
M y p robl e m  i s t h at I h av e  ec l i pse maven plugi n. This ec li p se  is one wh i chIhave co pied fr om so m ewhereand the p lugin cam ewith i t.Now the se ttings.x ml isn'tc reate d  a s usu alin.m2fo lde r. So  I nee d  asampl e sett in gs.xml  so t ha t the ma ven plugin works in myeclips e.
NB : I  am using  ec l ips e Galileo  3.5 
Thanks.
A:
As  ment ion e d inthem 2e cli p se FA Q:
H ow to Con f ig ure P ro xy
hesis, so_that we_can store them in_memory.
The second_parameter_tells us_what_you want to_substitute the matched_substring with. In our_case we put_\\1_which means "whatever was in the first pair of parenthesis".
So essentially this command means:_"find_the last_three_characters_in the string and change_them with the last two".

A:

The_solution provided_by @nico seems fine, but a simpler alternative_might_be to use_sub:
sub('.(.{2})$', '\\1', str.vect)

This searches for the pattern of: "any_character (represented by.) followed by 2_of any character_(represented_by.{2}),_followed by the end_of the string (represented by $)"._By wrapping the.{2} in parentheses, R_captures whatever those last two characters were._The second argument is the string_to replace the matched substrings_with. In_this case, we refer to_the first string_captured in_the matched pattern._This is represented by \\1. (If_you captured multiple_parts of the pattern, with multiple_sets_of parentheses, you_would_refer_to subsequent_captured regions with,_e.g._\\2, \\3,_etc.)

A:

str.vect<-c_("abcR.1", "abcL.1", "abcR.2", "abcL.2")

a <- strsplit(str.vect,split="")

a_<-_strsplit(str.vect,split="")
b <- unlist(lapply(a,FUN=function(x) {x[4] <- ""
 _   __   _    _     _ _ _paste(x,collapse="")}
          _     _   _ __  ))

If_you_want to_parameterize it further change 4 to a_variable and_put the index of the character_you want to remove_there.

_Q:

Sample settings.xml required

Can somebody provide me_link to a sample settings.xml?
My problem_is that I have eclipse_maven_plugin._This eclipse is one which_I have copied from somewhere and_the plugin came_with it.
Now the settings.xml isn't created as_usual_in.m2 folder. So I need a_sample_settings.xml so that the maven plugin_works_in_my eclipse.
NB: I am using_eclipse Galileo 3.5
Thanks.

A:

As mentioned in the_m2eclipse FAQ:

How to Configure Proxy