Dear R forum
I have a data.frame
df = data.frame(currency_type = c(EURO_o_n, EURO_o_n, EURO_1w, EURO_1w,
USD_o_n, USD_o_n, USD_1w, USD_1w), rates = c(0.47, 0.475, 0.461, 0.464,
1.21, 1.19, 1.41, 1.43))
currency_type rates
1 EURO_o_n 0.470
2 EURO_o_n 0.475
3 EURO_1w
On Tue, Apr 16, 2013 at 8:38 AM, Katherine Gobin
katherine_go...@yahoo.com wrote:
Dear R forum
I have a data.frame
df = data.frame(currency_type = c(EURO_o_n, EURO_o_n, EURO_1w,
EURO_1w, USD_o_n, USD_o_n, USD_1w, USD_1w), rates = c(0.47, 0.475,
0.461, 0.464, 1.21, 1.19, 1.41, 1.43))
Message -
From: Katherine Gobin katherine_go...@yahoo.com
To: r-help@r-project.org
Cc:
Sent: Tuesday, April 16, 2013 8:38 AM
Subject: [R] Splitting the Elements of character vector
Dear R forum
I have a data.frame
df = data.frame(currency_type = c(EURO_o_n, EURO_o_n, EURO_1w, EURO_1w
Subject: Re: [R] Splitting the Elements of character vector
Hi,
Try:
df = data.frame(currency_type = c(EURO_o_n, EURO_o_n, EURO_1w, EURO_1w,
USD_o_n, USD_o_n, USD_1w, USD_1w), rates = c(0.47, 0.475, 0.461, 0.464,
1.21, 1.19, 1.41, 1.43),stringsAsFactors=FALSE)
df$currency-unlist(lapply(str_split(df
4 matches
Mail list logo