"STANDARD LEAD USD"), class = "factor"),
POSITION = c(2, -3, -2, -2, -18, -3, -5, 1, -5, 1), prix =
c(-702.9,
244.77, 166.48, 2273.8, 24876, 2985, 80.9, -15.95, 2512.5,
-2423)), .Names = c("DESCRIPTION", "POSITION", "prix"), row.names =
c
TY. Didn't know this function.
From: Henrique Dallazuanna [mailto:www...@gmail.com]
Sent: Wednesday, May 12, 2010 3:32 PM
To: arnaud Gaboury
Cc: r-help@r-project.org
Subject: Re: [R] data frame subscription
Try this:
transform(pose16, prix = POSITION * SETTLEMENT, SETTLEMENT =
M HGH GD ALUMINIUM USD",
"SPCL HIGH GRADE ZINC USD", "STANDARD LEAD USD"), class = "factor"),
POSITION = c(2, -3, -2, -2, -18, -3, -5, 1, -5, 1), prix = c(-702.9,
244.77, 166.48, 2273.8, 24876, 2985, 80.9, -15.95, 2512.5,
-2423)), .Names = c("DES
> Cc: arnaud Gaboury; r-help@r-project.org
> Subject: Re: [R] data frame subscription
>
> Couldn't you just put a minus sign in from of the derived "prix"
> expression?
>
> transform(pose16, prix = - POSITION * SETTLEMENT, SETTLEMENT = NULL,
> POSITION
> = POSI
GAR NO.11 May/10",
> "WHEAT Jul/10", "PRIMARY NICKEL USD", "PRM HGH GD ALUMINIUM USD",
> "SPCL HIGH GRADE ZINC USD", "STANDARD LEAD USD"), class = "factor"),
> POSITION = c(2, -3, -2, -2, -18, -3, -5, 1, -5, 1), prix = c(-702.
Try this:
transform(pose16, prix = POSITION * SETTLEMENT, SETTLEMENT = NULL, POSITION
= POSITION * -1)
On Wed, May 12, 2010 at 9:50 AM, arnaud Gaboury wrote:
> Dear group,
>
> Here is my df :
>
> pose16 <-
> structure(list(DESCRIPTION = structure(c(1L, 2L, 3L, 4L, 5L,
> 6L, 7L, 8L, 9L, 12L), .L
Dear group,
Here is my df :
pose16 <-
structure(list(DESCRIPTION = structure(c(1L, 2L, 3L, 4L, 5L,
6L, 7L, 8L, 9L, 12L), .Label = c("COPPER May/10", "COTTON NO.2 Jul/10",
"CRUDE OIL miNY May/10", "GOLD Jun/10", "ROBUSTA COFFEE (10) Jul/10",
"SOYBEANS Jul/10", "SUGAR NO.11 Jul/10", "SUGAR NO.11
7 matches
Mail list logo