Hi,
Using your code:
sub("[.]$",".1",sim.code)
#[1] "1.1234.1a.1" "1.1234.1a.2" "1.3245.2c.5" "4.6743.3c.1" "4.3254.6b.4"
#[6] "3.5463.2a.1"
A.K.
- Original Message -
From: chris201
To: r-help@r-project.o
1.3245.2c.5 3
#4 4.6743.3c.1 6
#5 4.3254.6b.4 4
#6 3.5463.2a.1 7
A.K.
- Original Message -
From: chris201
To: r-help@r-project.org
Cc:
Sent: Friday, March 8, 2013 5:23 AM
Subject: [R] Substitute value
Hi,
I have a large data frame and within this there is
On Fri, Mar 8, 2013 at 5:23 AM, chris201 wrote:
> Hi,
> I have a large data frame and within this there is one column which contains
> individual codes (eg. 1.1234.2a.2). I am splitting these codes into their 4
> components using strsplit (eg. "1", "1234", "2a", "2"). However there are
> some in
Hi
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of chris201
> Sent: Friday, March 08, 2013 11:23 AM
> To: r-help@r-project.org
> Subject: [R] Substitute value
>
> Hi,
> I have a large data frame a
Hi,
I have a large data frame and within this there is one column which contains
individual codes (eg. 1.1234.2a.2). I am splitting these codes into their 4
components using strsplit (eg. "1", "1234", "2a", "2"). However there are
some individual codes which do not have a last component (eg. 2.43
5 matches
Mail list logo