similar to: ?nchar ?strsplit

Displaying 20 results from an estimated 9000 matches similar to: "?nchar ?strsplit"

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]]
2005 May 30
4
Very simple traffic shaping script for H.323
Hello - What I want to do seems very simple - I want to make sure any H.323 traffic gets processed before anything else entering or leaving this network. The network has a videoconferencing device on the LAN at 192.168.16.4. A Linux firewall NATs an external IP Address to this internal address and I have appropriate SNAT and DNAT rules that work. The NAT and connection tracking rules all work
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
2011 Dec 01
2
Counting the occurences of a charater within a string
I am new to R but am experienced SAS user and I was hoping to get some help on counting the occurrences of a character within a string at a row level. My dataframe, x, is structured as below: Col1 abc/def ghi/jkl/mno I found this code on the board but it counts all occurrences of "/" in the dataframe. chr.pos <- which(unlist(strsplit(x,NULL))=='/') chr.count <-
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 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 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 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
2012 Jul 11
4
MODE , VARIANCE , NTH PERCENTAILE
Hi, Here i have an matrix like this, ABC PQR XYZ MNO ------ ------- ------ -------- 3 6 7 15 2 12 24 15 20 5 1 2 25 50 15 35 i need to get the "MODE" - for each column-wise "VARIANCE" - for
2012 May 25
4
Hash Table - Select and Change Data iniside Matrix
Hi, Here i have been a matrix like this, *NAME AGE PALCE TRUE/FALSE* ABC 20 INDIA XYZ 30 FRANCE PQR 40 USA MNO 30 KENIYA DEF 25 AUSTRALIA Here,* TRUE/FALSE* Column containing empty values. So my requirement what is , need to change all the *TRUE/FALSE *column value into "*TRUE*" where *AGE =
2012 May 28
2
Hash Table - Select and Change Data iniside Matrix Using "Between"
Hi, Here i have been an matrix like this, *NAME AGE PALCE TRUE/FALSE* ABC 20 INDIA XYZ 30 FRANCE PQR 40 USA MNO 30 KENIYA DEF 25 AUSTRALIA GTY 34 CANADA BNH 38 JAPAN Here, *TRUE/FALSE *Column containing empty values. So my requirement what is, need to change all the TRUE/FALSE
2015 May 22
5
[Bug 2404] New: scp skips file/directory on permissions error
https://bugzilla.mindrot.org/show_bug.cgi?id=2404 Bug ID: 2404 Summary: scp skips file/directory on permissions error Product: Portable OpenSSH Version: 6.7p1 Hardware: All OS: All Status: NEW Severity: major Priority: P5 Component: scp Assignee: unassigned-bugs at mindrot.org
2009 Oct 02
3
break up a string into strings with a fixed length
dear all, I have some very long strings and would like to break up each long string into multiple strings with a fixed length, e.g. to break up abcdefghijkl into abc, def, ghi, jkl I tried a couple of commands but was not successful. Any help will be appreciated. Best, Jimmy -- View this message in context:
2012 May 29
2
Use variable inside Function for updating the matrix
Hi, Here i have a data frame like this, frame name is "dat" *NAME AGE ELIGIBLE* A 20 B 14 C 35 D 10 E 50 In this, i want to change the column '*ELIGIBLE*' status to '*YES*' If, AGE between 18 to 35 Which means that, i should get a put like
2016 Oct 04
1
error handling in strcapture
It is also not catching the cases where the number of capture expressions does not match the number of entries in proto. I think all of the following should give an error about the mismatch. > strcapture("(.)(.)", c("ab", "cde", "fgh", "ij", "lm"), proto=list(A="",B="",C="")) A B C 1 a b cd 2 d
2013 Nov 18
3
Sending a matrix in an email
I have a matrix which has colnames and I would like to send this matrix using sendmailR. How can I convert this simple matrix to a format which can be used as the body variable in sendmailR? I see how I can create a file attachment using mime_part but I would like to send the matrix in the body of the email. The matrix looks like: ABD DEF GHI JKL MNO TOT [1,] 0.44 0.81 1.67 0.37
2008 Oct 29
6
substring/strsplit question
Dear R People: Here is a toy example: > x <- c("2E","5W","12H") > substr(x,2,2) [1] "E" "W" "2" > Sometimes x has 3 elements, sometimes 2. I want to extract the last element, and then extract the other 1 or 2 elements. How can I do this, please? TIA, Sincerely, Erin -- Erin Hodgess Associate Professor Department of
2013 Apr 29
2
Adding elements in data.frame subsets and also subtracting an element from the rest elements in data.frame
Dear R forum I have a data.frame as cashflow_df = data.frame(instrument = c("ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC", "ABC", "PQR", "PQR",
2011 Oct 18
1
Function to "lump" factors together?
Sorry about the odd terminology, but I suspect that my intent might be completely missed had I used "aggregate" or "classify" (each of which appears to have some rather special meanings in statistical analysis and modeling). I have some data about software builds; one of the characteristics of each is the name of the branch. A colleague has generated some fairly interesting