search for: codetot

Displaying 2 results from an estimated 2 matches for "codetot".

2009 Apr 09
2
failed when merging two dataframes, why
Hi, R-listers, Failed, when I tried to merge df1 and df2 by "codetot" in df1 and "codetoto" in df2. I want to know the reason and how to merge them together. Data frames and codes I have used were listed as followed. Thanks a lot in advance. df1: popcode codetot p3need BCPy01-01 BCPy01-01-1 100.0000 BCPy01-01 BCPy01-01-2 100.0000 BCPy01-01 BCPy...
2009 Apr 10
4
split a character variable into several character variable by a character
...ot; "02" "02" "02" "02" "02" "03" hth, Adrian On Friday 10 April 2009, Mao Jianfeng wrote: > Dear, R-lister, > > I have a dataframe like the followed. And, I want to split a character > variable ("popcode", or "codetot") into several new variables. For example, > split "BCPy01-01" (popcode[1]) into "BCPy01" and "01". I need to know how > to do that. I have tried strsplit() and substring() functions. But, I still > can not perform the spliting. > > Any advice? Than...