search for: sapana

Displaying 8 results from an estimated 8 matches for "sapana".

Did you mean: apana
2012 Aug 31
7
splits with 0s in middle columns
Hi, A column of my df looks like A 10/20/30 40/20 60/10/10/5 80/10 I want to split it such that the last column has the last composition and if there are not enough the middle columns get the 0s. That way my df would look like A1 A2 A3 A4 10 20 0 30 40 0 0 20 60 10 10 5 80 0 0 10 How can I do that ?? [[alternative HTML version deleted]]
2012 Aug 28
7
check and verify
Hi, I have 6 columns in my dataframe (test) A B C D E F a b c d 40 30 a f a b 20 10 x m y m 50 30 If character value in column A matches with that in column C, it gets the percentage in column E, similarly if value in column B matches the value in D, it gets the percentage in F column. If it doesn't match, it gets 0 percentage. How can I do that ? thanks [[alternative HTML version
2012 Aug 16
8
How to extract from a column in a table?
Hi, I have a table in which one column has the name of the objects as shown below. Name Budlamp-Woodcutter Complex - 15 to 60% slope (60/25/15) Budlamp-Woodcutter Complex - 15 to 60% slope (60/25/15) Terrarossa-Blacktail-Pyeatt Complex - 1 to 40% slope (40/35/15/10) Terrarossa-Blacktail-Pyeatt Complex - 1 to 40% slope (40/35/15/10) How can I split the single column into three columns
2012 Aug 27
6
find and replace
I have 5 (A,B,C,D,E) columns in my dataframe. I want to replace all "x" with "y" and all "a" with "b" within these 5 columns. Can I do it in one step? Thanks [[alternative HTML version deleted]]
2012 Aug 29
4
Use or ??
Hi, My data frame looks like A B C a b a x y z I want to add a new column which says "y" if either A or B matches with C and "n" if there is no match. How can I do that? Thanks [[alternative HTML version deleted]]
2012 Aug 20
7
relating data in two data frames
Hi, My data.frame "A" has FID like this FID a a b b b c c d d d d Now my second data.frame "B" has age value for a, b, c, d like FID Age a      5 b      7 c      9 d      3 How can search for the Age column in "B" and replace the values in "A" so that my new "A" looks like this FID Age a      5 a      5 b      7 b      7 b      7
2012 Aug 27
4
?nchar ?strsplit
Hi, my data frame is x<-data.frame(ID=c("abc/def","abc/def/ghi","abc","mno/pqr/st/ab")) I want to split my column ID using "/" as the place to split. How can I do that without telling the code how many sub-columns. I could use nchar(gsub("[^/]","",x$ID)) to get how many "/" are in each row of the column, but could
2012 Oct 02
2
add values in one column getting range from other column
Hi, My dataframe has two columns one with area and other with percent. How can i add the areas that are within a range of percentage?? My dataframe looks like Area Percent 456       0 3400      10 79          25 56           18 467         0 67          67 839        85 1120      0 3482      85 I want to add the area for values whose percent is <0, 0-25, 25-50, 50-75, >75. How