[R] R course in Italy

2009-06-12 Thread r...@quantide.com
Quantide is pleased to announce the above course in Milan: -- Introduction to the R language 6-7th July 2009 Milano Italy -- * Who Should Attend ? Th

Re: [R] JGR

2009-05-05 Thread r...@quantide.com
The point is that one Cpu stays at 100% for all time JGR is up. Any ideas? Andrea Uwe Ligges wrote: r...@quantide.com wrote: Dear R User I am using JGR on a Linux Ubuntu Computer with 2 Cpus When Opening JGR, one Cpu goes up to 100% even if no calculation is yet started Did any of you

[R] JGR

2009-05-05 Thread r...@quantide.com
Dear R User I am using JGR on a Linux Ubuntu Computer with 2 Cpus When Opening JGR, one Cpu goes up to 100% even if no calculation is yet started Did any of you already noticed this strange behaviour? Thanks for your help Andrea __ R-help@r-project.or

Re: [R] Plotting multiple ablines

2009-04-02 Thread r...@quantide.com
May be: plot(c(-1, 1) , c(-1, 1), type = "n") n = 4 a = rep(0, n) b = 1:n/n fun = function(i, a, b, col = 1 , ...) { abline(a[i], b[i], col = col[i], ...) } lapply(1:n, fun, a=a, b=b, col = 1:n) Andrea Thomas Levine wrote: I really want to do this: abline( a=tan(-kT*pi/180), b=kY-tan(-

Re: [R] Table Modification

2009-01-23 Thread r...@quantide.com
If I understood propelly > tapply(fact3, list(fact1, fact2) , paste, collapse = ",") A. Derek Ogle wrote: I am trying to construct a two-way table where, instead of printing the two-way frequencies in the table, I would like to print the values of a third variable that correspond to the freque

Re: [R] Dates in Common

2009-01-23 Thread r...@quantide.com
The problem is in the intersect function that does x = as.vector(x) and therefore transforms date vector into a numeric . Try to: d1 = as.character(data1) ; d2 = as.character(data2) d = intersect(d1, d2) data = as.Date(d) A. Tom La Bone wrote: I have two collections of dates and I want to fig

Re: [R] Value Lookup from File without Slurping

2009-01-16 Thread r...@quantide.com
e, then a database solution is surely better A. Wacek Kusnierczyk wrote: if the file is really large, reading it twice may add considerable penalty: r...@quantide.com wrote: Something like this should work library(R.utils) out = numeric() qr = c("AAC", "ATT") n =countLines

Re: [R] faster version of split()?

2009-01-16 Thread r...@quantide.com
df = data.frame(x = sample(7:9, 100, rep = T), y = sample(1:5, 100, rep = T)) fun = function(x){length(unique(x))} by(df$x, df$y, fun) Simon Pickett wrote: Hi all, I want to calculate the number of unique observations of "y" in each level of "x" from my data frame "df". this does the job b

Re: [R] Value Lookup from File without Slurping

2009-01-16 Thread r...@quantide.com
Something like this should work library(R.utils) out = numeric() qr = c("AAC", "ATT") n =countLines("test.txt") file = file("test.txt", "r") for (i in 1:n){ line = readLines(file, n = 1) A = strsplit (line, split = " ")[[1]][1] if(is.element(A, qr)) { value = as.numeric(strsplit (line, split = "

Re: [R] Histograms: Boxes and lines

2009-01-14 Thread r...@quantide.com
Could be ... legend("topright",legend=c("Histogram","Kernel Density Estimate"),lty=c(NA,1), lwd=c(NA,2), pch = c(15, NA), col = c("lightblue", "black"), merge=TRUE,inset=.01,cex=.8,adj=0) A. John Kerpel wrote: Hi folks! I'm trying to get a histogram legend to give me a filled box and a line