search for: spcl

Displaying 15 results from an estimated 15 matches for "spcl".

Did you mean: scl
2010 Apr 30
1
read.csv and blank character in object name of my data.frame
...;, "STANDARD LEAD USD 23/06/10 ", "STANDARD LEAD USD 23/06/10 ", "STANDARD LEAD USD 23/06/10 ", "STANDARD LEAD USD 25/06/10 ", "STANDARD LEAD USD 25/06/10 ", "STANDARD LEAD USD 29/06/10 ", "STANDARD LEAD USD 29/06/10 ", "SPCL HIGH GRADE ZINC USD 06/07/10 ", "SPCL HIGH GRADE ZINC USD 06/07/10 ", "SPCL HIGH GRADE ZINC USD 06/07/10 ", "SPCL HIGH GRADE ZINC USD 06/07/10 ", "SPCL HIGH GRADE ZINC USD 06/07/10 ", "SPCL HIGH GRADE ZINC USD 06/07/10 ", "SPCL HIGH GRA...
2010 Apr 15
1
sum rows in a data.frame...solution
...substr(lme$DESCRIPTION,1,14)) > colnames(a)=c("DESCRIPTION") > lme=as.data.frame(c(a,lme[,2:3])) > lme DESCRIPTION CLOSING.PRICE POSITION 1 PRIMARY NICKEL 25,755.7100 0 2 PRIMARY NICKEL 25,760.8600 0 3 PRM HGH GD ALU 2,415.9000 0 4 SPCL HIGH GRAD 2,420.1000 -1 5 SPCL HIGH GRAD 2,420.4100 -1 6 SPCL HIGH GRAD 2,420.7300 1 7 SPCL HIGH GRAD 2,421.0500 1 8 SPCL HIGH GRAD 2,388.4300 0 9 SPCL HIGH GRAD 2,389.0000 0 10 SPCL HIGH GRAD 2,389.5700 0 11 SPCL HIGH GRAD...
2010 Apr 16
1
data frame manipulation
...KEL", "PRIMARY NICKEL", "PRIMARY NICKEL", "STANDARD LEAD ", "STANDARD LEAD ", "STANDARD LEAD ", "STANDARD LEAD ", "STANDARD LEAD ", "STANDARD LEAD ", "STANDARD LEAD ", "STANDARD LEAD ", "SPCL HIGH GRAD", "SPCL HIGH GRAD", "SPCL HIGH GRAD", "SPCL HIGH GRAD", "SPCL HIGH GRAD", "SPCL HIGH GRAD", "SPCL HIGH GRAD", "SPCL HIGH GRAD", "SPCL HIGH GRAD", "SPCL HIGH GRAD"), CREATED.DATE = structure(c(...
2010 Apr 29
3
convert Factor as numeric
...PTION = structure(c(1L, 2L, 3L, 4L, 5L, 8L), .Label = c(" SUGAR NO.11 May/10 ", "COTTON NO.2 May/10 ", "PLATINUM Jul/10 ", "ROBUSTA COFFEE (10) May/10 ", "WHEAT May/10 ", "PRIMARY NICKEL USD", "PRM HGH GD ALUMINIUM USD", "SPCL HIGH GRADE ZINC USD", "STANDARD LEAD USD"), class = "factor"), POSITION = c(5, 3, -1, 15, 4, 2), SETTLEMENT = structure(c(3L, 5L, 2L, 1L, 4L, 8L), .Label = c("1,353.0000", "1,739.4000", "16.5400", "467.7500", "78.1300", &...
2010 Apr 28
1
gsub,regex and replacing
...to do this. Here is the data frame (df): DESCRIPTION prix quantity 1 CORN Jul/10 -1.5 0 2 CORN May/10 -1082.0 -3 3 ROBUSTA COFFEE (10) Jul/10 11084.0 8 4 SOYBEANS Jul/10 1983.5 2 5 SPCL HIGH GRADE ZINC USD Jul/10 -2464.0 -1 6 STANDARD LEAD USD Aug/10 -118.0 0 For each df$DESCRIPTION element containing "USD" I want to remove the last part of it(i.e Jul/10, or Aug/10...). I was thinking of something like that: >Df$DESCRIPTION<-gsub("USD&q...
2010 May 11
1
merge two data frames
.../10", "CORN Jul/10", "CORN May/10", "COTTON NO.2 Jul/10", "CRUDE OIL miNY May/10", "GOLD Jun/10", "HENRY HUB NATURAL GAS May/10", "ROBUSTA COFFEE (10) Jul/10", "SILVER May/10", "SOYBEANS Jul/10", "SPCL HIGH GRADE ZINC USD", "STANDARD LEAD USD", "SUGAR NO.11 Jul/10", "SUGAR NO.11 May/10", "WHEAT Jul/10", "WHEAT May/10"), class = "factor"), pl = c(4.75000000000003, -14, -1.5, 7.75, 3.74999999999999, 5.22500000000005, 21.699...
2010 Apr 23
2
read.csv data frame thousands separator
...= c("CORN", "CORN", "CORN", "CORN", "CORN", "SOYBEANS", "SOYBEANS", "SOYBEANS", "SOYBEANS", "SOYBEANS", "SOYBEANS", "STANDARD LEAD USD", "STANDARD LEAD USD", "SPCL HIGH GRADE ZINC USD", "SPCL HIGH GRADE ZINC USD", "SPCL HIGH GRADE ZINC USD", "ROBUSTA COFFEE (10)", "ROBUSTA COFFEE (10)", "ROBUSTA COFFEE (10)", "ROBUSTA COFFEE (10)", "ROBUSTA COFFEE (10)", "ROBUSTA COFFEE (10)&q...
2010 Aug 04
3
merge two data frames
...ure(list(DESCRIPTION = c("COFFEE C Sep/10", "COPPER Sep/10", "CORN Dec/10", "CRUDE OIL miNY Sep/10", "GOLD Aug/10", "HENRY HUB NATURAL GAS Sep/10", "PALLADIUM Sep/10", "SILVER Sep/10", "SOYBEANS Nov/10", "SPCL HIGH GRADE ZINC USD", "SUGAR NO.11 Oct/10", "WHEAT Sep/10"), prix = c(-168.3, -1.60000000000002, -773.75, -78.75, -1168.3, -0.0919999999999996, -470.75, 1758.5, -975.25, 1964, -19.09, -605.75), pos = c(-1, 0, -2, -1, -1, 0, -1, 1, -1, 1, -1, -1), PL = c(-12.03, -31.68, -43....
2010 Apr 28
3
data frame move columns
Dear group, Here is my df: avprix <- structure(list(DESCRIPTION = c("CORN Jul/10", "CORN May/10", "ROBUSTA COFFEE (10) Jul/10", "SOYBEANS Jul/10", "SPCL HIGH GRADE ZINC USD", "STANDARD LEAD USD"), prix = c(-1.5, -1082, 11084, 1983.5, -2464, -118), quantity = c(0, -3, 8, 2, -1, 0), fees = c(-8.64, -30.24, -26.4, -25.92, -37.5, -25)), .Names = c("DESCRIPTION", "prix", "quantity", "fees"), row...
2010 May 11
1
merging data frame
..."CRUDE OIL miNY May/10", "GOLD Jun/10", "ROBUSTA COFFEE (10) Jul/10", "SOYBEANS Jul/10", "SUGAR NO.11 Jul/10", "SUGAR 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.9, -244.77, -166.48, -2273.8, -24876, -2985, -80.9, 15.95, -2512.5, 2423)), .Names = c("DESCRIPTION", "POSITION&quot...
2010 May 26
5
(no subject)
.../10", "CORN Jul/10", "CORN May/10", "COTTON NO.2 Jul/10", "CRUDE OIL miNY May/10", "GOLD Jun/10", "HENRY HUB NATURAL GAS May/10", "ROBUSTA COFFEE (10) Jul/10", "SILVER May/10", "SOYBEANS Jul/10", "SPCL HIGH GRADE ZINC USD", "STANDARD LEAD USD", "SUGAR NO.11 Jul/10", "SUGAR NO.11 May/10", "WHEAT Jul/10", "WHEAT May/10"), class = "factor"), PL = c(3500, -1874.99999999999, -2612.50000000003, -2169.99999999998, -680, 425, 102...
2010 May 11
2
Regex and gsub
...CRIPTION = 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 May/10", "WHEAT Jul/10", "SPCL HIGH GRADE ZINC USD", "STANDARD LEAD USD", "CORN May/10", "SILVER May/10", "WHEAT May/10", "COFFEE C Jul/10", "CORN Jul/10", "HENRY HUB NATURAL GAS May/10"), POSITION = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)...
2010 May 12
1
data frame subscription
..."CRUDE OIL miNY May/10", "GOLD Jun/10", "ROBUSTA COFFEE (10) Jul/10", "SOYBEANS Jul/10", "SUGAR NO.11 Jul/10", "SUGAR 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), SETTLEMENT = c(351.45, 81.59, 83.24, 1136.9, 1382, 995, 16.18, 15.95, 502.5, 2423 )), .Names = c("DESCRIPTION", "POSITION", &quot...
2010 Apr 15
4
Does "sink" stand for anything?
Hello Everyone,   Learning about R and its wonderful array of functions. If it's not obvious, I usually try to find out what a function stands for. I think this helps me remember better.   One function that has me stumped is "sink." Can anyone tell me if this stands for something?   Thanks,   Paul         __________________________________________________ [[alternative HTML
2010 May 20
6
writing function
Dear group, I am trying to write functions, but as a beginner, everything is not so obvious. Let's say I want the results in a list of elemts like this : tot1, tot2, etc Here is a function: toto <- function(x,y) { for(i in x:y){ paste(c("tot",i),collapse="")<-(i*2) } } If I type this : >toto(1,5) I get this message error: Error in paste(c("tot",