similar to: Extracting subsets by factor level?

Displaying 20 results from an estimated 5000 matches similar to: "Extracting subsets by factor level?"

2008 Nov 25
3
Line color based on data values?
Hi all Does anyone know if it is possible when plotting a line or scatter plot, to selectively color the data points based on the data value? i.e. if plotting say the percentage change in stock price movements, to color +ve points in green and -ve points in red? And extending this to a user-defined range of colors based on the quartile of the data points? Thanks Rory Rory Winston RBS Global
2008 Dec 05
1
Cartesian Product Of Character Vectors
Hi all (I'm sure this question has been asked before, but I cant find it). If I have two character vectors: > x <- c("aaa","bbb","ccc") > y <- c("1","2","3") How can I get the cartesian product of the string values? > expand.grid(x,y) Gives me a data frame with separate columns...however, I cant seem to get *apply
2008 Dec 05
1
Lexical Permutation Algorithm in R
Hi all Here is a rather naive implementation of the SEPA algorithm for generating lexical permutations: lexperm3 <- function(x, n=length(x)) { perms <- list() k <- 1 perms[[k]] <- x k <- k + 1 for (y in 1:(factorial(n)-1)) { i <- n-1 while (x[i] > x[i+1] && i > 0) { i <- i - 1 } # i is largest index st x[i] > x[i+1] j <- n #
2008 Nov 24
4
Calculating sum of letter values
Hi all If I have a string, say "ABCDA", and I want to convert this to the sum of the letter values, e.g. A -> 1 B -> 2 etc, so "ABCDA" = 1+2+3+4+1 = 11 Is there an elegant way to do this? Trying something like which(LETTERS %in% unlist(strsplit("ABCDA", ""))) is not quite correct, as it does not count repeated characters. I guess what I need is
2006 Apr 26
3
DOM events not firing in IE6 with floated divs
Hi All Not strictly Scriptaculous but I came across this whilst trying to implement some Scriptaculous code. I am hoping some XHTML guru out there might be able to shed some light. If you load up the attached file in IE6, you''ll see the events only fire in the middle section of the title bar when your over the border ! - FF1.5 is fine.. Any thoughts / comments appreciated.. Cheers
2006 Apr 28
3
Serialize / deserialize an associative array
Perhaps I missed something but I don''t see an easy way to do this ? Basically just wanna hold some ui state in a cookie. Did I miss something obvious ? Best Matt *********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorized and
2008 Dec 11
3
Downloading Reuters data from R
Hi R, Can we download Reuters (3000 Xtra) data from R? Does ODBC package help me in this? Or otherwise, is there a way to extract daily closing prices data of Reuters from R? Thank you very much, Shubha This e-mail may contain confidential and/or privileged i...{{dropped:13}}
2008 Nov 21
2
Extracting diagonal matrix
Dear All, I have a correlation matrix of size 100 x 100 and would like to extract the diagonal matrix from it. I have used the for loop to store tha correlation values of the diagonal matrix. Is there a 'R way' of doing this? Thanks in advance. Kind regards, Ezhil
2008 Sep 02
1
Moving to a new bug reporting system?
Hi all This may be an issue that has been discussed at length before, so apologies if I have missed that discussion, but is there any desire to switch from Jitterbug to something more capable and modern? Say JIRA, for instance? Rory Rory Winston RBS Global Banking & Markets Office: +44 20 7085 4476 *********************************************************************************** The
2008 Jun 24
1
Using Huge Pages for R
Hi all, My application usually works on huge amounts of data in the size of MB's .So the performance of "R" in this case will increase if Huge pages are used instead of malloc'ing (as in memory.c) . So Are there any methods to support Huge Pages in "R" ? Can any one give some inputs to help me implementing this feature? [[alternative HTML version deleted]]
2008 Jun 24
1
Using Huge Pages for R
Hi all, My application usually works on huge amounts of data in the size of MB's .So the performance of "R" in this case will increase if Huge pages are used instead of malloc'ing (as in memory.c) . So Are there any methods to support Huge Pages in "R" ? Can any one give some inputs to help me implementing this feature? [[alternative HTML version deleted]]
2005 Sep 22
5
Prototype lib : for-each loops and DontEnum
All I realise that this isn''t strictly the correct place to discuss the prototype lib but being as scriptaculous is dependent on it I thought people might have some opinions. Easier to explain with the example below, copy into a html file and ensure the path to prototype.js is correct. You''ll see the first example prints an extra element "extend" when iterating over
2008 Oct 22
1
forecasting earnings, sales and gross margin of a company...
Hi all, I am playing with some companies' balance sheets and income statements and want to apply what I've just learned from Stats class to see if I can forecast the companies earnings, sales and gross margin in the short term (3rd and 4th Quarter), mid-term (2009) and long term (2011, etc. ) I pulled up some data from companies' financial statements over the past a few years. The
2008 Aug 21
1
x[order(x)] vs sort(x)?
Hi I have a question (which may be an obvious one). It is about an idiom which I have seen quite often: o <- order(x); <- x[o] vs. the alternative x <- sort(x) I am just wondering as to the rationale behind the order/reindex idiom vs sorting. Especially as there seems to be a marked performance difference (especially for integer vectors): > x <- trunc(runif(1E6, 1, 100)) >
2008 Aug 22
2
call perl
Hi,   It may be the old question. can anyone tell me how to call perl in R? thanks   Y.     [[alternative HTML version deleted]]
2008 Aug 27
1
Odd behavior in histogram breaks?
I am looking at histogram breaks, and notice something odd: > foo <- hist(runif(10000),breaks=20) > length(foo$breaks) [1] 21 This makes sense to me. > foo <- hist(runif(10000),breaks=200) > length(foo$breaks) [1] 201 This also makes sense. BUT > foo <- hist(runif(10000),breaks=250) > length(foo$breaks) [1] 201 > foo <- hist(runif(100000),breaks=250) >
2005 Aug 31
4
Element.show - element.style.display=''''
All Head up. I found that when I had a hidden DIV (using css - display: none) which I wanted to Effect.Appear on some event (although the underlying problem seems to be with Element.show()), I had to make an amendment to the underlying prototype.js code by changing : element.style.display = '''' -> element.style.display = ''block''; I think the problem was
2008 Oct 23
1
[R-SIG-Finance] forecasting earnings, sales and gross margin of a company...
Sender: r-help-bounces at r-project.org On-Behalf-Of: comtech.usa at gmail.com Subject: Re: [R] [R-SIG-Finance] forecasting earnings, sales and gross margin of a company... Message-Id: <b1f16d9d0810231239k506d582i7ecb908b84bc1642 at mail.gmail.com> Recipient: ngottlieb at marinercapital.com -------------------------------------------------------- This information is being sent at the
2008 Nov 24
2
handling a matrix and .C
Hello R-devel, I want to write extensions for R in C (maybe C++ and Fortran later) and it works fine, but there is one problem, which I cannot solve (in my view). I want to handle a matrix from R in C. For arrays there is "as.double(...)", but nothing for a matrix. I searched a while, but didn't find something. Last I looked at the source code of e1071 and of the core itself and
2008 Jun 18
2
embedding R in c++ (Qt) application
Hi R-Developers, I'm working on running statistical analyses with embedded R from a Qt-GUI-application (C++). I've been able to link with R libraries, but I'm having a hard time to understand the C-coding examples. I'm a C++, not a C programmer (never used malloc before), and many of the R-specific functions/keywords/macros (for instance (UN)PROTECT, SETCAR, all the