search for: crosb

Displaying 11 results from an estimated 11 matches for "crosb".

Did you mean: cross
2012 Oct 17
3
subtotals based on price bands?
I would like to create a subtotal table with custom bands. seq1 = seq(0, 100, by = 5) seq2 = seq(100, 1000, by = 100) Bands = c(seq1, seq2) #Prices Prices = sample(1:1000, 200, replace=F) #corresponding size for the given price above. size = sample(1:1000, 200, replace=F) How would I find the subtotal of the size based on a given price falls within a band? -- View this message in
2012 Jun 06
5
ggplot incorrect legend
How do I create a legend with ggplot? I think should be getting the FuelTypeNum in the legend. Plot: http://r.789695.n4.nabble.com/file/n4632471/Rplot.jpeg My code is: ggplot(data=tempTable, aes(x=Bands8, y=SubPercent, fill=FuelTypeNum)) + geom_bar(position="stack", stat="identity") + scale_colour_hue('my legend', breaks = levels(tempTable$FuelTypeNum),
2012 Jul 17
2
Table/Frame - output
I would like to output a nicely formatted data frame to a bitmap. Is this possible in R? -- View this message in context: http://r.789695.n4.nabble.com/Table-Frame-output-tp4636790.html Sent from the R help mailing list archive at Nabble.com.
2012 Jun 07
2
flagging values without a loop
For a given hour I want to be able to add a new column called flag. The flag column will flag the highest price in a given hour. Is there a way to do this without a loop? matrix: Unit, Day, Hour, Price, Flag afd1 1/2/2003 1 1 N afd1 1/2/2003 1 2 N afd1 1/2/2003 1 3 N afd1 1/2/2003 1 4 Y dcf1 1/2/2003 2 2 N dcf1 1/2/2003 2 3 Y dcf1 1/2/2003 2 1 N dcf1 1/2/2003 2 2 N dcf1 1/2/2003 2 3 Y ghg2
2012 Jun 01
1
plot background - excel gradient style background ?
Is there away of putting an excel style gradient background? I want to have dark blue in the middle and shad to white on the top and bottom. -- View this message in context: http://r.789695.n4.nabble.com/plot-background-excel-gradient-style-background-tp4632138.html Sent from the R help mailing list archive at Nabble.com.
2012 Oct 17
3
aggregate function not working?
The aggregate function for some reason will now work for me. The error I'm getting is: "Error in sort.list(y) : 'x' must be atomic for 'sort.list' Have you called 'sort' on a list?" agPriceList=aggregate(PriceList$Size, list(PriceList$bandNum),sum) *Price list dataframe:* dput(PriceList) structure(list(Price = c(0, 8.18, 8.27, 10.42, 10.5, 10.6, 11.13,
2012 Jul 03
1
remove loop which compares row i to row i-1
I would like to remove a loop to speed up my code. I want to remove a loop which references the last row. In general I want to a remove a loop which looks something like this: for 2 to number of rows in a matrix do{ if indextrow-1 is < currentIndexRow then do something. } My R code: for (i in 2:length(tUnitsort$Hour)){ ifelse(tUnitsort[i,4]>=tUnitsort[i-1,4],(tempMC
2012 Jul 26
2
conditional sum two dataframes
I have two data frames. One with a matrix of months and the other with a matrix of values. The two dataframes correspond to each other. I would like to sum up all the values in by month. What would be an efficient way to do this? a=C(2,3,5,2,3,5) b=c(2,6,3,2,6,3) c=c(2,6,7,2,6,5) months <- data.frame(a,b,c) a=C(200,345,5435,27456,3343,555) b=c(288,699,377,234,6354,33454)
2012 Nov 05
1
custom function & missing value where TRUE/FALSE needed
I can't figure out why this function wont work. #Custom Function used fallInBand <- function(x){ #Assume the bands fall go up form 0 to 100 in intervals of 5 then from 100 to 1000 in intervals of 100. #returns the location (band number) if (is.na(x) == FALSE) { if(x < 100) {#bands of 5 if((x %% 5) >=0){#falls within the band Result = as.integer(x/5)+1
2013 Jun 15
1
Downloading CSV file - RCurl help
There are some CSV file from the link below. I'm having trouble installing the package. Is this the package I have to use or is there another one I need to use? If so how do I get this one loaded. https://www.enmax.com/Power/Energy+Retailers/Settlement+Reports/Profile+settlement+report.htm install.packages("RCurl", repos =
2012 Jun 08
2
Percent of a given subset
How would I find the Percent of FuelTypeNum within the Band given AvailableMW? example: type 1 is 1% of PB0 type 2 is 54% of PB0 type 4 is 4% of PB0 type 5 is 42% of PB0 Note: the Bands and fuel types are not always constant. Data: FuelTypeNum Bands AvailableMW AvailableMWNewFormat 1 PB0 185319 185.319 2 PB0 18352000 18352 4 PB0 1338785 1338.785 5 PB0 14189756 14189.756 2 PB1